Browse Source

开通卖家中心逻辑调整

wangdy 8 years ago
parent
commit
f4987f8a31

+ 32 - 16
components/register-saler/register/StepSecond.vue

@@ -15,7 +15,7 @@
     </div>
     </div>
     <div class="row" style="margin-left: 30px; text-align: center;">
     <div class="row" style="margin-left: 30px; text-align: center;">
       <label class="checkbox-inline">
       <label class="checkbox-inline">
-        <input type="checkbox" id="agree" name="agree" value="1" :checked="checkData.checked" @click="checkData.checked = !checkData.checked" >
+        <input type="checkbox" id="agree" name="agree" value="1" :checked="checkData.checked" @click="onCheck()" >
         我已阅读并同意<a href="http://www.usoftmall.com/help#/issue/50" target="_blank">
         我已阅读并同意<a href="http://www.usoftmall.com/help#/issue/50" target="_blank">
         《优软商城服务条款》</a>、<a href="http://www.usoftmall.com/help#/issue/16" target="_blank">
         《优软商城服务条款》</a>、<a href="http://www.usoftmall.com/help#/issue/16" target="_blank">
         《优软商城买卖条例》</a>
         《优软商城买卖条例》</a>
@@ -46,21 +46,8 @@
     },
     },
     methods: {
     methods: {
       sectionChange: function (type) {
       sectionChange: function (type) {
-        if (type === 3) {
-          if (this.checkData.checked) {
-            if (this.loginData.isSelf) {
-              this.cacheData.enIsRead = this.checkData.checked
-              this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
-            } else {
-              this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
-                .then(() => {
-                  this.$store.dispatch('loadUserInfo')
-                })
-            }
-            this.$emit('sectionEvent', type)
-          } else {
-            this.$message.error('请阅读并勾选服务条款')
-          }
+        if (!this.checkData.checked) {
+          this.$message.error('请阅读相关条例')
         } else {
         } else {
           this.$emit('sectionEvent', type)
           this.$emit('sectionEvent', type)
         }
         }
@@ -69,6 +56,35 @@
         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 () {
+        this.checkData.checked = !this.checkData.checked
+        if (this.loginData.isSelf) {
+          this.cacheData.enIsRead = this.checkData.checked
+          this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
+        } else {
+          if (this.checkData.checked) {
+            this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
+              .then(() => {
+                this.$http.get('/user/authentication/reflash')
+                  .then(() => {
+                    this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
+                      this.$store.dispatch('loadUserInfo')
+                    })
+                  })
+              })
+          } else {
+            this.$http.post('/basic/enterprise/openVendorSetNotRead/' + this.loginData.enterprise.uu)
+              .then(() => {
+                this.$http.get('/user/authentication/reflash')
+                  .then(() => {
+                    this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
+                      this.$store.dispatch('loadUserInfo')
+                    })
+                  })
+              })
+          }
+        }
       }
       }
     }
     }
   }
   }

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

@@ -305,7 +305,7 @@
     watch: {
     watch: {
       enterpriseData: function (val, oldVal) {
       enterpriseData: function (val, oldVal) {
         if (val !== {}) {
         if (val !== {}) {
-          this.businessLicenseUrl = val.url || ''
+          this.businessLicenseUrl = val.url || val.businessCodeImage || ''
 //          this.defaultBusinessUrl = val.enBussinessCodeImage || ''
 //          this.defaultBusinessUrl = val.enBussinessCodeImage || ''
         }
         }
       },
       },

+ 1 - 0
pages/register-saler/index.vue

@@ -83,6 +83,7 @@
     color: #555;
     color: #555;
     text-align: center;
     text-align: center;
     position: relative;
     position: relative;
+    cursor: default!important;
   }
   }
   .step-menu ul li:hover{
   .step-menu ul li:hover{
     cursor: pointer;
     cursor: pointer;