From 7dc29ed74ebaa8a0e66f68264d9a13f95dc3af21 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 02 八月 2024 11:09:06 +0800
Subject: [PATCH] aa
---
wechat_staff/components/disCase/index.js | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/wechat_staff/components/disCase/index.js b/wechat_staff/components/disCase/index.js
index 5ae4532..64b1b4c 100644
--- a/wechat_staff/components/disCase/index.js
+++ b/wechat_staff/components/disCase/index.js
@@ -19,7 +19,7 @@
pageNum: 1,
pageSize: 10,
query: '',
- sortType: 'NORMAL',
+ sortType: '',
catalogCode: 'whole_case'
},
attached() {
@@ -27,6 +27,28 @@
this.getList()
},
methods: {
+ refreshCount(){
+ let temData = wx.getStorageSync('conentCountTemp')
+ if(temData && this.data.dataList){
+ var dataList =this.data.dataList;
+ dataList.forEach(item =>{
+ if(item.id+'' == temData.id+'' ){
+ item.viewCount = (item.viewCount ||0)+1;
+ if( item.isCollection != temData.isCollection){
+ if(item.isCollection){
+ item.collectCount = (item.collectCount || 0)-1
+ item.collectCount = item.collectCount >=0? item.collectCount :0;
+ } else{
+ item.collectCount = (item.collectCount || 0)+1
+ }
+ item.isCollection = temData.isCollection
+ }
+ }
+ })
+ this.setData({dataList:dataList})
+ wx.setStorageSync('conentCountTemp',null)
+ }
+ },
getCatelist(){
const { catalogCode } = this.data
getCataLogTagList({
--
Gitblit v1.9.3