瀏覽代碼

fix:移动端超级订阅管理页面订阅周期跳转逻辑

yangfeng 3 年之前
父節點
當前提交
c45b5a37a5

+ 11 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -127,6 +127,17 @@ var subNode = new Vue({
         this.subInfoAjax = '/publicapply/free/subscribe'
       }
     },
+    // 点击订阅周期事件
+    toSubCycle () {
+      console.log(this.vipLink, subNode.isNewVip)
+      let swipro = sessionStorage.getItem('switch-product')
+      // 如果是老超级订阅者用户提示升级到新版超级订阅再续费
+      if (swipro && swipro == 'supervip' && subNode.isNewVip != 1) {
+        $('[data-update-tips]').show()
+      } else {
+        location.href = this.vipLink
+      }
+    },
     // 是否显示切换图标
     switchShow () {
       var _this = this

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_index_new.html

@@ -268,7 +268,7 @@
             </a>
             <ul class="sub-info" :class="vSwitch !== 'm' && vSwitch !== 'v' ? 'go_to_levelup' : ''" @click="toPaySupSub" style="min-height: 1.48rem">
               <li class="cycle" v-show="vSwitch == 'm' || vSwitch == 'v'">
-                <a class="item-container" :href="vipLink">
+                <a class="item-container" @click="toSubCycle" href="javascript:;">
                   <div class="item">
                     <span class="item-l">
                       <span class="item-label">订阅周期</span>

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

@@ -35,6 +35,15 @@ var subNode = new Vue({
         })
     },
     methods: {
+        // 点击订阅周期事件
+        toSubCycle () {
+          // 如果是老超级订阅者用户提示升级到新版超级订阅再续费
+          if (this.vSwitch == 'v' && this.isNewVip != 1) {
+            $('[data-update-tips]').show()
+          } else {
+            location.href = '/jy_mobile/common/order/create/svip?type=renew'
+          }
+        },
         superOrderTemplateMounted () {
             $('#pushResultPreview').attr('data-cl-event', 'c_wx_preview_buttonclick')
         },

+ 1 - 1
src/web/templates/weixin/vipsubscribe/vip_index_new.html

@@ -164,7 +164,7 @@
                 </a>
             </li> -->
             <li class="cycle" data-bind-renew data-cl-event="c_wx_buy_buttonclick" v-show="vSwitch === 'v'">
-                <a class="item-container" href="/jy_mobile/common/order/create/svip?type=renew">
+                <a class="item-container" @click="toSubCycle" href="javascript:;">
                     <div class="item">
                       <span class="item-l">
                         <span class="item-label">订阅周期</span>