|
@@ -16,28 +16,14 @@ export default defineComponent({
|
|
|
wx.config({
|
|
|
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印
|
|
|
appId: "wx67ca1b8c9816ef28", // 必填,公众号的唯一标识
|
|
|
- timestamp: 1649744766, // 必填,生成签名的时间戳
|
|
|
- nonceStr: "Sa4k8traGpnLJCzoQytqr00nL216RpUX", // 必填,生成签名的随机串
|
|
|
- signature: "41e0e4f710d64bbecec3108fbf5c343602791d0d", // 必填,签名
|
|
|
+ timestamp: 1649745213, // 必填,生成签名的时间戳
|
|
|
+ nonceStr: "cpIofYwgtzqzFAId0VgFqY9fEGd6WNhM", // 必填,生成签名的随机串
|
|
|
+ signature: "386bfe37a60c5e97ddd174024af4ffa2af9ae24f", // 必填,签名
|
|
|
jsApiList: ['previewImage'], // 必填,需要使用的JS接口列表
|
|
|
openTagList: ["wx-open-launch-weapp"], // 可选,需要使用的开放标签列表,例如['wx-open-launch-app']
|
|
|
});
|
|
|
let isWxReady = ref(false);
|
|
|
let weappHtml = ref("");
|
|
|
- wx.ready(() => {
|
|
|
- setTimeout(function () {
|
|
|
- weappHtml = `<wx-open-launch-weapp id="launch-btn" username="xxx">\
|
|
|
-
|
|
|
- <template>\
|
|
|
-
|
|
|
- <button>小程序跳转</button>\
|
|
|
-
|
|
|
- </template>\
|
|
|
-
|
|
|
- </wx-open-launch-weapp>`;
|
|
|
- }, 2000);
|
|
|
- console.log("ready");
|
|
|
- });
|
|
|
return {
|
|
|
weappHtml,
|
|
|
isWxReady,
|