shish il y a 2 mois
Parent
commit
ac5584137c
1 fichiers modifiés avec 16 ajouts et 1 suppressions
  1. 16 1
      ghsApp/src/admin/shop/renew.vue

+ 16 - 1
ghsApp/src/admin/shop/renew.vue

@@ -167,7 +167,10 @@ export default {
         }
     },
     computed: {
-        ...mapGetters({ dictInfo: 'getDictionariesInfo' }),
+        ...mapGetters({
+            dictInfo: 'getDictionariesInfo',
+            loginInfo: 'getLoginInfo',
+        }),
         isLifetimeSelected() {
             const m = {
                 lt8800: this.lt8800,
@@ -225,6 +228,14 @@ export default {
         selectPkg(pkg) {
             this.selectedKey = pkg.key
         },
+        notLogin() {
+            return this.$util.isEmpty(this.loginInfo.admin) || this.loginInfo.admin.currentGhsShopId == 0
+        },
+        remindLogin() {
+            this.$util.confirmModal({ content: '没有登录,请先登录', okText: '登录' }, () => {
+                this.pageTo({ url: '/admin/home/login' })
+            })
+        },
         buySelected() {
             const map = {
                 lt8800: this.lt8800,
@@ -242,6 +253,10 @@ export default {
             })
             // #endif
             // #ifdef MP-WEIXIN
+            if (this.notLogin()) {
+                this.remindLogin()
+                return
+            }
             this.startRenew(p.renewType, p.renewPrice)
             // #endif
         },