问题描述:
在配送员页面使用扫码核销显示识别不到小程序码。
解决方法:
pages/admin/distribution/index.vue,找到这个文件,修改 to 方法。
to() {
var self = this;
// #ifdef MP || APP
uni.scanCode({
success(res) {
self.verify_code = res.result || '';
if(res.path){
let path = decodeURIComponent(res.path);
self.verify_code = path.split('code=')[1];
}
self.codeChange();
},
fail(res) {},
})
// #endif
//#ifdef H5
this.$wechat.wechatEvevt('scanQRCode', {
needResult: 1,
scanType: ["qrCode", "barCode"]
}).then(res => {
let result = res.resultStr;
if (result.includes(',')) {
result = result.split(",")[1]
}
this.verify_code = result
this.codeChange();
});
//#endif
},
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}