jiayubo 2 днів тому
батько
коміт
6a9ad8a50c
3 змінених файлів з 92 додано та 21 видалено
  1. 14 5
      components/Client/new_file.vue
  2. 2 2
      pages/index.vue
  3. 76 14
      pages/login.vue

+ 14 - 5
components/Client/new_file.vue

@@ -137,12 +137,12 @@
 		{
 			icon: '/static/Tioimages/临时帮手.png',
 			name: '临时帮手',
-			key: 3,
+			key: 4,
     },
     {
 			icon: '/static/Tioimages/家庭保洁.png',
 			name: '家庭保洁',
-			key: 4,
+			key: 3,
 		},
 		{
 			icon: '/static/Tioimages/家电维修.png',
@@ -214,13 +214,13 @@
 			}
 			const res = await volunteerSeachgetTreeList(params)
 
-			// 只有第一条和第二条可以跳转
-			if (service.key === 1 || service.key === 2) {
+			// 只有第一条、第二条、临时帮手和家庭保洁可以跳转
+			if (service.key === 1 || service.key === 2 || service.key === 3 || service.key === 4) {
 				uni.navigateTo({
 					url: `/pages_home/pages/client/details?dataList=${encodeURIComponent(JSON.stringify(res.data))}&serviceCategory=${service.key}`
 				});
 			} else {
-				// 其他条目提示“敬请期待”
+				// 其他条目提示"敬请期待"
 				uni.showToast({
 					title: '敬请期待',
 					icon: 'none'
@@ -229,6 +229,15 @@
 		}
 		// 志愿者
 		if (userType == 2) {
+			// 交友专区、娱乐专区、商城购物、本地生活 显示敬请期待
+			if (service.key === 8 || service.key === 9 || service.key === 10 || service.key === 11) {
+				uni.showToast({
+					title: '敬请期待',
+					icon: 'none'
+				});
+				return;
+			}
+			
 			if (service.key !== 13) {
 				const res = await getVolunteerInfo({
 					serviceCategory: service.key

+ 2 - 2
pages/index.vue

@@ -216,12 +216,12 @@ onReachBottom(() => {
 
 const getBanners = async () => {
   try {
-    const res = await slideshow(15)
+    const res = await slideshow(19)
     if (res.code === 200 && res.data.picture) {
       list3.value = res.data.picture.split(',')
     }
 
-    const value_res = await slideshow(8)
+    const value_res = await slideshow(20)
     if (value_res.code === 200 && value_res.data.picture) {
       ValueZone.value = value_res.data.picture.split(',')
     }

+ 76 - 14
pages/login.vue

@@ -6,7 +6,10 @@
       class="wave-img"
     ></image>
 
-    <view class="logo-content">
+    <view
+      class="logo-content"
+      :style="`margin-top: ${globalData.navBarHeight}px`"
+    >
       <image :src="imagePath" mode="aspectFit" class="logo-image"></image>
       <text class="title">金邻助家</text>
     </view>
@@ -31,7 +34,7 @@
           label="我已认真阅读、理解并同意"
           name="agree"
           usedAlone
-          v-model:checked="checkboxValue"
+          v-model="checkboxValue"
           class="text-grey1"
         >
         </up-checkbox>
@@ -46,6 +49,7 @@
 import { ref, reactive, onMounted } from 'vue'
 import { useRouter } from 'vue-router' // 根据实际情况选择路由库
 import store from '@/store'
+import { onShow } from '@dcloudio/uni-app'
 
 const imagePath = '/static/9efd1.png' // Path to the logo image (red tree)
 
@@ -60,6 +64,10 @@ const loginForm = reactive({
 })
 
 const checkboxValue = ref(false)
+const globalData = ref({
+  statusBarHeight: 47,
+  navBarHeight: 91,
+})
 
 // const codeUrl = ref(""); // Not used in the new design
 // const captchaEnabled = ref(true); // Not used in the new design
@@ -72,17 +80,22 @@ const handleUserRegister = () => {
 }
 
 const WeChat = {
-  width: '280rpx',
+  width: '530rpx',
   height: '96rpx',
   opacity: 1,
-  background: '#0E0404',
+  background: '#8B4F2D',
   color: '#FFFFFF',
   borderRadius: '48rpx',
-  fontWeight: '500',
+  fontWeight: '700px',
   fontSize: '32rpx',
-  marginLeft: '48rpx',
-  marginRight: '422rpx',
-  marginBottom: '32rpx',
+  marginLeft: 'auto',
+  marginRight: 'auto',
+  marginBottom: '10rpx',
+  display: 'flex',
+  justifyContent: 'center',
+  alignItems: 'center',
+  border: 'none',
+  boxShadow: 'none',
 }
 
 // 隐私协议
@@ -179,6 +192,22 @@ const loginSuccess = () => {
   })
 }
 
+// 获取胶囊位置信息
+const getSystemInfo = () => {
+  uni.getSystemInfo({
+    success: (res) => {
+      const statusBarHeight = res.statusBarHeight
+      const navBarHeight =
+        res.platform === 'android' ? 48 : 44 + res.statusBarHeight
+      globalData.value = { statusBarHeight, navBarHeight }
+    },
+  })
+}
+
+onShow(() => {
+  getSystemInfo()
+})
+
 // 页面加载时
 onMounted(() => {
   uni.setStorageSync('userType', 0)
@@ -191,19 +220,22 @@ onMounted(() => {
       timingFunc: 'easeIn',
     },
   })
+
+  getSystemInfo()
 })
 </script>
 
 <style lang="scss" scoped>
 .normal-login-container {
   // border: 2px solid red;
-  width: 750rpx;
-  height: 1624rpx;
+  width: 100vw;
+  height: 100vh;
   // width: 100vw;
   // height: 100vh;
   border-radius: 48rpx;
   background: linear-gradient(156deg, #f5c954 -4%, #f66c44 110%);
   position: relative;
+  overflow-x: hidden;
   .wave-img {
     position: absolute;
     top: 0;
@@ -220,6 +252,8 @@ onMounted(() => {
   display: flex;
   flex-direction: column;
   align-items: center;
+  position: relative;
+  z-index: 1;
   .logo-image {
     width: 90px;
     height: 78px;
@@ -233,7 +267,7 @@ onMounted(() => {
     height: 60rpx;
     font-family: Poppins;
     font-size: 46rpx;
-    font-weight: 600;
+    font-weight: 400;
     line-height: 60rpx;
     letter-spacing: normal;
     color: #ffffff;
@@ -249,14 +283,14 @@ onMounted(() => {
   width: 720rpx;
   height: 334rpx;
   margin-top: 0;
-  margin-bottom: 148rpx;
+  margin-bottom: 50rpx;
   margin-right: 136rpx;
   margin-left: 136rpx;
 }
 
 .slogan-content {
   margin-top: 0;
-  margin-bottom: 148rpx;
+  margin-bottom: 380rpx;
   margin-right: 300rpx;
   margin-left: 300rpx;
   z-index: 1;
@@ -265,7 +299,7 @@ onMounted(() => {
     flex-direction: column;
     align-items: center;
     width: 448rpx;
-    height: 104rpx;
+    height: 52rpx;
     font-family: Poppins;
     font-size: 32rpx;
     font-weight: 600;
@@ -275,4 +309,32 @@ onMounted(() => {
     color: #824727;
   }
 }
+
+.actions-container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 100%;
+  z-index: 1;
+}
+
+.xieyi {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-wrap: wrap;
+}
+
+.text-blue {
+  color: #1976d2;
+  margin: 0 4rpx;
+}
+
+.text-grey1 {
+  color: #333333;
+}
+
+.text-center {
+  text-align: center;
+}
 </style>