fix(视频号组件): 用户取消的监听错误,不弹出错误提示
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user