This commit is contained in:
@@ -17,7 +17,9 @@
|
|||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {},
|
"modules" : {
|
||||||
|
"Barcode" : {}
|
||||||
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
|
|||||||
@@ -127,10 +127,7 @@
|
|||||||
|
|
||||||
const handleScanLogin = () => {
|
const handleScanLogin = () => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
if (typeof wx === 'undefined' || !wx.scanQRCode) {
|
if (typeof wx !== 'undefined' && wx.scanQRCode) {
|
||||||
uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wx.scanQRCode({
|
wx.scanQRCode({
|
||||||
needResult: 1,
|
needResult: 1,
|
||||||
scanType: ['qrCode', 'barCode'],
|
scanType: ['qrCode', 'barCode'],
|
||||||
@@ -147,9 +144,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
uni.showToast({ title: '扫码失败', icon: 'none' });
|
uni.showToast({ title: '扫码失败,请重试', icon: 'none' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: '扫一扫功能暂不可用', icon: 'none' });
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
uni.showToast({ title: '请在微信中打开', icon: 'none' });
|
||||||
|
|||||||
Reference in New Issue
Block a user