diff --git a/components/tabbar.vue b/components/tabbar.vue index 250c9bc..f6fb839 100644 --- a/components/tabbar.vue +++ b/components/tabbar.vue @@ -95,11 +95,24 @@ var url = `/${res.path}`; uni.navigateTo({ url }); }, - fail: (err) => { - uni.showToast({ - title: '扫码失败'+JSON.stringify(err), - icon: 'none' - }) + // fail: (err) => { + // uni.showToast({ + // title: '扫码失败'+JSON.stringify(err), + // 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 diff --git a/pages/visitors/visitors.vue b/pages/visitors/visitors.vue index 96d867f..1aa3c85 100644 --- a/pages/visitors/visitors.vue +++ b/pages/visitors/visitors.vue @@ -515,7 +515,7 @@ width: 100%; top: 82.41%; .submitbtn{ - width: 646rpx; + // width: 646rpx; margin: 0 auto; } .tip{