const customMethodMap = {handlePreview(e) {const { item: { url } } = e?.currentTarget?.datasetconsole.log('Clicked item URL:', url); // 输出URLconst type = url.split('.')[url.split('.')?.length - 1]console.log('File type:', type); // 输出文件类型console.log(isDoc(type))isPic(type) && (() => {openPic(url)})()isDoc(type) && (() => {openDoc(url)})()isVideo(type) && (() => {console.log('Navigating to video player'); // 输出导航信息// openVideo(url)wx.navigateTo({ url: `/pages/resource/components/video-play/index?url=${url}` })})()}
}
Clicked item URL: 56/product/旭包鲜食品包装用微波炉保鲜膜视频_549867.mp4
File type: mp4
false
Navigating to video player
/pages/resource/components/video-play/index?url=${url}
{"pages": ["pages/index/index","pages/resource/components/video-play/index"]
}