From f4f2891ac617aca6e2a5f1dc8f86ba3f054e3392 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 01 八月 2024 08:52:35 +0800
Subject: [PATCH] aa
---
wechat_jiaxuan/components/disCase/index.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index 01aa0be..f04978a 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -31,6 +31,13 @@
const dataList = this.data.dataList
dataList.forEach(item => {
if(item.id === info.id){
+ if(item.isCollection != info.isCollection){
+ if(!item.isCollection){
+ item.collectCount = (item.collectCount || 0)+1
+ }else if(item.collectCount >0){
+ item.collectCount = (item.collectCount || 0)-1
+ }
+ }
item.isCollection = info.isCollection
item.viewCount ++
}
--
Gitblit v1.9.3