使用苹果手机在h5页面跳转小程序点击没有反应,安卓手机却可以跳转,请问是什么问题导致的?
getWxConfig() {
let that = this
let ticket_url = encodeURIComponent(location.href.split('#')[0])
$.ajax({
type: "post",
url: base_url + "/api/we/ticket",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ ticket_url }),
success: function (res) {
try {
alert(ticket_url)
alert('success:---getWxConfig'+JSON.stringify(res))
wx.config({
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印
appId: res.data.appId, // 必填,公众号的唯一标识
timestamp: res.data.timestamp, // 必填,生成签名的时间戳
nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
signature: res.data.signature,// 必填,签名
jsApiList: ['chooseImage'], // 必填,需要使用的JS接口列表
openTagList: ['wx-open-launch-weapp'] // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
});
} catch (error) {
alert('getWxConfig-catch:' + JSON.stringify(error))
}
},
error: function (res) {
alert('getWxConfig-error:' + JSON.stringify(res))
}
});
let launchBtn = document.getElementById("launch-btn");
launchBtn.addEventListener("ready", function (e) {
console.log("开放标签 ready");
});
launchBtn.addEventListener("launch", function (e) {
console.log("开放标签 success");
});
launchBtn.addEventListener("error", function (e) {
console.log("开放标签 fail", e.detail);
});
}
你好,一步一步Debug把控制台相关参数截图提供下