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/disProduct/index.js | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index a93ce61..85c328b 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -1,4 +1,5 @@
import { getCatalogList, getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
+import { eventBus } from '../../utils/eventBus'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
@@ -24,6 +25,22 @@
query: '',
sortType: '',
catalogCode: ""
+ },
+ pageLifetimes: {
+ show: function() {
+ // 椤甸潰琚睍绀�
+ console.log('缁勪欢琚睍绀�');
+ eventBus.once('productDeBack', (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()
@@ -131,7 +148,7 @@
console.log('code', code)
console.log('tagCodes', tagCodes)
console.log(secondCateList)
- if (index === -1) {
+ if ( secondCateList[activeIndex].tempParamIndex==null || secondCateList[activeIndex].tempParamIndex != paramIndex) {
// 鍚宲aram閲宑ode閲嶅
// if (activeParam && activeParam.length > 0) {
// activeParam.forEach(item => {
--
Gitblit v1.9.3