const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
console.log(mpaasScanModule, '++++')
mpaasScanModule.mpaasScan({
'type': 'bar',
// 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
'scanType': ['barCode'],
// 是否隐藏相册,默认false不隐藏
'hideAlbum': true
}, (res) => {
console.log(res, '扫码数据结果');
//ret.resp_code (10)用户取消,(11)其他错误,(1000)成功
//ret.resp_message 表示返回结果信息
//ret.resp_result 表示扫码结果,只有成功才会有结果返回
// productByBarCodeAPI({ barCode: res.resp_result })
//     .then((res) => {
//         console.log('获取扫码列表', res);
//         if (res.data.state === 200) {
//             navigateToPages(
//                 _this.toPagesPath.pagesInventoryCountIndex,
//                 res.data.data,
//                 'param'
//             );
//         } else {
//             uni.showToast({
//                 title: res.data.msg,
//                 icon: 'none',
//             });
//         }
//     })
//     .catch((err) => {
//         console.error('获取扫码列表失败——————', err);
//     });
})
 
                                        
                                    
                                    
                                        1***@163.com                                                                                
                                        
                                - 发布:2023-10-08 10:28
- 更新:2024-05-17 09:43
- 阅读:467
 
             
             
             
			 
            
1 个回复
Azikou
大佬你解决了么,求分享