Pārlūkot izejas kodu

feat: 逻辑调整

zhangyuhan 3 gadi atpakaļ
vecāks
revīzija
f70a4407d7

+ 10 - 8
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -33,19 +33,18 @@ var subNode = new Vue({
       }
       this.switchShow()
       this.switehAjax()
-      this.getUserSubscribe()
     },
-    mounted () { 
+    mounted () {
         // this.userAreaNum = 0
         // this.userType = true
         // this.userAreaAllNum = 1
     },
     methods: {
-        // 省份订阅包续费 
+        // 省份订阅包续费
         renewBtn: function () {
             location.href = '/jyapp/areaPack/page/buy?type=renew'
         },
-        // 省份订阅包升级 
+        // 省份订阅包升级
         updateBtn: function () {
             location.href = '/jyapp/areaPack/page/buy?type=upgrade&area=' +  encodeURIComponent(JSON.stringify(this.freeUserArea))
         },
@@ -144,7 +143,10 @@ var subNode = new Vue({
                     console.log(res)
                     if(res.data) {
                         _this.vSwitch = res.data.vt || 'f'
+                        // f 免费 m 大会员 v 超级订阅
                         if (_this.vSwitch === 'f') {
+                            // 判断是否购买省份订阅包
+                            _this.getUserSubscribe()
                             $('.update_renew').hide()
                         }
                         if(res.data.vt == 'm') {
@@ -334,7 +336,7 @@ $(function () {
               } else if (switchProduct == 'free') {
                 subNode.initData = r.data
               } else {
-                res = resObj
+                res = r
               }
           }
           if(!res.data.industry) {
@@ -640,12 +642,12 @@ $(function () {
       checkmerge(state.industry, state.isread)
       // init 已选择的区域和行业
       // var selectedAreaAndInd = getBuySet(state.area, state.industry);
-      // 2021-5-21修改 初始化已选择的区域和行业 
+      // 2021-5-21修改 初始化已选择的区域和行业
       var selectedAreaAndInd = getSelectBuyset(state.area, state.industry)
       setSelectedAreaAndInd(selectedAreaAndInd);
       // 初始化,已购买的城市和行业
-        // setBuyAreaAndInd(state.buyset);
-      
+      setBuyAreaAndInd(state.buyset);
+
       //是否提示即将到期
       showTimeOut(state.endTime, state.isTrial);
       selectTime = sessionStorage.getItem("vip_change_time");