Procházet zdrojové kódy

style:按钮控制

zhanghui před 2 roky
rodič
revize
4239b6f62e

+ 2 - 2
main.js

@@ -17,8 +17,8 @@ Vue.use(VueJsonp)
 import uView from "uview-ui";
 import uView from "uview-ui";
 Vue.use(uView);
 Vue.use(uView);
 Vue.config.productionTip = false
 Vue.config.productionTip = false
-Vue.prototype.$phonePattern = env.baseUrl;
-Vue.prototype.$baseUrl = '^1[3-9][0-9]\\d{8}$';
+Vue.prototype.$phonePattern = '^1[3-9][0-9]\\d{8}$';
+Vue.prototype.$baseUrl = env.baseUrl;
 Vue.prototype.$api = api;
 Vue.prototype.$api = api;
 App.mpType = 'app'
 App.mpType = 'app'
 const app = new Vue({
 const app = new Vue({

+ 1 - 1
pages/forgetPassword/forgetPassword.vue

@@ -50,7 +50,7 @@
 						required: true,
 						required: true,
 						min:11,
 						min:11,
 						max: 11,
 						max: 11,
-						pattern:this.$baseUrl,
+						pattern:this.$phonePattern,
 						message: '请输入正确的电话号码',
 						message: '请输入正确的电话号码',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
 					},
 					},

+ 6 - 0
pages/index/index.vue

@@ -586,6 +586,10 @@
 					this.setButtomState(this.currService)
 					this.setButtomState(this.currService)
 					this.currService.avatar=this.currService.avatar.replace(/^http:/, "https:")
 					this.currService.avatar=this.currService.avatar.replace(/^http:/, "https:")
 
 
+				}).catch(err=>{
+					this.buttonState=[1,1,1,1]
+					console.log("出错了++++++++++++++++++",err)
+
 				})
 				})
 
 
 			},
 			},
@@ -615,6 +619,8 @@
 					}
 					}
 					if (this.userInfo.signIn){
 					if (this.userInfo.signIn){
 						this.currServiceInfo()
 						this.currServiceInfo()
+					}else {
+						this.buttonState=[1,1,1,1]
 					}
 					}
 					this.$forceUpdate()
 					this.$forceUpdate()
 				})
 				})

+ 1 - 1
pages/login/login.vue

@@ -65,7 +65,7 @@
 						required: true,
 						required: true,
 						min: 11,
 						min: 11,
 						max: 11,
 						max: 11,
-						pattern:this.$baseUrl,
+						pattern:this.$phonePattern,
 						message: '请输入正确的电话号码',
 						message: '请输入正确的电话号码',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
 					},
 					},

+ 1 - 1
pages/updatePassword/updatePassword.vue

@@ -40,7 +40,7 @@
 						required: true,
 						required: true,
 						min:11,
 						min:11,
 						max: 11,
 						max: 11,
-						pattern:this.$baseUrl,
+						pattern:this.$phonePattern,
 						message: '请输入正确的电话号码',
 						message: '请输入正确的电话号码',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
 					},
 					},