Commit 9b25bc2a by 梁建民

js

parent 21af6d68
...@@ -280,11 +280,24 @@ ...@@ -280,11 +280,24 @@
...mapState({ ...mapState({
loading: state => state.smt.loading loading: state => state.smt.loading
}), }),
linkName(){
return this.form.linkName;
},
mobileVal() { mobileVal() {
return this.form.mobile; return this.form.mobile;
} }
}, },
watch: { watch: {
linkName(val){
var reg= /^[\u0391-\uFFE5A-Za-z]+$/;
if( !reg.test(val) ){
this.formError = true;
this.formMsg = '亲,称呼只能为英文和中文';
}else{
this.formError = false
this.formMsg = '';
}
},
mobileVal(val) { mobileVal(val) {
if (val.length >= 11) { if (val.length >= 11) {
this.verifyCodeFlag = true; this.verifyCodeFlag = true;
......
...@@ -271,8 +271,13 @@ ...@@ -271,8 +271,13 @@
} }
}, },
linkName(val) { linkName(val) {
if (val) { var reg= /^[\u0391-\uFFE5A-Za-z]+$/;
this.formError = false; if( !reg.test(val) ){
this.formError = true;
this.formMsg = '亲,称呼只能为英文和中文';
}else{
this.formError = false
this.formMsg = '';
} }
}, },
verifyCode(val) { verifyCode(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment