From 1a6905045d38bb50b0c6554c3440bdfd339c8d23 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 30 七月 2024 19:13:46 +0800
Subject: [PATCH] ‘’
---
wechat_staff/pages/homeId/index.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/wechat_staff/pages/homeId/index.js b/wechat_staff/pages/homeId/index.js
index 95ecff5..0a7dded 100644
--- a/wechat_staff/pages/homeId/index.js
+++ b/wechat_staff/pages/homeId/index.js
@@ -53,22 +53,28 @@
itemClick(e) {
const item = e.currentTarget.dataset.item
console.log('item', item);
- actionDo({actionType: 'view',id: item.id})
if(item.contentType == 'video'){
wx.previewMedia({
sources: [{ url: item.content, type: 'video' }]
- })
+ })
+ actionDo({actionType: 'view',id: item.id})
}
if(item.contentType == 'link'){
wx.navigateTo({
- url: '/pages/webView/index?link=' + item.content,
- })
+ url: '/pages/webView/index',
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('data',{link:item.content} );
+ }
+ })
+ actionDo({actionType: 'view',id: item.id})
}
if(item.contentType == 'page'){
getApp().globalData.catalogCode=item.content
wx.switchTab({
url: '/pages/discover/discover'
- })
+ })
+ actionDo({actionType: 'view',id: item.id})
}
},
cateClick(e) {
--
Gitblit v1.9.3