ソースを参照

筛选条件修改

TANGSHIZHE 4 年 前
コミット
85aad5b049

+ 2 - 8
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -132,9 +132,6 @@ var vm = new Vue({
       this.subscopeclass = ''
       this.key = ''
       this.buyerclass = ''
-      setTimeout(() => {
-        this.$nextTick(this.getAjaXParams())
-      })
     },
     revorceOtherData: function() {
       this.area = ''
@@ -142,9 +139,6 @@ var vm = new Vue({
       this.subscopeclass = ''
       this.key = ''
       this.buyerclass = ''
-      setTimeout(() => {
-        this.$nextTick(this.getAjaXParams())
-      })
     },
     // 订阅推送消息展示数据
     setPushTime: function(time) {
@@ -184,7 +178,7 @@ var vm = new Vue({
         }
         if (timeRange.start == 0 && timeRange.end == 0) {
           this.time = ''
-          this.tagText.timeText = '不限'
+          this.tagText.timeText = '时间'
         } else if(timeRange.start == 0 && timeRange.end != 0) {
           this.time = '_' + timeRange.end
         } else if(timeRange.start != 0 && timeRange.end == 0) {
@@ -195,7 +189,7 @@ var vm = new Vue({
         this.selectDate.exact = data.exact
         switch (data.data.exact) {
           case 'all': {
-            this.tagText.timeText = '不限'
+            this.tagText.timeText = '时间'
             break
           }
           case 'lately7': {

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

@@ -541,6 +541,7 @@
   var selectCate = vm.buyerclass // 采购单位
   var selectKeyword = vm.key // 关键词
   var selectNotice = vm.subtype // 公告类型
+  console.log(selectCity,selectIndustry,selectCate,selectKeyword,selectNotice, '11')
   //获取当前时间
   var date = (function () {
       var date = new Date();
@@ -932,6 +933,11 @@ window.listScroll = function() {
 
   function loadDatas(me, le) {
       wxflag = me;
+      selectCity = vm.area; // 地区
+      selectIndustry = vm.subscopeclass // 行业
+      selectCate = vm.buyerclass // 采购单位
+      selectKeyword = vm.key // 关键词
+      selectNotice = vm.subtype // 公告类型
       $.ajax({
           type: 'post',
           url: '/jyapp/swordfish/historypush/paging',

+ 3 - 1
src/web/staticres/common-module/collection/js/area-mobile.js

@@ -78,7 +78,9 @@ var areaComponent = {
             this.optionData(this.setParam.area,pushtime)
         }
     }
-    this.setState()
+    if(this.selectarealist.length !== 0) {
+      this.setState()
+    }
 },
   methods: {
     recover: function () {

+ 1 - 1
src/web/staticres/common-module/collection/js/cate-mobile.js

@@ -81,8 +81,8 @@ var cateComponent = {
   },
   created () {
     this.getData()
-    this.getbBtnClick()
     this.setState()
+    this.getbBtnClick()
   },
   methods: {
     setState: function() {

+ 21 - 2
src/web/staticres/common-module/collection/js/date-mobile.js

@@ -37,7 +37,7 @@ var dateComponentTemplate = `<div class="j-container">
       </div>
       <div class="j-footer">
         <div class="j-button-group">
-          <button class="j-button-cancel" @click="resetAll">重置</button>
+          <button class="j-button-cancel" @click="resetStart">重置</button>
           <button class="j-button-confirm" @click="onStartConfirm">确认</button>
         </div>
       </div>
@@ -71,7 +71,7 @@ var dateComponentTemplate = `<div class="j-container">
       </div>
       <div class="j-footer">
         <div class="j-button-group">
-          <button class="j-button-cancel" @click="resetAll">重置</button>
+          <button class="j-button-cancel" @click="resetEnd">重置</button>
           <button class="j-button-confirm" @click="onendConfirm">确认</button>
         </div>
       </div>
@@ -299,7 +299,16 @@ var dateComponent = {
     getStratFocus: function() {
       document.activeElement.blur()
     },
+    // 重置
     resetAll:function() {
+      this.dateStyle = false
+      console.log(this.timeSelectList)
+      this.timeSelectList.forEach((v) => {
+        console.log(v)
+        if(v.value == 'all') {
+          v.selected = true
+        }
+      })
       let params = {
         name: 'dateItem',
         data: ''
@@ -307,6 +316,16 @@ var dateComponent = {
       this.$emit('cancel', params)
       return params
     },
+    // 重置开始时间
+    resetStart: function() {
+      this.datePicker.startshow = false
+      this.dateTimePickerState.startPlaceHolder = ''
+    },
+    // 重置结束时间
+    resetEnd: function() {
+      this.datePicker.endshow = false
+      this.dateTimePickerState.endPlaceHolder = ''
+    },
     // 选择开始时间弹窗确认按钮
     onStartConfirm:function() {
       this.dateTimePickerState.start = new Date(this.$refs.getstartValues.value)

+ 2 - 2
src/web/staticres/common-module/collection/js/index-wx.js

@@ -256,7 +256,7 @@ var vNode = {
         }
         if (timeRange.start == 0 && timeRange.end == 0) {
           this.limitlist.selectTime = ''
-          this.tagText.timeText = '不限'
+          this.tagText.timeText = '收藏时间'
         } else if(timeRange.start == 0 && timeRange.end != 0) {
           this.limitlist.selectTime = '_' + timeRange.end
         } else if(timeRange.start != 0 && timeRange.end == 0) {
@@ -267,7 +267,7 @@ var vNode = {
         this.selectDate.exact = data.data.exact
         switch (data.data.exact) {
           case 'all': {
-            this.tagText.timeText = '不限'
+            this.tagText.timeText = '收藏时间'
             break
           }
           case 'lately7': {

+ 2 - 2
src/web/staticres/common-module/collection/js/index.js

@@ -249,7 +249,7 @@ var vNode = {
         }
         if (timeRange.start == 0 && timeRange.end == 0) {
           this.limitlist.selectTime = ''
-          this.tagText.timeText = '不限'
+          this.tagText.timeText = '收藏时间'
         } else if(timeRange.start == 0 && timeRange.end != 0) {
           this.limitlist.selectTime = '_' + timeRange.end
         } else if(timeRange.start != 0 && timeRange.end == 0) {
@@ -260,7 +260,7 @@ var vNode = {
         this.selectDate.exact = data.data.exact
         switch (data.data.exact) {
           case 'all': {
-            this.tagText.timeText = '不限'
+            this.tagText.timeText = '收藏时间'
             break
           }
           case 'lately7': {

+ 78 - 21
src/web/staticres/common-module/collection/js/keyword-mobile.js

@@ -62,23 +62,47 @@ var keywordComponentTemplate = `<div class="j-container">
 
 var keywordComponent = {
   name: 'keyword-mobile',
-  props: ['selectkeywordlist'],
+  props: {
+    "selectkeywordlist": {
+      type: Array,
+      default: function () {
+        return []
+      }
+    }
+  },
   template: keywordComponentTemplate,
   data:function () {
     return {
       initlist: [],
       tablist: [],
       checkedAll: false,
-      canClick: true
+      canClick: true,
+      isvip: false
     }
   },
   created () {
-    this.getIndustryData()
+    this.getData()
     this.getbBtnClick()
   },
   methods: {
-    // 获取行业数据
-    getIndustryData: function(){
+    // 获取关键词
+    getUserRoot: function() {
+      let _this = this
+      $.ajax({
+        url: '/publicapply/bidcoll/power',
+        type: 'POST',
+        success: function(res) {
+          // 如果不是超级订阅会员,获取免费用户关键词
+          if(res.data.vip > 0) {
+            _this.isvip = true
+          } else {
+            _this.isvip = false
+          }
+        }
+      })
+    },
+    // 获取关键词数据
+    getData: function(){
       const _this = this
       $.ajax({
         url: '/subscribepay/afterPay/getUserInfo',
@@ -86,26 +110,59 @@ var keywordComponent = {
         success: function(res){
           console.log(res)
           this.initlist = res.userData.o_vipjy.a_items
-          let data = res.userData.o_vipjy.a_items
           let maxarr = []
-          data.forEach(function(item,index) {
-            let minarr = []
-            let keyname = item.s_item
-            let eachArr = item.a_key
-            eachArr.forEach(function(data, i){
-              data = {
-                name: data.key[0],
+          if(_this.isvip) {
+            let data = res.userData.o_vipjy.a_items
+            data.forEach(function(item,index) {
+              let minarr = []
+              let keyname = item.s_item
+              let eachArr = item.a_key
+              eachArr.forEach(function(data, i){
+                data = {
+                  name: data.key[0],
+                  type: false
+                }
+                minarr.push(data)
+              })
+              let obj = {
+                [keyname]: minarr,
                 type: false
               }
-              minarr.push(data)
+              maxarr.push(obj)
             })
-            let obj = {
-              [keyname]: minarr,
-              type: false
-            }
-            maxarr.push(obj)
-          })
-          _this.tablist = maxarr
+            _this.tablist = maxarr
+          } else {
+            let initArr = [
+              {
+                a_key:res.userData.o_jy.a_key,
+                s_item: '未分类'
+              }
+            ]
+            let data = initArr
+
+            console.log(data)
+            let maxarr = []
+            data.forEach(function(item,index) {
+              let minarr = []
+              let keyname = item.s_item
+              let eachArr = item.a_key
+              console.log(eachArr)
+              eachArr.forEach(function(data, i){
+                data = {
+                  name: data.key[0],
+                  type: false
+                }
+                minarr.push(data)
+              })
+              console.log(minarr)
+              let obj = {
+                [keyname]: minarr,
+                type: false
+              }
+              maxarr.push(obj)
+            })
+            _this.tablist = maxarr
+          }
           _this.setState()
         },
         error: function(err){

+ 23 - 1
src/web/staticres/common-module/collection/js/tags-mobile.js

@@ -6,7 +6,7 @@ var tagsComponentTemplate = `
   <div class="j-footer">
     <div class="j-button-group">
       <button class="j-button-cancel" @click="resetAll">重置</button>
-      <button class="j-button-confirm" @click="onConfirm">确认</button>
+      <button class="j-button-confirm" :disabled="canClick" @click="onConfirm">确认</button>
     </div>
   </div>
 </div>
@@ -18,10 +18,12 @@ var tagsComponent = {
   template: tagsComponentTemplate,
   data:function () {
     return {
+      canClick: true
     }
   },
   created () {
     this.setState()
+    this.getbBtnClick()
   },
   methods: {
     // 个人标签方法
@@ -47,6 +49,25 @@ var tagsComponent = {
       })
       return dataArr2
     },
+    // 只要有一个选中,确认按钮可点击
+    getbBtnClick: function() {
+      let boolnum = -1
+      let boolArr = []
+      console.log(this.taglist)
+      this.taglist.forEach(function(itemall, index){
+        let bool = true
+          if(itemall.type) {
+            bool = false + ''
+          }
+          boolArr.push(bool)
+      })
+      boolnum = boolArr.indexOf('false')
+      if (boolnum == -1) {
+        this.canClick = true
+      } else {
+        this.canClick = false
+      }
+    },
     // 个人标签重置
     resetAll: function() {
       let params = {
@@ -69,6 +90,7 @@ var tagsComponent = {
     // 个人标签点击
     selectTags: function(data) {
       data.type = !data.type
+      this.getbBtnClick()
     } 
   }
 }

+ 2 - 2
src/web/staticres/vipsubscribe/js/historypush.js

@@ -183,7 +183,7 @@ var vm = new Vue({
         }
         if (timeRange.start == 0 && timeRange.end == 0) {
           this.time = ''
-          this.tagText.timeText = '不限'
+          this.tagText.timeText = '时间'
         } else if(timeRange.start == 0 && timeRange.end != 0) {
           this.time = '_' + timeRange.end
         } else if(timeRange.start != 0 && timeRange.end == 0) {
@@ -194,7 +194,7 @@ var vm = new Vue({
         this.selectDate.exact = data.data.exact
         switch (data.data.exact) {
           case 'all': {
-            this.tagText.timeText = '不限'
+            this.tagText.timeText = '时间'
             break
           }
           case 'lately7': {