Ver Fonte

短信发送中

y595705120 há 2 semanas atrás
pai
commit
e44ec8c8b6
2 ficheiros alterados com 28 adições e 3 exclusões
  1. 20 3
      src/containers/register/register.vue
  2. 8 0
      src/containers/reset/reset.vue

+ 20 - 3
src/containers/register/register.vue

@@ -152,6 +152,7 @@
         passwordLevel: 'sick',
         password: '',
         education:'',
+        company:'',
         educationList: window.baseConfig.educationList,
         confirmPassword: '',
         phone: '',
@@ -164,6 +165,14 @@
     },
     watch: {
       code(code){
+        // const loadingInstance = this.$loading({
+        //   lock: true,
+        //   text: '用户注册中,请耐心等待...',
+        //   spinner: 'el-icon-loading',
+        //   background: 'rgba(240, 242, 245, 0.8)',
+        //   customClass: 'gray-bg-loading' // 自定义类名,避免全局污染
+        // })
+        // loadingInstance.close()
         if(code.length != 5 || this.errCount>3) {
           this.isCodeOk = false;
           return;
@@ -218,7 +227,8 @@
           customClass: 'gray-bg-loading' // 自定义类名,避免全局污染
         })
         httpServer("Auth.register", param).then(res => {
-          loadingInstance.close()
+          console.log("loginOk");
+          loadingInstance.close();
           if (res.code != 200) {
              this.err = res.msg;
              return;
@@ -238,7 +248,7 @@
       checkPhone() {
         let phone = this.phone;
         if (!/^1[3456789]\d{9}$/.test(phone)) {
-          this.$message.error("请填写正确的手机号");
+          this.$message.errorMsg("请填写正确的手机号", 2);
           return false;
         }
         return true
@@ -254,8 +264,15 @@
         if (!this.checkPhone()) return;
         let phone = this.phone
         let type ="register"
-
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '短信发送中,请耐心等待...',
+          spinner: 'el-icon-loading',
+          background: 'rgba(240, 242, 245, 0.8)',
+          customClass: 'gray-bg-loading' // 自定义类名,避免全局污染
+        })
         httpServer("Auth.getCode", {phone,type}).then(res => {
+          loadingInstance.close()
           if (res.code == 200) {
             this.errCount = 0
             this.$message.successMsg("发送成功", 1)

+ 8 - 0
src/containers/reset/reset.vue

@@ -78,7 +78,15 @@ export default {
       } else {
         let {phone} = this.regForm;
         let type = "resetPass"
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '短信发送中,请耐心等待...',
+          spinner: 'el-icon-loading',
+          background: 'rgba(240, 242, 245, 0.8)',
+          customClass: 'gray-bg-loading' // 自定义类名,避免全局污染
+        })
         httpServer("Auth.getCode", {phone,type}).then(res => {
+          loadingInstance.close()
           if( res.code == 200){
             this.$message.successMsg("发送成功", 2);
             this.show = false