|
@ -95,11 +95,24 @@ |
|
|
var url = `/${res.path}`; |
|
|
var url = `/${res.path}`; |
|
|
uni.navigateTo({ url }); |
|
|
uni.navigateTo({ url }); |
|
|
}, |
|
|
}, |
|
|
fail: (err) => { |
|
|
// fail: (err) => { |
|
|
uni.showToast({ |
|
|
// uni.showToast({ |
|
|
title: '扫码失败'+JSON.stringify(err), |
|
|
// title: '扫码失败'+JSON.stringify(err), |
|
|
icon: 'none' |
|
|
// icon: 'none' |
|
|
}) |
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
complete(res) { |
|
|
|
|
|
// console.log('其他错误:', res); |
|
|
|
|
|
if (res.errMsg === 'scanCode:ok') { |
|
|
|
|
|
console.log('扫码成功:', res.result); |
|
|
|
|
|
} else if (res.errMsg === 'scanCode:fail cancel') { |
|
|
|
|
|
console.log('用户取消扫码'); |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '扫码失败'+JSON.stringify(res.errMsg), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// #endif |
|
|
// #endif |
|
|