<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
</head>
<body>
<div class='aaa'>
<wx-open-launch-app id="launch-btn" appid="wx00819c646xxxx8" extinfo="your-extinfo111">
<template>
<style>
.btn {
width: 200px;
height: 45px;
line-height: 45px;
text-align: center;
font-size: 17px;
border-radius: 22.5px;
color: #fff;
}
</style>
<button class="btn">App内查看<button>
</template>
</wx-open-launch-app>
</div>
<script>
var btn = document.getElementById('launch-btn');
console.log('btn', btn)
btn.addEventListener('launch', function (e) {
alert('111')
console.log('success');
});
btn.addEventListener('error', function (e) {
alert('222')
console.log('fail', e.detail);
});
</script>
</body>
</html>
wx.config(....) 配置也正确
wx.ready 也能够成功相应
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的测试链接