Browse Source

个人账户跳转至开店页面

yangc 7 years ago
parent
commit
690e5dabdb
1 changed files with 14 additions and 10 deletions
  1. 14 10
      plugins/mixin.js

+ 14 - 10
plugins/mixin.js

@@ -95,16 +95,20 @@ Vue.mixin({
     },
     goStoreApply: function () {
       if (this.user.logged) {
-        this.$http.get('/basic/vendor/transactionInfo').then(response => {
-          if (response.data.isOpenStore) {
-            window.location.href = '/vendor#/store/maintain'
-          } else {
-            window.location.href = '/vendor#/store-apply'
-          }
-        }, err => {
-          this.$message.error('该账户未开通卖家中心')
-          console.log(err)
-        })
+        if (this.user.data.enterprise.uu) {
+          this.$http.get('/basic/vendor/transactionInfo').then(response => {
+            if (response.data.isOpenStore) {
+              window.location.href = '/vendor#/store/maintain'
+            } else {
+              window.location.href = '/vendor#/store-apply'
+            }
+          }, err => {
+            this.$message.error('该账户未开通卖家中心')
+            console.log(err)
+          })
+        } else {
+          this.$router.push('/personalMaterial')
+        }
       } else {
         this.login()
       }