H5中js-sdk扫码功能,Android手机微信中无法调用扫码?
发布于 6 年前 作者 xiuyingcai 10060 次浏览 来自 问答

我的H5对接微信JS-SDK中的扫码功能,发现在Android手机微信中无法调用扫码功能,在苹果手机微信中可以使用.

报如下错误:

errMsg:scanQRCode:permissi on denied

errMsg:config:invalid signature

部分代码如下:

jweixin.config({  

                             debug: true,  

                             appId: this.appId,  

                             timestamp: this.timestamp,  

                             nonceStr:  this.nonceStr,  

                             signature: this.signature,  

                             jsApiList: [  

                                 ‘checkJsApi’,

                                 ‘scanQRCode’

                             ]

 });

                        jweixin.checkJsApi({

                            jsApiList : [‘checkJsApi’,‘scanQRCode’],

                            success : function(res) {

                            }

                        });

                        jweixin.scanQRCode({

                            needResult: 1,

                            scanType: [“qrCode”,“barCode”],

                            success: function (res) {

                                _this.devicesn = res.resultStr;   

                            }

                        });

1 回复

没有权限,签名错误

回到顶部