扫码
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
<view class="submit">
|
||||
<button class="primary-button" :disabled="disabled" @click="toLogin">登 录</button>
|
||||
</view>
|
||||
<!-- <view class="scanBox" @tap="toScan">
|
||||
<view class="scanBox" @tap="checkMpaasScan">
|
||||
<view class="iconfont scan_icon"></view>
|
||||
<text class="san_text">扫码登录</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_card">
|
||||
<view class="card_wrap">
|
||||
@@ -181,27 +181,29 @@
|
||||
return status;
|
||||
}
|
||||
// #endif
|
||||
// ,
|
||||
// async checkMpaasScan () {
|
||||
// var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
||||
// mpaasScanModule.mpaasScan({
|
||||
// // 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
||||
// 'scanType': ['qrCode','barCode'],
|
||||
// // 是否隐藏相册,默认false不隐藏
|
||||
// 'hideAlbum': false
|
||||
// },
|
||||
// (ret) => {
|
||||
// uni.showModal({
|
||||
// title: "弹窗标题",
|
||||
// // 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
||||
// // 返回值中,resp_message 表示返回结果信息
|
||||
// // 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
||||
// content: JSON.stringify(ret),
|
||||
// showCancel: false,
|
||||
// confirmText: "确定"
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
// #ifdef APP-PLUS
|
||||
,
|
||||
async checkMpaasScan () {
|
||||
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
||||
mpaasScanModule.mpaasScan({
|
||||
// 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
||||
'scanType': ['qrCode','barCode'],
|
||||
// 是否隐藏相册,默认false不隐藏
|
||||
'hideAlbum': false
|
||||
},
|
||||
(ret) => {
|
||||
uni.showModal({
|
||||
title: "弹窗标题",
|
||||
// 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
||||
// 返回值中,resp_message 表示返回结果信息
|
||||
// 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
||||
content: JSON.stringify(ret),
|
||||
showCancel: false,
|
||||
confirmText: "确定"
|
||||
})
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user