扫码
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
@input="handleChange($event)">
|
@input="handleChange($event)">
|
||||||
<view class="buttons_wraper">
|
<view class="buttons_wraper">
|
||||||
<view class="iconfont icon-del" @tap="toDel"></view>
|
<view class="iconfont icon-del" @tap="toDel"></view>
|
||||||
<view class="iconfont icon_scan" @tap="toScan"></view>
|
<view class="iconfont icon_scan" @tap="checkMpaasScan"></view>
|
||||||
<view v-show="seaShow" class="iconfont icon_search" @tap="toSearch"></view>
|
<view v-show="seaShow" class="iconfont icon_search" @tap="toSearch"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -93,6 +93,30 @@
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
// #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: "确定"
|
||||||
|
// })
|
||||||
|
this.$emit('input', ret.resp_result)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
"compatible" : {
|
||||||
|
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||||
|
},
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
@@ -51,8 +54,8 @@
|
|||||||
},
|
},
|
||||||
"nativePlugins" : {
|
"nativePlugins" : {
|
||||||
"Mpaas-Scan" : {
|
"Mpaas-Scan" : {
|
||||||
"AppId" : "ALIPUBE2DD724280911",
|
"AppId" : "ALIPUBE2DD724310903",
|
||||||
"License" : "tJsii2WmYoPlQ9dy07LPSgrDE8dK7sfZzDVgyiBVAPmsBMakYVRKoQy2rOcearXGgXWS35dtaTgxgu5zsM",
|
"License" : "V+RO1HW4tXAYwRLZ3l7IAwmEo2OX86e61Q2LudjZlV8SRgwQyKuq24NKvxrVJESMuw5znmFCO6+rdOdFCkqkt1EPkCmNYyGl+wD+fc6G0QXt/WVquJIUmyaQ39V6cguYSEdR3fuPpna80zI0x3Y8KZ4kcjPAdBr3M/FvT/J9EXLtxFyNOAdwpfjrWDa4w6wsLpQWabj9KDlRX5Ytt29mvkmLozNl2EN260CRWSX3vkG3/yoLgezjDEq+aiUfH21nHkvvBbjiQDBpn9EDZOV6aqxHgOS/uad1Ji23zPdYzWbbWZjs81LxUUajXaPMX5a3ogqThYgr3CDjImm1gI5X9w==",
|
||||||
"WorkspaceId" : "default",
|
"WorkspaceId" : "default",
|
||||||
"__plugin_info__" : {
|
"__plugin_info__" : {
|
||||||
"name" : "支付宝原生扫码插件",
|
"name" : "支付宝原生扫码插件",
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
{
|
{
|
||||||
"path": "pages/login/login",
|
"path": "pages/home/home",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/home/home",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
<view class="submit">
|
<view class="submit">
|
||||||
<button class="primary-button" :disabled="disabled" @click="toLogin">登 录</button>
|
<button class="primary-button" :disabled="disabled" @click="toLogin">登 录</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="scanBox" @tap="toScan">
|
<view class="scanBox" @tap="checkMpaasScan">
|
||||||
<view class="iconfont scan_icon"></view>
|
<view class="iconfont scan_icon"></view>
|
||||||
<text class="san_text">扫码登录</text>
|
<text class="san_text">扫码登录</text>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login_card">
|
<view class="login_card">
|
||||||
<view class="card_wrap">
|
<view class="card_wrap">
|
||||||
@@ -181,27 +181,29 @@
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
// ,
|
// #ifdef APP-PLUS
|
||||||
// async checkMpaasScan () {
|
,
|
||||||
// var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
async checkMpaasScan () {
|
||||||
// mpaasScanModule.mpaasScan({
|
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
||||||
// // 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
mpaasScanModule.mpaasScan({
|
||||||
// 'scanType': ['qrCode','barCode'],
|
// 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
||||||
// // 是否隐藏相册,默认false不隐藏
|
'scanType': ['qrCode','barCode'],
|
||||||
// 'hideAlbum': false
|
// 是否隐藏相册,默认false不隐藏
|
||||||
// },
|
'hideAlbum': false
|
||||||
// (ret) => {
|
},
|
||||||
// uni.showModal({
|
(ret) => {
|
||||||
// title: "弹窗标题",
|
uni.showModal({
|
||||||
// // 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
title: "弹窗标题",
|
||||||
// // 返回值中,resp_message 表示返回结果信息
|
// 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
||||||
// // 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
// 返回值中,resp_message 表示返回结果信息
|
||||||
// content: JSON.stringify(ret),
|
// 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
||||||
// showCancel: false,
|
content: JSON.stringify(ret),
|
||||||
// confirmText: "确定"
|
showCancel: false,
|
||||||
// })
|
confirmText: "确定"
|
||||||
// })
|
})
|
||||||
// }
|
})
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user