From 997036b27927bcc1e9207a40b7a69c106a10f30c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 31 七月 2024 15:49:52 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_jiaxuan/components/disCase/index.js | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index fe190d4..01aa0be 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -1,4 +1,5 @@
import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index'
+import { eventBus } from '../../utils/eventBus'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
@@ -22,8 +23,25 @@
sortType: '',
catalogCode: 'whole_case'
},
+ pageLifetimes: {
+ show: function() {
+ // 椤甸潰琚睍绀�
+ console.log('缁勪欢琚睍绀�');
+ eventBus.once('caseDeBack', (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()
+ this.getList()
},
methods: {
getCatelist() {
@@ -35,9 +53,6 @@
this.setData({
cateList: res.data
})
- setTimeout(() => {
- this.getList()
- }, 300)
}
})
},
@@ -104,7 +119,7 @@
const { cateList, tagCodes, activeParam, activeIndex } = this.data
const index = tagCodes.indexOf(code)
- if (index === -1) {
+ if (cateList[activeIndex].tempParamIndex==null || cateList[activeIndex].tempParamIndex != paramIndex) {
// // 鍚宲aram閲宑ode閲嶅
// if (activeParam && activeParam.length > 0) {
// activeParam.forEach(item => {
--
Gitblit v1.9.3