Przeglądaj źródła

筛选条件刷新

TANGSHIZHE 4 lat temu
rodzic
commit
e728b64461

+ 29 - 5
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -54,9 +54,14 @@ var vm = new Vue({
   },
   mounted () {
     setTimeout(() => {
-      console.log(this.time)
+      // 如果订阅消息进来时间不清空
       if(this.time !== '') {
+        sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
         this.setPushTime(this.time)
+        this.revorceOtherData()
+      }else{
+        // 清空筛选数据
+        this.revorceData()
       }
     })
   },
@@ -119,7 +124,28 @@ var vm = new Vue({
       }
       return !!$data
     },
-
+    // 清空筛选数据
+    revorceData: function() {
+      this.time = ''
+      this.area = ''
+      this.subtype = ''
+      this.subscopeclass = ''
+      this.key = ''
+      this.buyerclass = ''
+      setTimeout(() => {
+        this.$nextTick(this.getAjaXParams())
+      })
+    },
+    revorceOtherData: function() {
+      this.area = ''
+      this.subtype = ''
+      this.subscopeclass = ''
+      this.key = ''
+      this.buyerclass = ''
+      setTimeout(() => {
+        this.$nextTick(this.getAjaXParams())
+      })
+    },
     // 订阅推送消息展示数据
     setPushTime: function(time) {
       console.log(time)
@@ -140,9 +166,7 @@ var vm = new Vue({
         url: '/publicapply/bidcoll/power',
         type: 'POST',
         success: function(res) {
-          if(res.data.member) {
-            $(".switch").addClass("only-member");
-          }
+          // 如果是商机管理、大会员、超级订阅会员有筛选权限
           if(res.data.entniche || res.data.member || res.data.vip > 0) {
             _this.screenShow = true
           } else {

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

@@ -1327,7 +1327,7 @@ function hasNoData() {
       $.ajax({
           type: 'post',
           url: '/jyapp/front/hasPushHistory?t=' + new Date().getTime(),
-          data: {"selectTime": time, "area": area, "subscopeclass": subscopeclass, "buyerclass": buyerclass, "key": key, "subtype": subtype},
+          data: {"selectTime": time, "area": area, "subscopeclass": subscopeclass, "pageNum": 1, "buyerclass": buyerclass, "key": key, "subtype": subtype},
           async: false,
           dataType: 'json',
           success: function (data) {

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

@@ -78,7 +78,7 @@ var vNode = {
     }
   },
   mounted() {
-    if(this.tagText.timeText !=='' || this.tagText.perText != '' || this.tagText.cateText != '' ||  this.limitlist.buyerPhone != 0 || this.limitlist.winnerPhone != 0) {
+    if(this.limitlist.label !=='' || this.limitlist.selectTime != '' || this.limitlist.buyerclass != '' ||  this.limitlist.buyerPhone != 0 || this.limitlist.winnerPhone != 0) {
       this.limitshow = true
     } else {
       this.limitshow = false

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

@@ -74,7 +74,7 @@ var vNode = {
       this.getUserRoot()
       this.getTagsList()
     }
-    if(this.tagText.timeText !=='' || this.tagText.perText != '' || this.tagText.cateText != '' ||  this.limitlist.buyerPhone != 0 || this.limitlist.winnerPhone != 0) {
+    if(this.limitlist.label !=='' || this.limitlist.selectTime != '' || this.limitlist.buyerclass != '' ||  this.limitlist.buyerPhone != 0 || this.limitlist.winnerPhone != 0) {
       this.limitshow = true
     }
   },

+ 29 - 3
src/web/staticres/vipsubscribe/js/historypush.js

@@ -55,8 +55,14 @@ var vm = new Vue({
   },
   mounted () {
     setTimeout(() => {
+      // 如果订阅消息进来时间不清空
       if(this.time !== '') {
+        sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
         this.setPushTime(this.time)
+        this.revorceOtherData()
+      }else{
+        // 清空筛选数据
+        this.revorceData()
       }
     })
   },
@@ -119,6 +125,28 @@ var vm = new Vue({
       }
       return !!$data
     },
+    // 清空筛选数据
+    revorceData: function() {
+      this.time = ''
+      this.area = ''
+      this.subtype = ''
+      this.subscopeclass = ''
+      this.key = ''
+      this.buyerclass = ''
+      setTimeout(() => {
+        this.$nextTick(this.getAjaXParams())
+      })
+    },
+    revorceOtherData: function() {
+      this.area = ''
+      this.subtype = ''
+      this.subscopeclass = ''
+      this.key = ''
+      this.buyerclass = ''
+      setTimeout(() => {
+        this.$nextTick(this.getAjaXParams())
+      })
+    },
     // 订阅推送消息展示数据
     setPushTime: function(time) {
       let pushtime = {
@@ -137,9 +165,7 @@ var vm = new Vue({
         url: '/publicapply/bidcoll/power',
         type: 'POST',
         success: function(res) {
-          if(res.data.member) {
-            $(".switch").addClass("only-member");
-          }
+          // 如果是商机管理、大会员、超级订阅会员有筛选权限
           if(res.data.entniche || res.data.member || res.data.vip > 0) {
             _this.screenShow = true
           } else {

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

@@ -1589,7 +1589,7 @@
         $.ajax({
             type: 'post',
             url: '/front/hasPushHistory?t=' + new Date().getTime(),
-            data: {"selectTime": time, "area": area, "subscopeclass": subscopeclass, "buyerclass": buyerclass, "key": key, "subtype": subtype},
+            data: {"selectTime": time, "pageNum": 1, "area": area, "subscopeclass": subscopeclass, "buyerclass": buyerclass, "key": key, "subtype": subtype},
             async: false,
             dataType: 'json',
             success: function (data) {