Sfoglia il codice sorgente

fix:购买权益卡时校验是否绑定手机号

zhanghui 2 anni fa
parent
commit
05e273b7c6
2 ha cambiato i file con 31 aggiunte e 0 eliminazioni
  1. 15 0
      pages/index/index.vue
  2. 16 0
      storePages/rights/index.vue

+ 15 - 0
pages/index/index.vue

@@ -399,6 +399,21 @@ export default {
     },
 
     goRights(){
+      this.userInfo = uni.getStorageSync('userInfo')
+      if (!this.userInfo.phone){
+        uni.showModal({
+          title:'温馨提示',
+          content:'请绑定手机号,以便为你提供服务',
+          success:res=>{
+            if (res.confirm){
+              uni.navigateTo({
+                url: '/myPages/setting/setting-telphone',
+              })
+            }
+          }
+        })
+        return
+      }
       uni.navigateTo({
         url: '/storePages/rights/index'
       })

+ 16 - 0
storePages/rights/index.vue

@@ -276,6 +276,22 @@ export default {
 		},
 
 		payRights(item) {
+			this.userInfo = uni.getStorageSync('userInfo')
+			if (!this.userInfo.phone){
+				uni.showModal({
+					title:'温馨提示',
+					content:'请绑定手机号,以便为你提供服务',
+					success:res=>{
+						if (res.confirm){
+							uni.navigateTo({
+								url: '/myPages/setting/setting-telphone',
+							})
+						}
+					}
+				})
+				return
+			}
+
 			if (this.serviceObjectList[0].length === 0) {
 				uni.showModal({
 					title: '温馨提示',