yangc 8 years ago
parent
commit
f591275bf1
1 changed files with 6 additions and 1 deletions
  1. 6 1
      components/register-saler/register/StepThird.vue

+ 6 - 1
components/register-saler/register/StepThird.vue

@@ -435,8 +435,10 @@
           })
       },
       storeApply: function (enuu) {
+        let loadingInstance = Loading.service({ fullscreen: true })
         let validCode = 0
         if (this.businessLicenseUrl === '') {
+          loadingInstance.close()
           this.$message.error('请上传营业执照')
         } else {
           if (this.brands[0].name === '') {
@@ -472,7 +474,6 @@
                 tmpBrands.push(item)
               }
             })
-            let loadingInstance = Loading.service({ fullscreen: true })
             this.$http.post('/store-service/applications', {
               brands: tmpBrands,
               qualifications: qualifications,
@@ -495,18 +496,22 @@
                   window.location.href = '/vendor#/store-apply/wait'
                 }, 3000)
               } else {
+                loadingInstance.close()
                 this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
                 this.$message.error('开通店铺失败')
               }
             }, err => {
               console.log(err)
+              loadingInstance.close()
               this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
               this.$message.error('开通店铺失败')
             })
           } else {
             if (validCode === 1) {
+              loadingInstance.close()
               this.$message.error('请添加品牌信息')
             } else if (validCode === 2) {
+              loadingInstance.close()
               this.$message.error('请上传品牌图片')
             }
           }