8***@qq.com
8***@qq.com
  • 发布:2024-12-01 16:25
  • 更新:2024-12-10 11:43
  • 阅读:166

uni-app x调用扫码的时候, 提示error: Unresolved reference: scanCode‌

分类:uni-app x

调用如下

uni.scanCode({  
                            scanType: ['qrCode'],  
                            success: (res: UniNamespace.ScanCodeSuccessRes): void => {  
                                console.log('扫码成功: ', res);  
                            },  
                            fail: (err: UniNamespace.ScanCodeSuccessRes): void => {  
                                console.log('扫码失败: ', err);  
                            }  
                        });

b报错如下

16:21:22.196 [plugin:uni:app-uts] 编译失败  
16:21:22.196 ‌error: Unresolved reference: scanCode‌  
16:21:22.196 at pages/home/home.uvue:35:10  
16:21:22.196 33 |        break;  
16:21:22.196 34 |       case 'scan-check':  
16:21:22.196 35 |        uni.scanCode({  
16:21:22.196    |            ^  
16:21:22.197 36 |         scanType: ['qrCode']  
16:21:22.197 37 |        });
2024-12-01 16:25 负责人:无 分享
已邀请:
蔡cai

蔡cai

现在应该还不支持吧

3***@qq.com

3***@qq.com - 程序媛刘刘

同一个问题,解决了?

要回复问题请先登录注册