wx-open-launch-app 按钮内容不显示?
微信版本:8.0.2
设备:iphone11
运行结果:wx.ready运行成功,wx.error也没有报错。但是打开按钮就是不显示
公众号appid:wxcde3c24f7569ba13
移动应用appid:wx3d9bc15510620bf2
这些条件都是满足的
但是debug显示为false
代码:
<wx-open-launch-app id="launch-btn" appid="wx3d9bc15510620bf2" extinfo="">
<template>
<style>
.btn {
width: 70px;
height: 30px;
line-height: 30px;
text-align: center;
font-size: 15px;
color: rgb(49, 149, 252);
border-radius:50px;
border: 2px solid rgba(49,149,252,0.50);
}
</style>
<button class="btn">打开</button>
</template>
</wx-open-launch-app>
$.ajax({
url: "/ting/WeChatSignatureUrl?url=" +encodeURIComponent(window.location.href),
type: "GET",
dataType: 'json',
success: function (data) {
var param=data;
configParam(param);
},
error: function (err) {
console.log("err: " + err)
}
});
function configParam(param) {
console.log(param)
wx.config({
debug: true,
appId: param.AppId,
timestamp: param.Timestamp,
nonceStr: param.Noncestr,
signature: param.Signature,
jsApiList: ['checkJsApi'],
openTagList: ['wx-open-launch-app']
});
wx.ready(function () {
wx.checkJsApi({
jsApiList: ['wx-open-launch-app'],
success: function (res) {
console.log('可用')
},
fail: (err) => {
console.log(err, '不可用')
}
})
});
wx.error(function (res) {
console.log(res)
});
}
var launchBtn = document.getElementById('launch-btn');
if (launchBtn) {
launchBtn.addEventListener('launch', function (e) {
console.log('success');
});
launchBtn.addEventListener('error', function (e) {
console.log('fail', e.detail);
});
}