From 7b2847ac00849ffe33e4b1ca186fd9b6ad312dad Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 31 七月 2024 13:56:07 +0800
Subject: [PATCH] lll
---
wechat_jiaxuan/components/disRealpic/index.js | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index c96868b..ad7a5f3 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -1,4 +1,5 @@
import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index'
+import { eventBus } from '../../utils/eventBus'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
@@ -21,6 +22,22 @@
sortType: '',
catalogCode: 'real_case'
},
+ pageLifetimes: {
+ show: function() {
+ // 椤甸潰琚睍绀�
+ console.log('缁勪欢琚睍绀�');
+ eventBus.once('realpicDeBack', (info) => {
+ const dataList = this.data.dataList
+ dataList.forEach(item => {
+ if(item.id === info.id){
+ item.isCollection = info.isCollection
+ item.viewCount ++
+ }
+ })
+ this.setData({ dataList })
+ })
+ },
+ },
attached() {
this.getCatelist()
},
--
Gitblit v1.9.3