1***@163.com
1***@163.com
  • 发布:2020-08-14 09:23
  • 更新:2020-08-14 09:23
  • 阅读:630

手机app调用扫描条形码接口闪退

分类:uni-app

打开扫描条形码的界面,扫描条码后应用闪退,控制台没有报错信息!就告知解决方案!

scanCode() {  
                let that = this;  
                uni.scanCode({  
                    scanType: ['barCode'],  
                    success: function (res) {  
                        console.log('条码类型:' + res.scanType);  
                        console.log('条码内容:' + res.result);  
                        that.scanType = res.scanType;  
                        that.result = res.result;  
                        uni.showModal({  
                            title: '提示',  
                            content:`条码类型:${res.scanType},条码内容:${res.result}`,  
                            success: function (res) {  
                                if (res.confirm) {  
                                    console.log('用户点击确定');  
                                    that.searScanCode(res.result)  
                                } else if (res.cancel) {  
                                    console.log('用户点击取消');  
                                }  
                            }  
                        })  
                    }  
                });  
            },
2020-08-14 09:23 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复