From 73c3507d82c06066d592d626ccd1a9a0961e0c5f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 19 七月 2024 20:10:26 +0800
Subject: [PATCH] ''
---
wechat_jiaxuan/pages/homeId/index.js | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/wechat_jiaxuan/pages/homeId/index.js b/wechat_jiaxuan/pages/homeId/index.js
index 4b5c569..7d96c8d 100644
--- a/wechat_jiaxuan/pages/homeId/index.js
+++ b/wechat_jiaxuan/pages/homeId/index.js
@@ -23,11 +23,24 @@
this.getList()
},
itemClick(e) {
- const { id } = e.target.dataset
- console.log(e.target.dataset);
- wx.navigateTo({
- url: '/pages/consult/detail',
- })
+ const item = e.currentTarget.dataset.item
+ console.log('item', item);
+ if(item.contentType == 'video'){
+ wx.previewMedia({
+ sources: [{ url: item.content, type: 'video' }]
+ })
+ }
+ if(item.contentType == 'link'){
+ wx.navigateTo({
+ url: '/pages/webView/index?link=' + item.content,
+ })
+ }
+ if(item.contentType == 'page'){
+ getApp().globalData.catalogCode=item.content
+ wx.switchTab({
+ url: '/pages/discover/discover'
+ })
+ }
},
cateClick(e) {
const { code } = e.target.dataset
@@ -54,7 +67,7 @@
const { code, tagCodes, pageSize, pageNum } = this.data
pageZSZXContentList({
catalogCode: code,
- tagCodes,
+ tagCodes: tagCodes ? [tagCodes] : [],
pageSize,
pageNum
}).then(res => {
--
Gitblit v1.9.3