const customMethodMap = {
handlePreview(e) {
const { item: { url } } = e?.currentTarget?.dataset
console.log('Clicked item URL:', url); // 输出URL
const 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"
]
}
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » 微信小程序中,点击视频,没有跳转播放,可能是因为没有在app.json中正确注册视频播放页面的路径
发表评论 取消回复