|
@@ -6,7 +6,7 @@
|
|
|
<div class="skip-theme-txt">小程序</div>
|
|
|
</div>
|
|
|
<div class="skip-btn">
|
|
|
- <p id="launch-btn" @click="showWechat()">打开微信</p>
|
|
|
+ <p id="launch-btn">打开微信</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -23,41 +23,41 @@ export default {
|
|
|
methods: {
|
|
|
showWechat() {
|
|
|
//
|
|
|
- let launchParams = {
|
|
|
- appid: "gh_wxb86cb7f459fc3675",
|
|
|
- eleId: "launch-btn", // 元素id
|
|
|
- url: "pages/index/index.html", // 跳转小程序的页面路径
|
|
|
- content: "", // 自定义的html内容
|
|
|
- };
|
|
|
- wx_launch(launchParams);
|
|
|
+ // let launchParams = {
|
|
|
+ // appid: "gh_wxb86cb7f459fc3675",
|
|
|
+ // eleId: "launch-btn", // 元素id
|
|
|
+ // url: "pages/index/index.html", // 跳转小程序的页面路径
|
|
|
+ // content: "", // 自定义的html内容
|
|
|
+ // };
|
|
|
+ // wx_launch(launchParams);
|
|
|
},
|
|
|
},
|
|
|
components: {},
|
|
|
-// mounted() {
|
|
|
-// // 自定义html内容
|
|
|
-// let content = `
|
|
|
-// <button class="test-btn">点我跳转小程序</button>
|
|
|
-// <style>
|
|
|
-// .test-btn{
|
|
|
-// width:100%;
|
|
|
-// background: #f24f45;
|
|
|
-// border-radius: 20px;
|
|
|
-// padding:0 10px;
|
|
|
-// color:#fff;
|
|
|
-// font-size:16px;
|
|
|
-// border:none;
|
|
|
-// }
|
|
|
-// </style>
|
|
|
-// `;
|
|
|
+ mounted() {
|
|
|
+ // 自定义html内容
|
|
|
+ let content = `
|
|
|
+ <button class="test-btn">点我跳转小程序</button>
|
|
|
+ <style>
|
|
|
+ .test-btn{
|
|
|
+ width:100%;
|
|
|
+ background: #f24f45;
|
|
|
+ border-radius: 20px;
|
|
|
+ padding:0 10px;
|
|
|
+ color:#fff;
|
|
|
+ font-size:16px;
|
|
|
+ border:none;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ `;
|
|
|
|
|
|
-// let launchParams = {
|
|
|
-// appid: "gh_wxb86cb7f459fc3675",
|
|
|
-// eleId: "launch-btn", // 元素id
|
|
|
-// url: "pages/home/home.html", // 跳转小程序的页面路径
|
|
|
-// content: content, // 自定义的html内容
|
|
|
-// };
|
|
|
-// wx_launch(launchParams);
|
|
|
-// },
|
|
|
+ let launchParams = {
|
|
|
+ appid: "gh_wxb86cb7f459fc3675",
|
|
|
+ eleId: "launch-btn", // 元素id
|
|
|
+ url: "pages/home/home.html", // 跳转小程序的页面路径
|
|
|
+ content: content, // 自定义的html内容
|
|
|
+ };
|
|
|
+ wx_launch(launchParams);
|
|
|
+ },
|
|
|
destroyed() {},
|
|
|
};
|
|
|
</script>
|