@@ -17,10 +17,11 @@ Vue.use(VueJsonp)
import uView from "uview-ui";
Vue.use(uView);
Vue.config.productionTip = false
-Vue.prototype.$baseUrl = env.baseUrl;
+Vue.prototype.$phonePattern = env.baseUrl;
+Vue.prototype.$baseUrl = '^1[3-9][0-9]\\d{8}$';
Vue.prototype.$api = api;
App.mpType = 'app'
const app = new Vue({
...App
})
-app.$mount()
+app.$mount()
@@ -42,8 +42,7 @@
username:'',
code:'',
newPassword:'',
- againPassword:'',
- re:'^((13[0-9])|(14[5,7])|(15[0-3,5-9])|166|(17[0,3,5-9])|(18[0-9])|(19[1,5,8,9]))\\d{8}$', //手机号正则表达式
+ againPassword:''
},
rules: {
'username': {
@@ -51,7 +50,7 @@
required: true,
min:11,
max: 11,
- pattern:'^((13[0-9])|(14[5,7])|(15[0-3,5-9])|166|(17[0,3,5-9])|(18[0-9])|(19[1,5,8,9]))\\d{8}$',
+ pattern:this.$baseUrl,
message: '请输入正确的电话号码',
trigger: ['blur', 'change']
@@ -65,7 +65,7 @@
min: 11,
@@ -40,7 +40,7 @@