diff --git a/components-diy/js/wechat-channel.js b/components-diy/js/wechat-channel.js index 9dc33a9..8dd75d1 100644 --- a/components-diy/js/wechat-channel.js +++ b/components-diy/js/wechat-channel.js @@ -163,11 +163,16 @@ export const wechatChannelUtil = { // 统一错误处理 handleError(err, item) { console.error('微信视频号错误:', err); + const { errMsg = '微信视频播放失败', errCode = -1 } = err; + + // 错误码5: 表示用户点击了取消. openChannelsActivity:fail cancel + if ([5].includes(errCode)) { + return; + } - let errorMsg = err.errMsg || '微信视频播放失败'; const showErrorToast = (otherMsgs = []) => { uni.showToast({ - title: [errorMsg, ...otherMsgs].join('\n'), + title: [errMsg, ...otherMsgs].join('\n'), icon: 'none', duration: 2000 });