提交 445fc26c 编写于 作者: guangjun.yang's avatar guangjun.yang

代码问题

上级 49823d14
...@@ -110,7 +110,9 @@ export default { ...@@ -110,7 +110,9 @@ export default {
// 唤起APP // 唤起APP
let insertHtml = `<wx-open-launch-app id="${this.wxOpenId}" let insertHtml = `<wx-open-launch-app id="${this.wxOpenId}"
extinfo="${this.extinfo}" extinfo="${this.extinfo}"
appid="${this.appid}" style="display: block; width: 340px; height: 50px;" > appid="${
this.appid
}" style="display: block; width: 340px; height: 50px;" >
${script.outerHTML} ${script.outerHTML}
</wx-open-launch-app>`; </wx-open-launch-app>`;
console.log("insertHtml", insertHtml); console.log("insertHtml", insertHtml);
...@@ -148,19 +150,17 @@ export default { ...@@ -148,19 +150,17 @@ export default {
}, },
created() {}, created() {},
mounted() { mounted() {
if (process.client) { const ua = navigator.userAgent.toLowerCase();
const ua = navigator.userAgent.toLowerCase();
this.isWechat = /micromessenger\/([\d.]+)/i.test(ua); this.isWechat = /micromessenger\/([\d.]+)/i.test(ua);
this.isIOS = /(iPhone|iPad)/i.test(ua); this.isIOS = /(iPhone|iPad)/i.test(ua);
this.isAndroid = /(Android)/i.test(ua); this.isAndroid = /(Android)/i.test(ua);
this.checkInWechatFn = this.checkInWechat(); this.checkInWechatFn = this.checkInWechat();
// 如果有微信分享进行的config设置,则此行不用打开 // 如果有微信分享进行的config设置,则此行不用打开
// this.checkInWechatFn(this.getSignMap); // this.checkInWechatFn(this.getSignMap);
// (根据项目需要)设置跳转的额外参数 // (根据项目需要)设置跳转的额外参数
this.setPlatformMessage(); this.setPlatformMessage();
}
}, },
methods: { methods: {
callAppAction() { callAppAction() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册