Parcourir la source

fix: 微信端旧版订阅管理设置更新弹窗提示

熊啸云 il y a 3 ans
Parent
commit
e8ef61db5d

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyset-list.js

@@ -411,7 +411,7 @@ var keySet = new Vue({
     updateJump: function () {
       this.tipsType = false
       // location.replace('/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=v')
-      location.replace('/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=m')
+      location.replace('/jyapp/vipsubscribe/toSubVipSetPage')
     },
   }
 })

+ 28 - 2
src/web/staticres/vipsubscribe/js/keyset-list.js

@@ -138,7 +138,9 @@ var keySet = new Vue({
     // 关键词数组
     keyList: [],
     loading: '',
-    swiper: ''
+    swiper: '',
+    userNewType: false, // 1为新用户.0为老用户
+    tipsType: false // 提示升级弹窗状态
   },
   computed: {
     reverseList: function () {
@@ -150,6 +152,7 @@ var keySet = new Vue({
   created: function () {
     this.getKeyList()
     sessionStorage.removeItem('free-keyset-detail')
+    this.getUserType()
   },
   mounted: function () {
     pTools.iosBackRefresh()
@@ -358,7 +361,11 @@ var keySet = new Vue({
       if (index === -1) {
         index = this.keyList.length
       }
-      location.href = '/wxkeyset/keyset/filterset?type=' + type + '&index=' + index
+      if (!this.userNewType) {
+        this.tipsType = true
+      } else {
+        location.href = '/wxkeyset/keyset/filterset?type=' + type + '&index=' + index
+      }
     },
     // 调整底部按钮距离
     adjustAddButtonPadding: function () {
@@ -377,6 +384,25 @@ var keySet = new Vue({
         }
       }
     },
+    // 获取用户权限
+    getUserType: function () {
+      let _this = this
+      $.ajax({
+          url: '/bigmember/use/isAdd',
+          type: 'POST',
+          success: function (res) {
+              _this.userNewType = res.data.isUpgrade
+          }
+      })
+    },
+    hiddenTips: function () {
+      this.tipsType = false
+    },
+    updateJump: function () {
+      this.tipsType = false
+      // location.replace('/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=v')
+      location.replace('/front/vipsubscribe/toSubVipSetPage')
+    },
     // 清除订阅页面缓存
     clearHistoryPushDataCache: function () {
       sessionStorage.removeItem('historypushDataCache')

+ 71 - 0
src/web/templates/weixin/wxkeyset/index.html

@@ -23,6 +23,66 @@
     <script>
         initShare({{.T.signature }}, {{.T.openid }}, 2, "jy_extend", {{.T.nickname }}, {{.T.avatar }});
     </script>
+    <style>
+        .oldUserTips{
+            position: fixed;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+            z-index: 99999;
+            background-color:rgba(0, 0, 0, 0.7);
+        }
+        .updateTips-wrap{
+            width: 6.06rem;
+            height: 3.4rem;
+            background: #FFFFFF;
+            border-radius: 0.16rem 0.16rem 0.16rem 0.16rem;
+            position: absolute;
+            top: 50%;
+            left: 50%;
+            transform: translateX(-50%) translateY(-50%);
+        }
+        .updateTips-title{
+            text-align: center;
+            padding-top: 0.48rem;
+            font-size: 0.36rem;
+            font-weight: 500;
+            color: #161826;
+        }
+        .updateTips-text{
+            text-align: center;
+            padding: 0.16rem 0.6rem 0;
+            font-size: 0.3rem;
+            font-weight: 500;
+            color: #5E5E64;
+        }
+        .updateTips-btnWrap{
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 0.32rem;
+            border-top:0.02rem solid rgba(0, 0, 0, 0.1) ;
+        }
+        .updateTips-btn{
+            font-size: 0.36rem;
+            font-weight: 500;
+            color: #161826;
+            width: 50%;
+            height: 0.92rem;
+            line-height: 0.92rem;
+            text-align: center;
+            cursor: pointer;
+        }
+        .updateTips-line{
+            height: 0.92rem;
+            width: 0.02rem;
+            background-color: rgba(0, 0, 0, 0.1);
+        }
+        .levelUp{
+            color: #2ABDD1;
+        }
+    </style>
 </head>
 
 <body>
@@ -90,6 +150,17 @@
                 <a class="remind-right" href="/front/vipsubscribe/introducePage" id="app-keyset-footer-banner">了解详情</a>
             </div>
         </div>
+        <div class="oldUserTips" v-show="tipsType">
+            <div class="updateTips-wrap">
+                <div class="updateTips-title">版本更新</div>
+                <div class="updateTips-text">免费订阅新版来了,请前往订阅设置更新功能后使用。</div>
+                <div class="updateTips-btnWrap">
+                    <div class="updateTips-btn" id="cancel" @click="hiddenTips">取消</div>
+                    <div class="updateTips-line"></div>
+                    <div class="updateTips-btn levelUp" id="newLevelUp"  @click="updateJump">立即升级</div>
+                </div>
+            </div>
+        </div>
     </div>
     <script>
         // 双11活动文案修改