<template>
<view>
<text class="text-blue" @click="handleScan">扫码登陆</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
handleScan() {
uni.scanCode({
scanType: ['qrCode'],
success: (res) => {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
}
})
},
},
onLoad() {
}
}
</script>
<style>
</style>
- 发布:2020-05-28 13:20
- 更新:2020-05-28 13:20
- 阅读:506
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10企业版
HBuilderX类型: 正式
HBuilderX版本号: 2.7.9
手机系统: iOS
手机系统版本号: iOS 13.4
手机厂商: 苹果
手机机型: iphone11
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
无
无
预期结果:
全屏
全屏
实际结果:
底下留白
底下留白
bug描述:
调用摄像头扫码,底下有个空白