Bladeren bron

免费用户逻辑修改

TANGSHIZHE 4 jaren geleden
bovenliggende
commit
0b15220270

+ 3 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/messageType.html

@@ -203,6 +203,9 @@
         }
         //
         function inputHtml(infoTypeData){
+            if(typeof(infoTypeData) == 'string') {
+                infoTypeData = infoTypeData.split('、')
+            }
             for (var i = infoTypeData.length - 1; i >= 0; i--) {
                 $(".list ul li dl dd").each(function(index){
                     if($(this).text()==infoTypeData[i]){

+ 4 - 13
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html

@@ -192,6 +192,7 @@
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/vipsubscribe/js/vip-subscribe-set-template.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/land-page-coupon.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/utils.js?v={{Msg "seo" "mod_version"}}'></script>
 <script>
     $("#vip-introduce,#vip-free-7days").on('click', function () {
         window.location.replace($(this).attr('data-url'))
@@ -220,7 +221,7 @@
         },
         created () {
           this.getUserInfo()  
-          this.iosBackRefresh()
+          utils.iosBackRefresh()
         },
         methods: {
             getUserInfo: function() {
@@ -242,24 +243,14 @@
                                             proArea[item] = []
                                         }
                                     })
+                                    if(JSON.stringify(proArea) == '{}') return
                                     sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
                                 }
                             }
                         }
                     })
                 }
-            },
-            iosBackRefresh: function () {
-                var isPageHide = false;
-                window.addEventListener('pageshow', function () {
-                    if (isPageHide) {
-                        location.reload();
-                    }
-                });
-                window.addEventListener('pagehide', function () {
-                    isPageHide = true;
-                });
-            },
+            }
         }
     })
 </script>

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -981,7 +981,7 @@ function hasNoData() {
     }
     if(!NoDataShow) {
         if(!myInfo.haskey){
-            $('.findnull-no-key').css("display", "block").siblings('.empty').hide()
+            // $('.findnull-no-key').css("display", "block").siblings('.empty').hide()
         } else {
             $(".findnull_").css("display", "block").siblings('.empty').hide()
         }

+ 6 - 9
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -189,7 +189,6 @@ var subComponent = {
   },
   mounted () {
     this.getData()
-    this.getResultView()
   },
   watch: {
     initdata: function(newVal, oldVal) {
@@ -205,6 +204,7 @@ var subComponent = {
       this.setKeyword()
       this.getActionDefault()
       this.getIndustryType()
+      this.getResultView()
       this.getProjectMatch()
     },
     // 设置区域
@@ -216,13 +216,11 @@ var subComponent = {
         } else {
           let proStr = ''
           Object.keys(this.initdata.area).forEach(function(item,index) {
-            console.log(_this.initdata.area[item])
             if(_this.initdata.area[item].length == 0) {
               proStr += item + '、'
             } else {
               let cityStr = ''
               _this.initdata.area[item].forEach(function(data, i) {
-                console.log(data)
                 cityStr += data + '、'
               })
               if (cityStr.length > 0) {
@@ -267,8 +265,12 @@ var subComponent = {
                   arr.push(data.key[0])
                 })
               })
+              if(arr.length == 0) {
+                $('.body-item.keywords .keywords-text').text('请设置关键词')
+              } else {
+                $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')
+              }
               // $('.body-item.keywords .keywords-text').text(arr.join('、'))
-              $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')
           }
         }
       } else {
@@ -291,7 +293,6 @@ var subComponent = {
     },
     // 项目匹配
     getProjectMatch: function() {
-      console.log(this.initdata.projectmatch)
       if (this.initdata.projectmatch == 1) {
         $('.switch').addClass('checked')
         this.checkedflag = true
@@ -302,7 +303,6 @@ var subComponent = {
     },
     switchs: function() {
       // switch点击切换
-      console.log(this.checkedflag)
       if (!this.checkedflag) {
           this.checkedflag = !this.checkedflag;
           this.setprojectmatch(1);
@@ -319,7 +319,6 @@ var subComponent = {
       }
     },
     setprojectmatch(index) {
-      console.log(this.checkedflag)
       let _this = this
       $.post("/subscribepay/afterPay/setUserInfo", {pageType: "projectMatch", pmindex: index}, function (r) {
         if (r.flag) {
@@ -344,7 +343,6 @@ var subComponent = {
       }
       $('#iosActionsheet .weui-actionsheet__cell').each(function (index, item) {
         var t = $(item).children().text().trim();
-        console.log(t, defaultTitle)
         if (t == defaultTitle) {
             $(this).addClass('active')
         }
@@ -423,7 +421,6 @@ var subComponent = {
         type: 'POST',
         url: '/subscribepay/afterPay/getPushCount',
         success: function(res) {
-          console.log(res)
           if(_this.type == 'introduce') {
             _this.pushsetShow = false
             _this.resultTime = '(仅限超级订阅用户预览)'

+ 3 - 0
src/web/templates/weixin/vipsubscribe/messageType.html

@@ -155,6 +155,9 @@
 
     //
     function inputHtml(infoTypeData) {
+        if(typeof(infoTypeData) == 'string') {
+            infoTypeData = infoTypeData.split('、')
+        }
         for (var i = infoTypeData.length - 1; i >= 0; i--) {
             $(".list ul li dl dd").each(function (index) {
                 if ($(this).text() == infoTypeData[i]) {

+ 4 - 13
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -188,6 +188,7 @@
     <script src='{{Msg "seo" "cdn"}}/common-module/vipsubscribe/js/vip-subscribe-set-template.js?v={{Msg "seo" "version"}}'></script>
     <!--<script src='{{Msg "seo" "cdn"}}/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
     <script src='{{Msg "seo" "cdn"}}/js/land-page-coupon.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
     <script>
         $("*[data-need-bind-phone]").on('click', function () {
             window.location.replace($(this).attr('data-url'))
@@ -216,7 +217,7 @@
             },
             created () {
               this.getUserInfo()
-              this.iosBackRefresh()
+              utils.iosBackRefresh()
             },
             methods: {
                 getUserInfo: function() {
@@ -238,6 +239,7 @@
                                                 proArea[item] = []
                                             }
                                         })
+                                        if(JSON.stringify(proArea) == '{}') return
                                         sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
                                     }
                                 }
@@ -254,18 +256,7 @@
                     reg = null;
                     r = null;
                     return context == null || context == "" || context == "undefined" ? "" : context;
-                },
-                iosBackRefresh: function () {
-                    var isPageHide = false;
-                    window.addEventListener('pageshow', function () {
-                        if (isPageHide) {
-                            location.reload();
-                        }
-                    });
-                    window.addEventListener('pagehide', function () {
-                        isPageHide = true;
-                    });
-                },
+                }
             }
         })
     </script>