大佬能帮我看下吗 WXchatApp 里面的方法验证都能通过,点击点击按钮没有任何反应,也不报错
<wx-open-launch-app ref="launchBtn" id="launchBtn" @launch="handleLaunchFn" @error="handleErrorFn"
appid="" extinfo="/package-shop/pages/shop-prods/shop-prods?shopId=72">
<!-- 定义按钮样式 -->
<component :is="'script'" type="text/wxtag-template" style="display: block;">
<button style="
width: 7rem;
height: 3rem;
border-radius: 15px;
background-color: #d7655f;
border: none;
color: white;
font-size: 1rem;
position: fixed;
">
前往下载
</button>
</component>
</wx-open-launch-app>
const WXchatApp = async () => {
const { data } = await http.request({
url: '/p/wx/jsapi/createJsapiSignature',
method: 'POST',
data: { url: "https://dlchm.cn/h5/" }
})
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名,见附录1
jsApiList: ['openTagList'],
openTagList: ['wx-open-launch-app']// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
})
wx.ready(function () {
console.log('ready===============>');
});
wx.error(function (err) {
console.log(err);
});
}
const handleLaunchFn = () => {
console.log('111111');
}
const handleErrorFn = (err) => {
console.log('err', err);
}
7 个回复
1***@qq.com (作者) - 80后IT男
官方可以回复一下吗~~急,现在只能用剪贴板实现,很麻烦哦
1***@qq.com (作者) - 80后IT男
已解决
淡绿色的小鬼
怎么解决的,能告知吗?谢谢
2020-07-06 15:51
5***@qq.com
大佬,能说一下解决办法吗?
2020-07-09 09:29
雨夜敬清秋
回复 淡绿色的小鬼: plus.runtime.arguments
2020-07-15 17:12
雨夜敬清秋
回复 5***@qq.com: plus.runtime.arguments
2020-07-15 17:12
5***@qq.com
回复 雨夜敬清秋: 谢谢
2020-07-18 10:49
kinnet
在IOS下,plus.runtime.arguments获取是无用信息,extinfo内容不能获取,求方法,谢谢。
2020-12-10 16:12
1***@163.com
真差劲,这人,
2023-03-07 16:28
传播星球
回复 1***@163.com: 请问解决了嘛
2023-03-27 14:11
2***@qq.com - hjw1203
你好请问下 你在页面上是怎么写的那个打开的标签,我这里调试模式的config提示是ok的 但是就是不显示按钮
w***@zeqingev.com.cn - 甄会省
光问不答
1***@163.com - 啊啊啊
在IOS下,plus.runtime.arguments获取是无用信息,extinfo内容不能获取,求方法,谢谢
传播星球
请问解决了嘛?
2023-03-27 10:16
传播星球
请问怎么解决的
1***@qq.com
大佬能帮我看下吗 WXchatApp 里面的方法验证都能通过,点击点击按钮没有任何反应,也不报错
<wx-open-launch-app ref="launchBtn" id="launchBtn" @launch="handleLaunchFn" @error="handleErrorFn"
appid="" extinfo="/package-shop/pages/shop-prods/shop-prods?shopId=72">
<!-- 定义按钮样式 -->
<component :is="'script'" type="text/wxtag-template" style="display: block;">
<button style="
width: 7rem;
height: 3rem;
border-radius: 15px;
background-color: #d7655f;
border: none;
color: white;
font-size: 1rem;
position: fixed;
">
前往下载
</button>
</component>
const WXchatApp = async () => {
const { data } = await http.request({
url: '/p/wx/jsapi/createJsapiSignature',
method: 'POST',
data: { url: "https://dlchm.cn/h5/" }
})
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名,见附录1
jsApiList: ['openTagList'],
openTagList: ['wx-open-launch-app']// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
})
wx.ready(function () {
console.log('ready===============>');
});
wx.error(function (err) {
console.log(err);
});
}
const handleLaunchFn = () => {
console.log('111111');
}
const handleErrorFn = (err) => {
console.log('err', err);
}