|
|
@@ -194,13 +194,13 @@ export default {
|
|
|
let mobile = this.ruleFormPhone.mobile;
|
|
|
let register = async body => {
|
|
|
if (this.isRegistering) {
|
|
|
- console.log('防抖中。。。')
|
|
|
- return
|
|
|
+ console.log("防抖中。。。");
|
|
|
+ return;
|
|
|
}
|
|
|
- this.isRegistering = true
|
|
|
- setTimeout(()=>{
|
|
|
- this.isRegistering = false
|
|
|
- }, 1500)
|
|
|
+ this.isRegistering = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isRegistering = false;
|
|
|
+ }, 1500);
|
|
|
let res = await this.$axios.$post("/api/passport/register", body);
|
|
|
if (res && res.data) {
|
|
|
this.$message.success(res.info);
|
|
|
@@ -249,12 +249,7 @@ export default {
|
|
|
let mobileSplit = this.ruleFormPhone.mobile.split("-");
|
|
|
let area = mobileSplit[0] || "";
|
|
|
let mobile = mobileSplit[1] || "";
|
|
|
- if (
|
|
|
- area.match(/\+86/) &&
|
|
|
- !mobile.match(
|
|
|
- /^[0-9]{11}$/
|
|
|
- )
|
|
|
- ) {
|
|
|
+ if (area.match(/\+86/) && !mobile.match(/^[0-9]{11}$/)) {
|
|
|
this.$message({
|
|
|
message: "请输入正确格式的手机号",
|
|
|
type: "error"
|