小程序
小游戏
企业微信
微信支付
扫描小程序码分享
wx-open-launch-weapp 报错ypeError: Cannot read property 'addEventListener' of null 点击无反应
4 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,提供下测试链接
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<!-- 点击打开小程序 -->
<div
class="wepp-btn"
v-html="item.webApp"
@launch="handleLaunchFn"
></div>
</div>
//接口
async get_imgurl() {
let open = localStorage.getItem("openid");
// this.classify_id = this.$route.query.classify_id;
this.classify_id = this.getParam("classify_id");
if (this.classify_id == undefined) {
this.classify_id = "";
}
console.log("open", open);
this.loading = true;
const getactivityres = await getActivity(open, this.classify_id);
if (getactivityres.status == 200) {
if (getactivityres.data.errno == 1) {
this.get_Code();
return;
} else {
for (let i in getactivityres.data) {
if (getactivityres.data[i].type == 1) {
//使用了反引号来将标签转成字符串,字段显示直接用${}
getactivityres.data[
i
].webApp = `<wx-open-launch-weapp id="launch-btn" @launch="handleLaunchFn" username="${getactivityres.data[i].username}" path="${getactivityres.data[i].path}">
},
可参考用例https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html
wx-open-launch-weapp 报错ypeError: Cannot read property 'addEventListener' of null 点击无反应wx-open-launch-weapp 报错ypeError: Cannot read property 'addEventListener' of null 点击无反应
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,提供下测试链接
<!-- 点击打开小程序 -->
<div
class="wepp-btn"
v-html="item.webApp"
@launch="handleLaunchFn"
></div>
</div>
//接口
async get_imgurl() {
let open = localStorage.getItem("openid");
// this.classify_id = this.$route.query.classify_id;
this.classify_id = this.getParam("classify_id");
if (this.classify_id == undefined) {
this.classify_id = "";
}
console.log("open", open);
this.loading = true;
const getactivityres = await getActivity(open, this.classify_id);
if (getactivityres.status == 200) {
if (getactivityres.data.errno == 1) {
this.get_Code();
return;
} else {
for (let i in getactivityres.data) {
if (getactivityres.data[i].type == 1) {
//使用了反引号来将标签转成字符串,字段显示直接用${}
getactivityres.data[
i
].webApp = `<wx-open-launch-weapp id="launch-btn" @launch="handleLaunchFn" username="${getactivityres.data[i].username}" path="${getactivityres.data[i].path}">
},
可参考用例https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_Open_Tag.html
wx-open-launch-weapp 报错ypeError: Cannot read property 'addEventListener' of null 点击无反应wx-open-launch-weapp 报错ypeError: Cannot read property 'addEventListener' of null 点击无反应