From 3134c86bd9e7596db5ecb6aa2ca996483c3de6f0 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 01 八月 2024 16:28:16 +0800
Subject: [PATCH] aa
---
wechat_staff/components/disRealpic/index.js | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index 46e5615..e1ffb3c 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -25,6 +25,28 @@
this.getCatelist()
},
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