Browse Source

增加开通卖家的代码注释

suntg 7 years ago
parent
commit
382997bf46

+ 2 - 0
components/register-saler/register/StepFirst.vue

@@ -365,6 +365,7 @@
         this.data.licenceId = val.businessCode || val.licenceId || val.enBussinessCode || ''
         this.data.licenceId = val.businessCode || val.licenceId || val.enBussinessCode || ''
         this.data.address = val.address || val.enAddress || ''
         this.data.address = val.address || val.enAddress || ''
       },
       },
+      // 下一步点击,保存企业信息,或者保存缓存企业信息
       sectionChange: function (type) {
       sectionChange: function (type) {
         if (!this.isValid) {
         if (!this.isValid) {
           this.$message.error('请填写正确的注册信息')
           this.$message.error('请填写正确的注册信息')
@@ -511,6 +512,7 @@
 //        this.validUpload.init = false
 //        this.validUpload.init = false
 //        this.validUpload.isValidUpload = this.data.url !== ''
 //        this.validUpload.isValidUpload = this.data.url !== ''
 //      },
 //      },
+      // 执照号验证
       licenceCheck: function (num) {
       licenceCheck: function (num) {
         if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
         if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
           if (num > 0) {
           if (num > 0) {

+ 5 - 4
components/register-saler/register/StepSecond.vue

@@ -52,18 +52,19 @@
           this.$emit('sectionEvent', type)
           this.$emit('sectionEvent', type)
         }
         }
       },
       },
-      getArticle: function (num) {
+      getArticle: function (num) { // 获取协议内容,通过帮助中心的接口
         this.$http.get('/api/help-service/issues/' + num).then(response => {
         this.$http.get('/api/help-service/issues/' + num).then(response => {
           this.article = response.data.article
           this.article = response.data.article
         })
         })
       },
       },
       onCheck: function () {
       onCheck: function () {
         this.checkData.checked = !this.checkData.checked
         this.checkData.checked = !this.checkData.checked
+        // 个人用户,提交缓存的企业信息
         if (this.loginData.isSelf) {
         if (this.loginData.isSelf) {
           this.cacheData.enIsRead = this.checkData.checked
           this.cacheData.enIsRead = this.checkData.checked
           this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
           this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
-        } else {
-          if (this.checkData.checked) {
+        } else { // 企业用户,设置企业的已读协议
+          if (this.checkData.checked) { // 勾选了
             this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
             this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
               .then(() => {
               .then(() => {
                 this.$http.get('/user/authentication/reflash')
                 this.$http.get('/user/authentication/reflash')
@@ -73,7 +74,7 @@
                     })
                     })
                   })
                   })
               })
               })
-          } else {
+          } else { // 没勾选
             this.$http.post('/basic/enterprise/openVendorSetNotRead/' + this.loginData.enterprise.uu)
             this.$http.post('/basic/enterprise/openVendorSetNotRead/' + this.loginData.enterprise.uu)
               .then(() => {
               .then(() => {
                 this.$http.get('/user/authentication/reflash')
                 this.$http.get('/user/authentication/reflash')

+ 9 - 4
components/register-saler/register/StepThird.vue

@@ -398,18 +398,21 @@
         e.target.setAttribute('class', '')
         e.target.setAttribute('class', '')
       },
       },
       submitApply: function () {
       submitApply: function () {
+        // 个人
         if (this.loginData.isSelf) {
         if (this.loginData.isSelf) {
           if (!this.registerData.isValidRegister) {
           if (!this.registerData.isValidRegister) {
             this.$message.error('请输入正确的注册信息')
             this.$message.error('请输入正确的注册信息')
           } else if (!this.checkData.checked) {
           } else if (!this.checkData.checked) {
             this.$message.error('您还没有勾选相关条款')
             this.$message.error('您还没有勾选相关条款')
           } else {
           } else {
+            // 注册企业,并提交申请
             this.registerSelf()
             this.registerSelf()
           }
           }
-        } else {
+        } else { // 企业
           if (!this.checkData.checked) {
           if (!this.checkData.checked) {
             this.$message.error('您还没有勾选相关条款')
             this.$message.error('您还没有勾选相关条款')
           } else {
           } else {
+            // 提交申请
             this.storeApply(this.loginData.enterprise.uu)
             this.storeApply(this.loginData.enterprise.uu)
           }
           }
         }
         }
@@ -485,6 +488,7 @@
                 tmpBrands.push(item)
                 tmpBrands.push(item)
               }
               }
             })
             })
+            // 申请开店
             this.$http.post('/store-service/applications', {
             this.$http.post('/store-service/applications', {
               brands: tmpBrands,
               brands: tmpBrands,
               qualifications: qualifications,
               qualifications: qualifications,
@@ -553,11 +557,12 @@
                   this.$store.dispatch('loadUserInfo')
                   this.$store.dispatch('loadUserInfo')
                   window.location.href = url
                   window.location.href = url
                 })
                 })
-              }
-              )
+              })
           })
           })
       },
       },
+      // 不申请店铺,直接跳转产品管理页面
       goProduct: function (baseUrl) {
       goProduct: function (baseUrl) {
+        // 个人用户,先注册企业,成功后切换到新注册的企业,然后跳转到产品管理页面
         if (this.loginData.isSelf) {
         if (this.loginData.isSelf) {
           if (!this.registerData.isValidRegister) {
           if (!this.registerData.isValidRegister) {
             this.$message.error('请输入正确的注册信息')
             this.$message.error('请输入正确的注册信息')
@@ -583,7 +588,7 @@
                 this.$message.error('企业注册失败,请重新填写信息')
                 this.$message.error('企业注册失败,请重新填写信息')
               })
               })
           }
           }
-        } else {
+        } else { // 企业用户,直接跳转产品管理页面
           if (!this.checkData.checked) {
           if (!this.checkData.checked) {
             this.$message.error('您还没有勾选相关条款')
             this.$message.error('您还没有勾选相关条款')
           } else {
           } else {