shish 4 лет назад
Родитель
Сommit
96dc1f8ad3

+ 4 - 10
ghsApp/src/pagesClient/official/apply.vue

@@ -287,9 +287,6 @@ export default {
       });
     },
     confirmFn () {
-      uni.showLoading({
-        title:"加载中..."
-      })
       applyRegister({
         hdShopAdminId: this.option.hdShopAdminId,
         ghsShopAdminId: this.option.ghsShopAdminId,
@@ -297,7 +294,6 @@ export default {
         style: this.option.style || 0,
         from: this.option.from || 0
       }).then(res => {
-        uni.hideLoading()
         this.$util.pageTo({
           url: "/pagesClient/official/result",
           type: 2,
@@ -331,9 +327,7 @@ export default {
       this.form.province = e.provinceName;
       this.form.city = e.cityName;
     },
-    // 表单验证
     formSubmit (e) {
-      // 表单规则
       let rules = [
         {
           name: "name",
@@ -361,14 +355,14 @@ export default {
           msg: ["请填写手机号"]
         }
       ];
-      // 进行表单检查
       let formData = this.form;
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
       if (!checkRes) {
+        uni.showLoading({title: '加载中',mask:true})
         setTimeout(() => {
-          this.confirmFn();
-        });
+          this.confirmFn()
+        })
+        uni.hideLoading()
       } else {
         this.$msg(checkRes);
       }

+ 4 - 8
hdApp/src/pagesClient/official/apply.vue

@@ -258,9 +258,6 @@ export default {
       })
     },
     confirmFn() {
-      uni.showLoading({
-        title:"加载中..."
-      })
       applyRegister({
         hdShopAdminId: this.option.hdShopAdminId,
         ghsShopAdminId: this.option.ghsShopAdminId,
@@ -268,7 +265,6 @@ export default {
         style: this.option.style || 0,
         from: this.option.from || 0,
       }).then((res) => {
-        uni.hideLoading()
         this.$util.pageTo({
           url: "/pagesClient/official/result",
           type: 2,
@@ -331,14 +327,14 @@ export default {
           msg: ["请填写手机号"]
         }
       ];
-      // 进行表单检查
       let formData = this.form;
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
       if (!checkRes) {
+        uni.showLoading({title: '加载中',mask:true})
         setTimeout(() => {
-          this.confirmFn();
-        });
+          this.confirmFn()
+        })
+        uni.hideLoading()
       } else {
         this.$msg(checkRes);
       }