浏览代码

fix: 修复省份订阅包-免费用户设置

zhangyuhan 3 年之前
父节点
当前提交
1d8771e812

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

@@ -332,7 +332,7 @@
           </li>
         </ul>
         <!-- 升级 -->
-        <div class="update_renew">
+        <div class="update_renew" v-if="thisvSwitch === 'v'">
           <div class="update-tips" data-update-tips>因系统升级,已购买用户可选择原套餐续费,或升级到新版本享受更多权益。</div>
           <div class="footer-button-group j-button-group">
             <button class="j-button-confirm" data-bind-renew>续费</button>

+ 19 - 8
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -305,7 +305,7 @@ var subComponent = {
       this.iosBackRefresh()
     },
     // 判断用户权限
-    
+
     // 设置区域
     setArea: function() {
       let _this = this
@@ -513,6 +513,11 @@ var subComponent = {
       $iosActionsheet.removeClass('weui-actionsheet_toggle');
       $('.match-keywords-actionsheet').hide()
       $iosMask.fadeOut(200);
+      // 免费用户
+      if (this.thisvSwitch === 'f') {
+        return
+      }
+      // 超级订阅升级提示
       if(update_renew) {
         if(this.accStatus == 2) {
           update_renew.hide()
@@ -552,6 +557,11 @@ var subComponent = {
         }
         location.href = href
       } else {
+
+        if (this.vSwitch === 'f') {
+          return this.hideActionSheet()
+        }
+
         if(_this.accStatus == 2) {
           vswitch = 'm'
         } else if(_this.accStatus == 1)  {
@@ -641,6 +651,7 @@ var subComponent = {
     },
     // 修改地区无次数点击事件
     userNumOver: function () {
+      var _this = this
       if (this.vSwitch === 'f' && this.userAreaNum === 0) {
         this.linkobj.area = 'javascript:;'
         if (this.userAreaAllNum > 0) {
@@ -655,9 +666,9 @@ var subComponent = {
                 label: '取消',
                 type: 'default'
             },{
-              label: this.userType ? '去升级' : '去购买',
+              label: _this.userType ? '去升级' : '去购买',
               onClick: function(){
-                if (this.userType) {
+                if (_this.userType) {
                   if (location.href.indexOf('front') !== -1) {
                     var href = '/areaPack/wx/page/buy?type=upgrade'
                   } else {
@@ -674,7 +685,7 @@ var subComponent = {
               }
             }]
         });
-      } 
+      }
       else {
         // this.linkobj.area = '/jyapp/big/page/set_area?callback=setting_save'
         if (this.vSwitch === 'f') {
@@ -711,7 +722,7 @@ var subComponent = {
         } else {
           location.href = '/jyapp/vipsubscribe/toSetInfoTypePage'
         }
-        
+
       }
     },
     // 重置信息类型
@@ -783,7 +794,7 @@ var subComponent = {
               _this.userAreaNum = res.data.areanum
               _this.userType = res.data.provincenum === 0 ? false : true
               _this.userAreaAllNum = res.data.provincenum
-              _this.initdata.infotype = res.data.infotype || [] 
+              _this.initdata.infotype = res.data.infotype || []
               _this.info.infoType = _this.initdata.infotype.join('、')
               // _this.$emit('UserSubscribe',res)
 
@@ -839,7 +850,7 @@ var subComponent = {
         _this.backTipShowCount++
       })
     },
-    // 
+    //
     // 最近三个月推送结果预览总数
     getResultView: function () {
       let keyArr = []
@@ -959,4 +970,4 @@ var custom = {
       })
   }
 }
-setInfoTypeFn.init()
+setInfoTypeFn.init()