Browse Source

ios筛选问题

TANGSHIZHE 4 years ago
parent
commit
4825e0cfb0

+ 2 - 19
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -105,7 +105,6 @@ var vNode = {
         }
     },
     created: function () {
-        this.getUserRoot()
         // svip是超级订阅企业查询, 如果是超级订阅不能查看企业情报历史记录
         var svip = utils.getParam('svip')
         if (svip) {
@@ -170,24 +169,6 @@ var vNode = {
         },
     },
     methods: {
-        // 判断是否有关注企业权限
-        getUserRoot: function() {
-            let _this = this
-            $.ajax({
-            url: '/publicapply/bidcoll/power',
-            type: 'POST',
-            success: function(res) {
-                console.log(res)
-                if(!res.data.member) {
-                    _this.entInfo.followSearchFinish = false
-                    _this.entInfo.entExist = false
-                } else {
-                    _this.entInfo.followSearchFinish = true
-                    _this.entInfo.entExist = true
-                }
-            }
-            })
-        },
         showToast: function (message) {
             this.$toast({
                 duration: 1500,
@@ -441,6 +422,8 @@ var vNode = {
                             } else {
                                 _this.digshow = false
                             }
+                            _this.entInfo.followSearchFinish = true
+                            _this.entInfo.entExist = false
                         }
                         if (_this.svip || res.data.viper) {
                             _this.entInfo.followSearchFinish = true

+ 11 - 13
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -60,22 +60,20 @@ var vm = new Vue({
     var recover = this.recover()
     if (!recover) {
       this.getUserRoot()
+      setTimeout(() => {
+        // 如果订阅消息进来时间不清空
+        if(this.time !== '') {
+          sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+          this.setPushTime(this.time)
+          this.revorceOtherData()
+        }else{
+          // 清空筛选数据
+          this.revorceData()
+        }
+      })
     }
     this.addEventListerWeb()
   },
-  mounted () {
-    setTimeout(() => {
-      // 如果订阅消息进来时间不清空
-      if(this.time !== '') {
-        sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
-        this.setPushTime(this.time)
-        this.revorceOtherData()
-      }else{
-        // 清空筛选数据
-        this.revorceData()
-      }
-    })
-  },
   methods: {
     addEventListerWeb: function() {
       let _this = this

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

@@ -65,7 +65,7 @@
             font-size: 12px;
         }
         ._header .filter_tab{
-            height: .88rem;
+            /* height: .88rem; */
             /* padding-left: 16px; */
         }
         .app-layout-content-b .app-content::after{
@@ -680,24 +680,24 @@
             showPage();
         } else {
             userId = sessionStorage.userId;
-            if (window.location.href.indexOf("selectTime") < 0 && sessionStorage.getItem(userId + "_searchTime") != null && sessionStorage.getItem(userId + "_searchTime") != "") {
-                firstTime = sessionStorage.getItem(userId + "_searchTime");
-            }
-            if (sessionStorage.getItem(userId + "_selectCity") != null && sessionStorage.getItem(userId + "_selectCity") != "") {
-                selectCity = sessionStorage.getItem(userId + "_selectCity");
-            }
-            if (sessionStorage.getItem(userId + "_selectIndustry") != null && sessionStorage.getItem(userId + "_selectIndustry") != "") {
-                selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
-            }
-            if (sessionStorage.getItem(userId + "_selectCate") != null && sessionStorage.getItem(userId + "_selectCate") != "") {
-                selectCate = sessionStorage.getItem(userId + "_selectCate");
-            }
-            if (sessionStorage.getItem(userId + "_selectKeyword") != null && sessionStorage.getItem(userId + "_selectKeyword") != "") {
-                selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
-            }
-            if (sessionStorage.getItem(userId + "_selectNotice") != null && sessionStorage.getItem(userId + "_selectNotice") != "") {
-                selectNotice = sessionStorage.getItem(userId + "_selectNotice");
-            }
+            // if (window.location.href.indexOf("selectTime") < 0 && sessionStorage.getItem(userId + "_searchTime") != null && sessionStorage.getItem(userId + "_searchTime") != "") {
+            //     firstTime = sessionStorage.getItem(userId + "_searchTime");
+            // }
+            // if (sessionStorage.getItem(userId + "_selectCity") != null && sessionStorage.getItem(userId + "_selectCity") != "") {
+            //     selectCity = sessionStorage.getItem(userId + "_selectCity");
+            // }
+            // if (sessionStorage.getItem(userId + "_selectIndustry") != null && sessionStorage.getItem(userId + "_selectIndustry") != "") {
+            //     selectIndustry = sessionStorage.getItem(userId + "_selectIndustry");
+            // }
+            // if (sessionStorage.getItem(userId + "_selectCate") != null && sessionStorage.getItem(userId + "_selectCate") != "") {
+            //     selectCate = sessionStorage.getItem(userId + "_selectCate");
+            // }
+            // if (sessionStorage.getItem(userId + "_selectKeyword") != null && sessionStorage.getItem(userId + "_selectKeyword") != "") {
+            //     selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
+            // }
+            // if (sessionStorage.getItem(userId + "_selectNotice") != null && sessionStorage.getItem(userId + "_selectNotice") != "") {
+            //     selectNotice = sessionStorage.getItem(userId + "_selectNotice");
+            // }
             $.ajax({
                 type: 'post',
                 url: '/jyapp/front/hasPushHistory?t=' + new Date().getTime(),
@@ -729,11 +729,12 @@
 
                     // 非vip的新用户
                     if (myInfo.userType !== 'vip') {
+                        // data.data.length = 0
                         // 如果是新用户(没有推送历史数据,没有关键词),直接就显示空页面
                         if (data.data.length === 0 && myInfo.haskey === false && !firstTime) {
                             $('.filter_tab').hide()
                             $('.header_header').hide()
-                            $('.findnull-no-key').css({display: 'block'}).siblings('.empty').hide()
+                            $('.findnull-no-key').css({"display": 'block'}).siblings('.empty').hide()
                             return
                         } else {
                             $('.header_header').show()
@@ -1203,18 +1204,11 @@ function hasNoData() {
             const _this = this
             e.stopPropagation()
             const id = $(this).attr('data-id')
-            const paramsObj = {
-                binfo: [
-                    {
-                    bid: id
-                    }
-                ]
-            }
             var shoucang = $(_this).find('.weishoucang').is(':hidden')
             // 说明未收藏,点击收藏
             if (vKeepComponent) {
                 vKeepComponent.changeBid(id, !shoucang)
-                if(listnum <= 100) {
+                if(listnum < 100) {
                     vKeepComponent.changeKeepStatus(!shoucang, _this)
                 }
             }
@@ -1243,9 +1237,11 @@ function hasNoData() {
         if(type) {
             $(that).find('.shoucang').show()
             $(that).find('.weishoucang').hide()
+            listnum++
         } else {
             $(that).find('.shoucang').hide()
             $(that).find('.weishoucang').show()
+            listnum--
         }
     }
 

+ 3 - 0
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -123,6 +123,7 @@ var vNode = {
             // 获取企业基本信息
             this.getEntBaseInfo()
         }
+
     },
     mounted: function () {
         var _this = this
@@ -422,6 +423,8 @@ var vNode = {
                             } else {
                                 _this.digshow = false
                             }
+                            _this.entInfo.followSearchFinish = true
+                            _this.entInfo.entExist = false
                         } else {
                             _this.digshow = false
                         }

+ 0 - 5
src/web/staticres/common-module/collection/js/notice-mobile.js

@@ -152,7 +152,6 @@ var noticeComponent = {
       let bool = true
       let noticeArr = this.selectnoticelist
       this.tablist.forEach(function(item) {
-        console.log(item)
         item[Object.keys(item)[0]].forEach(function(sum) {
           noticeArr.forEach(data => {
             if (data == sum.name) {
@@ -201,10 +200,8 @@ var noticeComponent = {
     },
     // 模块全选
     checkAll: function(data){
-      console.log(data)
       let selectBool = data[Object.keys(data)[1]]
       let dataArr = data[Object.keys(data)[0]]
-      console.log(selectBool, dataArr)
       if(selectBool) {
         data[Object.keys(data)[1]] = false
         dataArr.forEach(function(item, index){
@@ -263,7 +260,6 @@ var noticeComponent = {
         itemall[Object.keys(itemall)[0]].forEach(function(data) {
           let bool = true
           if(data.type) {
-            console.log(data)
             bool = false+''
           }
           boolArr.push(bool)
@@ -291,7 +287,6 @@ var noticeComponent = {
       this.tablist.forEach(function(item, index){
         item[Object.keys(item)[0]].forEach(function(data, i) {
           if(data.type){
-            console.log(data)
             let str = ''
             // 选择拟建项目传拟建,选择招标预告传预告
             if (data.name === '拟建项目') {

+ 11 - 13
src/web/staticres/vipsubscribe/js/historypush.js

@@ -60,21 +60,19 @@ var vm = new Vue({
     var recover = this.recover()
     if (!recover) {
       this.getUserRoot()
+      setTimeout(() => {
+        // 如果订阅消息进来时间不清空
+        if(this.time !== '') {
+          sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+          this.setPushTime(this.time)
+          this.revorceOtherData()
+        }else{
+          // 清空筛选数据
+          this.revorceData()
+        }
+      })
     }
   },
-  mounted () {
-    setTimeout(() => {
-      // 如果订阅消息进来时间不清空
-      if(this.time !== '') {
-        sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
-        this.setPushTime(this.time)
-        this.revorceOtherData()
-      }else{
-        // 清空筛选数据
-        this.revorceData()
-      }
-    })
-  },
   methods: {
     recover: function () {
       let _this = this

+ 22 - 1
src/web/templates/weixin/historypush.html

@@ -953,6 +953,23 @@
           day = day < 10 ? '0' + day : day;
           return year + '-' + month + '-' + day;
       })();
+      let listparams = {
+            pageNum: 1
+        }
+        var listnum = 0
+        $.ajax({
+            url: '/publicapply/bidcoll/list',
+            type: "POST",
+            contentType: 'application/json;charset=utf-8',
+            data: JSON.stringify(listparams),
+            success: function(res) {
+                if(res.error_code == 0) {
+                    if(res.data && res.data.res) {
+                        listnum = res.data.res.length
+                    }
+                }
+            }
+        })
       //初始化数据
       function initpage() {
           if (sessionStorage && sessionStorage.historypushScrollTop && sessionStorage.historypushDataCache) {
@@ -1434,7 +1451,9 @@
             //console.log(vKeepComponent)
             if (vKeepComponent) {
                 vKeepComponent.changeBid(id, !shoucang)
-                vKeepComponent.changeKeepStatus(!shoucang, _this)
+                if(listnum < 100) {
+                   vKeepComponent.changeKeepStatus(!shoucang, _this)
+                }
             }
             // $.ajax({
             //     url: '/publicapply/bidcoll/action',
@@ -1486,9 +1505,11 @@
         if(type) {
             $(that).find('.shoucang').show()
             $(that).find('.weishoucang').hide()
+            listnum++
         } else {
             $(that).find('.shoucang').hide()
             $(that).find('.weishoucang').show()
+            listnum--
         }
     }