Browse Source

手机企业切换逻辑

yangc 8 years ago
parent
commit
14abe36ed9
1 changed files with 7 additions and 1 deletions
  1. 7 1
      pages/mobile/user/index.vue

+ 7 - 1
pages/mobile/user/index.vue

@@ -147,7 +147,13 @@
       switchEnterprise (en) {
         this.showEnterpriseToggle = false
         this.$http.get(`/user/authentication/${en.uu}`).then(() => {
-          this.$store.dispatch('loadUserInfo')
+          this.$store.dispatch('loadUserInfo').then(() => {
+            if (this.userType === 'saler') {
+              this.$router.push('/mobile/user?type=buyer')
+            } else {
+              this.reloadData()
+            }
+          })
         })
       },
       setShowEnterpriseToggle (flag, e) {