|
@@ -1,5 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
|
|
+ <div v-text="weappHtml"></div>
|
|
<!-- <wx-open-launch-weapp style="display: inline-block; border: none" id="launch-btn" username="gh_a994fd2f498e" path="pages/index/index.html?living_code=LIVING_CODE">
|
|
<!-- <wx-open-launch-weapp style="display: inline-block; border: none" id="launch-btn" username="gh_a994fd2f498e" path="pages/index/index.html?living_code=LIVING_CODE">
|
|
<div v-is="'script'" type="text/wxtag-template">
|
|
<div v-is="'script'" type="text/wxtag-template">
|
|
<div v-is="'style'">.openbtn{background-color:#38f;color:#f40;width:100px;height:40px;line-height:40px;}</div>
|
|
<div v-is="'style'">.openbtn{background-color:#38f;color:#f40;width:100px;height:40px;line-height:40px;}</div>
|
|
@@ -16,7 +17,7 @@ export default defineComponent({
|
|
setup() {
|
|
setup() {
|
|
openApi
|
|
openApi
|
|
.jspapi({
|
|
.jspapi({
|
|
- url: encodeURIComponent(window.location.href)
|
|
|
|
|
|
+ url: encodeURIComponent(window.location.href),
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
let wxConfig = {
|
|
let wxConfig = {
|
|
@@ -38,6 +39,9 @@ export default defineComponent({
|
|
jsApiList: ["previewImage"], // 必填,需要使用的JS接口列表
|
|
jsApiList: ["previewImage"], // 必填,需要使用的JS接口列表
|
|
openTagList: [], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
|
|
openTagList: [], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
|
|
});
|
|
});
|
|
|
|
+ wx.error(({ errMsg }) => {
|
|
|
|
+ weappHtml.value = errMsg;
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
let isWxReady = ref(false);
|
|
let isWxReady = ref(false);
|