Page({ data: { videoUrl: '', title: '', showControls: true }, onLoad(options) { const { url, title } = options this.setData({ videoUrl: decodeURIComponent(url || ''), title: decodeURIComponent(title || '视频播放') }) // 设置导航栏标题 wx.setNavigationBarTitle({ title: this.data.title }) }, onVideoError(e) { console.error('视频播放错误:', e.detail) wx.showToast({ title: '视频播放失败', icon: 'none' }) }, onVideoPlay() { console.log('视频开始播放') }, onVideoPause() { console.log('视频暂停') }, onVideoEnded() { console.log('视频播放结束') } })