浏览代码

style:按钮控制

zhanghui 2 年之前
父节点
当前提交
4239b6f62e
共有 5 个文件被更改,包括 11 次插入5 次删除
  1. 2 2
      main.js
  2. 1 1
      pages/forgetPassword/forgetPassword.vue
  3. 6 0
      pages/index/index.vue
  4. 1 1
      pages/login/login.vue
  5. 1 1
      pages/updatePassword/updatePassword.vue

+ 2 - 2
main.js

@@ -17,8 +17,8 @@ Vue.use(VueJsonp)
 import uView from "uview-ui";
 Vue.use(uView);
 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;
 App.mpType = 'app'
 const app = new Vue({

+ 1 - 1
pages/forgetPassword/forgetPassword.vue

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

+ 6 - 0
pages/index/index.vue

@@ -586,6 +586,10 @@
 					this.setButtomState(this.currService)
 					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){
 						this.currServiceInfo()
+					}else {
+						this.buttonState=[1,1,1,1]
 					}
 					this.$forceUpdate()
 				})

+ 1 - 1
pages/login/login.vue

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

+ 1 - 1
pages/updatePassword/updatePassword.vue

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