Ver código fonte

feat:充值时校验是否绑定电话

zhanghui 2 anos atrás
pai
commit
7aed52866e
1 arquivos alterados com 18 adições e 2 exclusões
  1. 18 2
      myPages/recharge/index.vue

+ 18 - 2
myPages/recharge/index.vue

@@ -203,7 +203,23 @@
 			// 提交订单
 			submitOrder(){
 
-        const that = this;
+				if (!this.userInfo.phone){
+					uni.showModal({
+						title:'温馨提示',
+						content:'请绑定手机号,以便为你提供服务',
+						success:res=>{
+							if (res.confirm){
+								uni.navigateTo({
+									url: '/myPages/setting/setting-telphone',
+								})
+							}
+						}
+					})
+					return
+				}
+
+
+       			const that = this;
 				if(!this.isSelected){ // 是否确定协议
 					uni.showToast({
             			icon: 'none',
@@ -214,7 +230,7 @@
 
 				if(!this.reqOrderParm.rechargeAmount){
 					uni.showToast({
-            icon: 'none',
+            			icon: 'none',
 						title: '请输入或选择充值金额!'
 					});
 					return;