瀏覽代碼

Merge branch 'release4.7.10' of http://192.168.3.207:8080/qmx/jy into release4.7.10

tsz 3 年之前
父節點
當前提交
1db8b1d2bc
共有 1 個文件被更改,包括 24 次插入9 次删除
  1. 24 9
      src/web/staticres/vipsubscribe/js/vip_index_new.js

+ 24 - 9
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -22,11 +22,22 @@ var subNode = new Vue({
             subscribeTime: '', // 用户订阅的时间
             vSwitch:'', // 用户版本权限
             freeUserArea: {}, // 购买省份订阅包的用户所选择的地区
-            isNewVip: 0
+            isNewVip: 0,
+            vipStatus: 0
         }
     },
     created () {
-
+      var _this = this
+      $.ajax({
+        url: '/bigmember/use/isAdd?t=' + Date.now(),
+        type: 'POST',
+        success: function (res) {
+          console.log(res)
+          if (res) {
+            _this.vipStatus = res.data.vipStatus
+          }
+        }
+      })
     },
     mounted () {
         this.getUserType()
@@ -96,7 +107,17 @@ var subNode = new Vue({
                 type: 'POST',
                 url: '/publicapply/subscribe/vipSwitch',
                 success: function(res) {
-                    if (res.data.vt !== 'v' && res.data.vt !=='m') {
+                    // 微信端暂无大会员订阅设置
+                    // 暂无切换用户身份(大会员or超级订阅)
+                    // 现只需判断用户身份是不是超级订阅(同时是超级订阅、大会员),是显示超级订阅设置,非则显示免费用户订阅设置
+                    // 下版本微信端完成大会员功能后 再判断切换的是哪个身份
+                    if (_this.vipStatus > 0) {
+                        _this.vSwitch = 'v'
+                        document.title = '订阅管理-超级订阅'
+                        $('.update_renew').show()
+                        $('.super-title').show();
+                        window.getDataWitXHR()
+                    } else {
                         _this.vSwitch = 'f'
                         _this.linkObj.pushsetting = _this.linkObj.freepush
                         _this.linkObj.resultview = '/front/vipsubscribe/toVIPViewPage?vSwitch=f',
@@ -105,12 +126,6 @@ var subNode = new Vue({
                         $('.super-title').text('订阅管理-免费订阅');
                         $('.super-title').css('background', 'none')
                         _this.getUserSubscribe()
-                    } else {
-                        _this.vSwitch = 'v'
-                        document.title = '订阅管理-超级订阅'
-                        $('.update_renew').show()
-                        $('.super-title').show();
-                        window.getDataWitXHR()
                     }
                 }
             })