Page({ data: { videoSrc: '' // Replace with your video URL }, onLoad(options) { const s = decodeURIComponent(options.url); wx.showToast({ title: `点击了子项 ${s}`, icon: 'none' }); console.log(s); this.setData({ videoSrc:s }) }, onReady() { // Create video context this.videoContext = wx.createVideoContext('myVideo'); }, // Play video playVideo() { this.videoContext.play(); }, // Pause video pauseVideo() { this.videoContext.pause(); }, // Event handlers onVideoPlay() { wx.showToast({ title: '视频开始播放', icon: 'none' }); }, onVideoPause() { wx.showToast({ title: '视频已暂停', icon: 'none' }); }, onVideoEnded() { wx.showToast({ title: '视频播放结束', icon: 'none' }); } });