Browse Source

Merge branch '2025北京诚祥-家政版' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥-家政版

tanxue 14 hours ago
parent
commit
874a06a941
2 changed files with 23 additions and 15 deletions
  1. 19 11
      pages/Login/clientIndex.vue
  2. 4 4
      pages/Login/test.vue

+ 19 - 11
pages/Login/clientIndex.vue

@@ -18,7 +18,11 @@
 							@click="agreeBtn('ystk')" class="agreement-text">《诚祥学隐私政策》</view>,如您同意,请勾选后开始使用
 					</view>
 				</view>
-				<button class="phone-green-btn wechat-auth-btn" type="default" open-type="getPhoneNumber" @getphonenumber="onWechatAuth">
+				<button v-show="isAgreedTuceng" @click="tucengClick" class="phone-green-btn wechat-auth-btn" type="default">
+					微信一键登录
+				</button>
+				<button v-show="!isAgreedTuceng" class="phone-green-btn wechat-auth-btn" type="default" open-type="getPhoneNumber"
+					@getphonenumber="onWechatAuth">
 					微信一键登录
 				</button>
 				<view class="qtdl-btn"><text @click="handleChangeFangshi">其他登录</text></view>
@@ -51,6 +55,7 @@
 	const clearTelIcon = ref(false)
 	const clearPwIcon = ref(false)
 	const isAgreed = ref(false)
+	const isAgreedTuceng = ref(true) //涂层
 	const id = ref('')
 	const code = ref('')
 
@@ -72,8 +77,15 @@
 
 	function handleChange() {
 		isAgreed.value = !isAgreed.value
-	}
+		isAgreedTuceng.value = !isAgreedTuceng.value
 
+	}
+	function tucengClick (){
+		if (!isAgreed.value) {
+			toast('请先阅读并同意用户协议和隐私政策')
+			return // 直接返回,不执行后面的授权逻辑
+		}
+	}
 	function agreeBtn(code) {
 		if (code === 'yhxy') {
 			uni.navigateTo({
@@ -109,10 +121,6 @@
 	}
 	// 微信授权登录
 	function onWechatAuth(e) {
-		if (!isAgreed.value) {
-			toast('请先阅读并同意用户协议和隐私政策')
-			return // 直接返回,不执行后面的授权逻辑
-		}
 		if (e.detail.errMsg.includes('fail')) {
 			toast('授权失败')
 			return
@@ -175,11 +183,11 @@
 	function gotoPage() {
 		console.log('ididid', id.value);
 		if (id.value) {
-			uni.navigateTo({
+			uni.redirectTo({
 				url: `/pages/client/hetong/hetongInfo?id=` + id.value + `&from=${fromPage.value}`
 			})
 		} else {
-			uni.navigateTo({
+			uni.redirectTo({
 				url: `/pages/client/ShouYe/shouye`
 			})
 		}
@@ -188,11 +196,11 @@
 	function gotoPage2() {
 		console.log('ididid222222', id.value);
 		if (id.value) {
-			uni.navigateTo({
+			uni.redirectTo({
 				url: `/pages/kehu/hetong/hetongInfo?id=` + id.value + `&from=${fromPage.value}`
 			})
 		} else {
-			uni.navigateTo({
+			uni.redirectTo({
 				url: `/pages/kehu/shouYe/shouye`
 			})
 		}
@@ -203,4 +211,4 @@
 			cacheManager.set('projectImg', res.data)
 		});
 	}
-</script>
+</script>

+ 4 - 4
pages/Login/test.vue

@@ -201,11 +201,11 @@
 
   function gotoPage() {
     if (id.value) {
-      uni.navigateTo({
+      uni.redirectTo({
         url: `/pages/client/hetong/hetongInfo?id=` + id.value + `&from=${fromPage.value}`
       })
     } else {
-      uni.navigateTo({
+      uni.redirectTo({
         url: `/pages/client/ShouYe/shouye`
       })
     }
@@ -213,11 +213,11 @@
 
   function gotoPage2() {
     if (id.value) {
-      uni.navigateTo({
+      uni.redirectTo({
         url: `/pages/kehu/hetong/hetongInfo?id=` + id.value + `&from=${fromPage.value}`
       })
     } else {
-      uni.navigateTo({
+      uni.redirectTo({
         url: `/pages/kehu/shouye/shouye`
       })
     }