From 0e8cc18ee5d35479d30408851c21e5f4c0fb487a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 30 七月 2024 17:00:37 +0800
Subject: [PATCH] 提交
---
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 aa2ca72..542bc52 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