浏览代码

订阅设置组件修改

TANGSHIZHE 4 年之前
父节点
当前提交
c161ef1cbd

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_introduce.css

@@ -161,7 +161,7 @@ html,body {
 }
 
 .vip_introduce .main .banner {
-  padding-top: 6.2rem;
+  padding-top: 7.2rem;
   width: 100%;
   min-height: 16.88rem;
   background: url(/jyapp/vipsubscribe/image/vip_intro_bg-1@2x.jpg?v=51430) no-repeat top center;

+ 5 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js

@@ -109,7 +109,11 @@ $(function () {
             if (areaData.data.isTrial) {
                 $(".result-selected .info-tip").text("已超出现订单购买范围,需购买");
             }
-            $(".result-selected .info-tip").show();
+            if(getParam('subvip') ==  'free') {
+                $(".result-selected .info-tip").hide();
+            } else {
+                $(".result-selected .info-tip").show();
+            }
         } else {
             $(".result-selected .info-tip").hide();
         }

+ 5 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_industry.js

@@ -42,7 +42,9 @@ function initData() {
     /* 已购买过的行业 */
     if (buyCount == -1) {
         $('.result_name').html('全部行业')
-        $('.alr_purchase').hide()
+        if(data.data.buyset.upgrade == 1) {
+          $('.alr_purchase').hide()
+        }
     } else {
         $('.result_name').html(buyCount + '个行业')
     }
@@ -117,7 +119,8 @@ function resultCount() {
             }
         }else {
           if(switch_other) {
-            $('.result_count').html('未分类行业');
+            $('.switch_other').removeClass('active')
+            // $('.result_count').html('未分类行业');
           } else {
             $('.result_count').html("");
           }

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

@@ -948,7 +948,7 @@ var keySetDetail = new Vue({
       })
     },
     toVipPage: function () {
-      location.href = '/jyapp/vipsubscribe/introducePage'
+      location.href = '/jyapp/vipsubscribe/introducePage?typeinfo=free'
     },
     // 显示关键词输入提示
     showKeyWordRegErrorToast: function (type) {

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

@@ -12,7 +12,7 @@ var subNode = new Vue({
                 keyword: '/jyapp/vipsubscribe/toSetKeyWordPage',
                 infotype: '/jyapp/vipsubscribe/toSetInfoTypePage',
                 resultview: '/jyapp/vipsubscribe/toVIPViewPage',
-                pushsetting: '/jyapp/big/page/push_settings'
+                pushsetting: '/jyapp/big/page/push_setting_detail?header=超级订阅推送设置&type=super_subscribe'
             },
             initData: {}
         }

+ 27 - 21
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html

@@ -53,14 +53,14 @@
                         <div class="active-r-text">4、此活动最终解释权归剑鱼标讯所有。</div>
                     </div>
                 </div>
-                <div class="setaction">
+                <div class="setaction" v-show="!compShow">
                     <sub-component type="introduce" :linkobj="linkObj" :initdata="initData"></sub-component>
                 </div>
-                <!-- <div class="group-title">
+                <div class="group-title" v-show="compShow">
                     <span class="title-text line-title">超级订阅服务特权</span>
                     <span class="title-bg-text">DINGYUEFUWU</span>
                 </div>
-                <div class="group-content grid">
+                <div class="group-content grid" v-show="compShow">
                     <span class="grid-item">
                         <span class="circle-icon circle-icon-1"></span>
                         <p class="item-desc">最多 300 组关键词</p>
@@ -85,7 +85,7 @@
                         <span class="circle-icon circle-icon-6"></span>
                         <p class="item-desc">搜索全国超七千万企业</p>
                     </span>
-                </div> -->
+                </div>
             </div>
             <div class="comparison group">
                 <div class="group-title">
@@ -214,7 +214,8 @@
                     resultview: '/jyapp/vipsubscribe/toVIPViewPage',
                     pushsetting: '/jyapp/big/page/push_settings'
                 },
-                initData: {}
+                initData: {},
+                compShow: true
             }
         },
         created () {
@@ -222,23 +223,28 @@
         },
         methods: {
             getUserInfo: function() {
-                let _this = this
-                $.ajax({
-                    type: 'POST',
-                    url: '/subscribepay/vipsubscribe/getSubBuyMsg',
-                    success:function(res) {
-                        if(res.success) {
-                            _this.initData = res.data
-                            let proArea = res.data.area
-                            Object.keys(proArea).forEach(function(item, index) {
-                                if(proArea[item].length !== 0) {
-                                    proArea[item] = []
-                                }
-                            })
-                            sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                let _this = this;
+                let typeinfo = getParam('typeinfo')
+                if (typeinfo) {
+                    $('.vip_introduce .main .banner').css({'padding-top': '6.2rem'})
+                    _this.compShow = false
+                    $.ajax({
+                        type: 'POST',
+                        url: '/subscribepay/vipsubscribe/getSubBuyMsg',
+                        success:function(res) {
+                            if(res.success) {
+                                _this.initData = res.data
+                                let proArea = res.data.area
+                                Object.keys(proArea).forEach(function(item, index) {
+                                    if(proArea[item].length !== 0) {
+                                        proArea[item] = []
+                                    }
+                                })
+                                sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                            }
                         }
-                    }
-                })
+                    })
+                }
             }
         }
     })

+ 2 - 0
src/web/staticres/common-module/vipsubscribe/css/vip-subscribe-set-template.css

@@ -287,6 +287,7 @@
   border-radius: 12px 12px 0 0;
   background-color: #fff;
   overflow-x: hidden;
+  z-index: 9999;
 }
 
 #iosActionsheet .weui-actionsheet__title:before{
@@ -351,6 +352,7 @@
   /* left: .72rem;
   right: .72rem; */
   border-radius: .16rem;
+  left: .72rem;
 }
 
 .jy-alert .weui-dialog__hd .weui-dialog__title {

+ 29 - 26
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -37,7 +37,7 @@ var subScribeTemplate = `
           <span class="item-label">关键词</span>
         </span>
         <span class="item-r">
-          <span class="keywords-text ellipsis">未分类</span>
+          <span class="keywords-text ellipsis">请设置关键词</span>
           <span class="iconfont icon-arrow"></span>
         </span>
       </div>
@@ -174,10 +174,10 @@ var subComponent = {
   data: function() {
     return {
       info: {
-        area: '',
-        industry: '',
+        area: '请选择区域',
+        industry: '请选择采购单位行业',
         defaultVal: '按标题匹配',
-        infoType: '全部类型'
+        infoType: '请选择信息类型'
       },
       // 匹配方式
       active: 1,
@@ -236,6 +236,8 @@ var subComponent = {
           }
           _this.info.area = proStr
         }
+      } else {
+        this.info.area = '请选择区域'
       }
     },
     // 设置行业
@@ -245,8 +247,10 @@ var subComponent = {
         if(this.initdata.industry.length == 0) {
           this.info.industry = '全部行业'
         } else {
-          this.info.industry = this.initdata.industry + ''
+          this.info.industry = this.initdata.industry.join('、')
         }
+      } else {
+        this.info.industry = '请选择采购单位行业'
       }
     },
     // 设置关键词
@@ -255,7 +259,7 @@ var subComponent = {
       if(state) {
         if(state.items) {
           if (state.items.length === 0) {
-            $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')
+            $('.body-item.keywords .keywords-text').text('请设置关键词')
           } else {
               var arr = []
               state.items.forEach(function (item, index) {
@@ -266,7 +270,7 @@ var subComponent = {
           }
         }
       } else {
-        $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')
+        $('.body-item.keywords .keywords-text').text('请设置关键词')
       }
     },
     // 信息类型
@@ -278,27 +282,30 @@ var subComponent = {
           } else {
             this.info.infoType = this.initdata.infotype.join('、')
           }
+        } else {
+          this.info.infoType = '请选择信息类型'
         }
       }
     },
     // 项目匹配
     getProjectMatch: function() {
-      if (this.initdata.projectmatch) {
+      console.log(this.initdata.projectmatch)
+      if (this.initdata.projectmatch == 1) {
         $('.switch').addClass('checked')
+        this.checkedflag = true
       } else {
           $('.switch').removeClass('checked')
+          this.checkedflag = false
       }
     },
     switchs: function() {
       // switch点击切换
-      var $this = $(this);
-      var hasChecked = this.checkedflag;
-      console.log(hasChecked)
-      if (!hasChecked) {
-          this.checkedflag = true;
+      console.log(this.checkedflag)
+      if (!this.checkedflag) {
+          this.checkedflag = !this.checkedflag;
           this.setprojectmatch(1);
       } else {
-        this.checkedflag = false;
+        this.checkedflag = !this.checkedflag;
           this.setprojectmatch(0);
           weui.toast('项目匹配已关闭', {
               duration: 1500,
@@ -312,18 +319,14 @@ var subComponent = {
     setprojectmatch(index) {
       console.log(this.checkedflag)
       let _this = this
-      if (this.checkedflag) {
-        this.checkedflag = false;
-        $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
-            if (r.flag) {
-              var subVipState = sessionStorage.getItem('sub_vip_state');
-              var reqData = JSON.parse(subVipState);
-              _this.checkedflag = true;
-              reqData.projectmatch = index;
-              sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
-            }
-        })
-      }
+      $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
+        if (r.flag) {
+          var subVipState = sessionStorage.getItem('sub_vip_state');
+          var reqData = JSON.parse(subVipState);
+          reqData.projectmatch = index;
+          sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
+        }
+      })
     },
     // 关键词匹配方式
     getActionDefault: function() {

+ 1 - 1
src/web/staticres/vipsubscribe/css/vip_introduce.css

@@ -161,7 +161,7 @@ html,body {
 }
 
 .vip_introduce .main .banner {
-  padding-top: 6.2rem;
+  padding-top: 7.2rem;
   width: 100%;
   min-height: 16.88rem;
   background: url(/vipsubscribe/image/vip_intro_bg-1@2x.jpg?v=51430) no-repeat top center;

+ 5 - 1
src/web/staticres/vipsubscribe/js/change_area.js

@@ -109,7 +109,11 @@ $(function () {
             if (areaData.data.isTrial) {
                 $(".result-selected .info-tip").text("已超出现订单购买范围,需购买");
             }
-            $(".result-selected .info-tip").show();
+            if(getParam('subvip') ==  'free') {
+                $(".result-selected .info-tip").hide();
+            } else {
+                $(".result-selected .info-tip").show();
+            }
         } else {
             $(".result-selected .info-tip").hide();
         }

+ 8 - 2
src/web/staticres/vipsubscribe/js/change_industry.js

@@ -42,7 +42,9 @@ function initData() {
     /* 已购买过的行业 */
     if (buyCount == -1) {
         $('.result_name').html('全部行业')
-        $('.alr_purchase').hide()
+        if(data.data.buyset.upgrade == 1) {
+          $('.alr_purchase').hide()
+        }
     } else {
         $('.result_name').html(buyCount + '个行业')
     }
@@ -100,8 +102,8 @@ function resultCount() {
         } else {
             $('.update_tips').hide();
         }
+        let switch_other = $('.switch_other').hasClass('active')
         if(count>0){
-          let switch_other = $('.switch_other').hasClass('active')
             if(canChangeArr.length > 15) {
               if(switch_other) {
                 $('.result_count').html(count + '个行业' + '(' + canChangeArr.slice(0, 15).join('、') + '等' + ')' + ',未分类行业');
@@ -116,7 +118,11 @@ function resultCount() {
               }
             }
         }else {
+          if(switch_other) {
+            $('.switch_other').removeClass('active')
+          } else {
             $('.result_count').html("");
+          }
         }
 
         if ($('.list').find('.industry_item.active:not(.whole)').length === 0) {

+ 1 - 1
src/web/staticres/vipsubscribe/js/keyset-detail.js

@@ -960,7 +960,7 @@ var keySetDetail = new Vue({
       })
     },
     toVipPage: function () {
-      location.href = '/front/vipsubscribe/introducePage'
+      location.href = '/front/vipsubscribe/introducePage?typeinfo=free'
     },
     // 显示关键词输入提示
     showKeyWordRegErrorToast: function (type) {

+ 1 - 1
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -12,7 +12,7 @@ var subNode = new Vue({
                 keyword: '/front/vipsubscribe/toSetKeyWordPage',
                 infotype: '/front/vipsubscribe/toSetInfoTypePage',
                 resultview: '/front/vipsubscribe/toVIPViewPage',
-                pushsetting: '/front/setting/push'
+                pushsetting: '/front/setting/push_detail?header=超级订阅推送设置&type=super_subscribe'
             },
             initData: {}
         }

+ 36 - 20
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -48,14 +48,14 @@
                         <div class="active-r-text">4、此活动最终解释权归剑鱼标讯所有。</div>
                         </div>
                     </div>
-                    <div class="setaction">
+                    <div class="setaction" v-show="!compShow">
                         <sub-component type="introduce" :linkobj="linkObj" :initdata="initData"></sub-component>
                     </div>
-                    <!-- <div class="group-title">
+                    <div class="group-title" v-show="compShow">
                         <span class="title-text line-title">超级订阅服务特权</span>
                         <span class="title-bg-text">DINGYUEFUWU</span>
                     </div>
-                    <div class="group-content grid">
+                    <div class="group-content grid" v-show="compShow">
                         <span class="grid-item">
                             <span class="circle-icon circle-icon-1"></span>
                             <p class="item-desc">最多 300 组关键词</p>
@@ -80,7 +80,7 @@
                             <span class="circle-icon circle-icon-6"></span>
                             <p class="item-desc">搜索全国超七千万企业</p>
                         </span>
-                    </div> -->
+                    </div>
                 </div>
                 <div class="comparison group">
                     <div class="group-title">
@@ -210,7 +210,8 @@
                         resultview: '/front/vipsubscribe/toVIPViewPage',
                         pushsetting: '/front/vipsubscribe/toSetPushSetPage'
                     },
-                    initData: {}
+                    initData: {},
+                    compShow: true
                 }
             },
             created () {
@@ -219,22 +220,37 @@
             methods: {
                 getUserInfo: function() {
                     let _this = this
-                    $.ajax({
-                        type: 'POST',
-                        url: '/subscribepay/vipsubscribe/getSubBuyMsg',
-                        success:function(res) {
-                            if(res.success) {
-                                _this.initData = res.data
-                                let proArea = res.data.area
-                                Object.keys(proArea).forEach(function(item, index) {
-                                    if(proArea[item].length !== 0) {
-                                        proArea[item] = []
-                                    }
-                                })
-                                sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                    let typeinfo = _this.getParam('typeinfo')
+                    if(typeinfo) {
+                        $('.vip_introduce .main .banner').css({'padding-top': '6.2rem'})
+                        _this.compShow = false
+                        $.ajax({
+                            type: 'POST',
+                            url: '/subscribepay/vipsubscribe/getSubBuyMsg',
+                            success:function(res) {
+                                if(res.success) {
+                                    _this.initData = res.data
+                                    let proArea = res.data.area
+                                    Object.keys(proArea).forEach(function(item, index) {
+                                        if(proArea[item].length !== 0) {
+                                            proArea[item] = []
+                                        }
+                                    })
+                                    sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                                }
                             }
-                        }
-                    })
+                        })
+                    }
+                },
+                getParam(name) {
+                    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+                    var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
+                    var context = "";
+                    if (r != null)
+                        context = r[2];
+                    reg = null;
+                    r = null;
+                    return context == null || context == "" || context == "undefined" ? "" : context;
                 }
             }
         })