wx-open-launch-app 点击报错 isTrusted:false 实在找不到原因?
发布于 4 年前 作者 taoxu 13547 次浏览 来自 问答

wx-open-launch-app 点击报错 isTrusted:false 实在找不到原因?

<wx-open-launch-app id="launch-btn" appid="wx5dae5d019f9c2f97" extinfo="" style="position: relative;	bottom: 38px;width: 600px;">
							<template>
								<style>
									.wx-btn {
										width: 100%;
										height: 50px;
									}
								</style>
								<div class="wx-btn"></div>
							</template>
						</wx-open-launch-app>

wx.config({
		debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印
		appId: 'wxdd802bf90eb87504', // 必填,公众号的唯一标识
		timestamp: timestamp, // 必填,生成签名的时间戳
		nonceStr: noncestr, // 必填,生成签名的随机串
		signature: signature, // 必填,签名
		jsApiList: ['checkJsApi', 'updateAppMessageShareData', 'updateTimelineShareData'], // 必填,需要使用的JS接口列表
		openTagList: ['wx-open-launch-app'] // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
	});	
wx.ready(function () {
		var btn = document.getElementById('launch-btn');
		btn.addEventListener('launch', function (e) {
		console.log('success');
		});
		btn.addEventListener('error', function (e) {
		console.log('fail', e.detail);
		});
	});

之前还可以最近就不行了 麻烦帮忙看下

2 回复

事件无法序列化,请直接console.log(event.detail)

官方人呢

回到顶部