Browse Source

fix: 不是大会员跳转到工作台首页

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 4 months ago
parent
commit
007878be39

+ 13 - 3
apps/bigmember_pc/src/views/vipsubscribe/components/Contrast.vue

@@ -241,6 +241,8 @@
 </template>
 
 <script>
+import { mapState } from 'vuex'
+
 export default {
   name: 'Contrast',
   data() {
@@ -252,6 +254,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapState('user', ['info'])
+  },
   mounted() {
     setTimeout(this.calcStickyNav, 100)
     this.$refs.stickyHeader.windowScrollStickyEventCallback
@@ -259,9 +264,14 @@ export default {
   },
   methods: {
     goBuyMember() {
-      this.$router.push({
-        path: '/big/pc/page/buy_commit'
-      })
+      if (this.info && this.info.memberStatus) {
+        location.href = '/page_workDesktop/work-bench/app/big/workspace/dashboard'
+      }
+      else {
+        this.$router.push({
+          path: '/big/pc/page/buy_commit'
+        })
+      }
     },
     calcStickyNav() {
       const offset = $(this.$refs.main).offset()

+ 8 - 1
apps/mobile/src/views/order/components/vipsubscribe/Introduction.vue

@@ -50,6 +50,7 @@ export default {
   }),
   computed: {
     ...mapState('createOrder', ['isShowGiftNotice']),
+    ...mapState('user', ['power']),
     ...mapGetters('user', ['userIdentityType']),
     isShowGift() {
       return (
@@ -85,7 +86,13 @@ export default {
       this.$router.push('/common/vipsubscribeRights')
     },
     goBuyMember() {
-      this.$router.push('/order/create/bigmember?meal=sj')
+      console.log(this.power, 'power')
+      if (this.power && !this.power.memberStatus) {
+        this.$router.push('/tabbar/home')
+      }
+      else {
+        this.$router.push('/order/create/bigmember?meal=sj')
+      }
     },
     goViewrights() {
       this.$router.push('/common/vipsubscribeRights')