getJsSdkConfig(url).then(res => {
let wxsdkConfig = {
debug: true,
appId: res.appId, //此处appid为公众号的appid
timestamp: res.timestamp,
nonceStr: res.nonceStr,
signature: res.signature,
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'updateTimelineShareData',
'updateAppMessageShareData'],
openTagList: ['wx-open-launch-app']
};
wxsdk.config(wxsdkConfig);
wxsdk.ready(function () {
console.log('ready')
wxsdk.checkJsApi({
jsApiList: ['wx-open-launch-app'], //校验跳转APP的标签是否可用
success: function (res) {
console.log("checkJsApi成功");
console.log(res)
},
fail: (err) => {
console.log(err, '不可用')
}
});
return resolve(true);
})
wxsdk.error(function (res) {
console.log("config信息验证失败:", res);
return reject(false);
})
})
Js安全域名已经配置
配置提示成功,微信开发工具调试成功,但是跳转失败,报launch:fail check_fail的错误
我各种配置都检查了还是不行
已解决,发现是域名不一致,www.xxx.com和xxx.com