我就得为什么不能新增个方法而要新增个标签,如同定位一样
vue中的wx-open-launch-app 标签里面的内容经常不显示,偶尔却又能正常显示出来?当"打开app"这个按钮显示时,可以正常打开APP,不显示则无效,以下是部分代码<template> <div class="title-box"> <img src="../assets/logo.png" class="logo-icon" /> <button class="open-app" v-show="!isWeChatOpen" @click="openApp">打开App</button> <div class="open-app2" v-show="isWeChatOpen"> <wx-open-launch-app id="launch-btn" :appid="appid" extinfo="" @error="handleErrorFn" @launch="handleLaunchFn" > <script type="text/wxtag-template"> <style>.btn { width: 72px; height: 32px; line-height: 32px; text-align: center; font-size: 12px; color: #2DB7FF; background: #F4F4F4; border-radius: 25px; }</style> <div class="btn">打开APP</div> </script> </wx-open-launch-app> </div> <img v-if="isLoginState" src="../assets/title-login.png" class="title-login-icon" @click="openPersonal" /> <button v-if="!isLoginState" class="open-login" @click="openLogin">登录</button> </div> </template> ///以下是调用的方法 getWechatOpenTag() { shareGetSDK(window.location.href).then(res => { let data = res.data.data var _this = this wx.config({ debug: false, appId: data.appId, timestamp: data.timestamp, nonceStr: data.nonceStr, signature: data.signature, jsApiList: ["onMenuShareAppMessage", "onMenuShareTimeline"], openTagList: ["wx-open-launch-app"] }); wx.ready(function () { // Toast("成功") wx.checkJsApi({ jsApiList: ['wx-open-launch-app'], // 需要检测的JS接口列表,所有JS接口列表见附录2, success: function (res) { console.log('可用') _this.isWeChatOpen = true }, fail: (err) => { console.log(err, '不可用') _this.isWeChatOpen = false } }) }); wx.error(function (res) { // Toast(res) }); }) [图片] wx.config dubug为true时,弹框提示内容 "wx-open-launch-app false"是什么意思呢?
2020-12-09