sujectThree.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div class="container">
  3. <div v-html="wxHtml0"></div>
  4. <div v-html="wxHtml1"></div>
  5. <van-button class="my-button" type="primary">前往灯光模拟</van-button>
  6. <van-button class="my-button" type="primary">前往观看视频</van-button>
  7. </div>
  8. </template>
  9. <script setup>
  10. import { ref } from "vue";
  11. let sc = "script";
  12. let sty = "style";
  13. let wxHtml0 = ref(` <wx-open-launch-weapp style="display: block;text-align:center;width:75%;height:48px;border: none;position:absolute;top:0.66rem;z-index:9999;opacity:0" id="launch-btn" username="gh_a994fd2f498e" path="pages/lightMock/index.html?living_code=LIVING_CODE">
  14. <${sc} v-is="'script'" type="text/wxtag-template">
  15. <${sty} v-is="'style'">.openbtn{background-color:#38f;color:#f40;width:100px;height:40px;line-height:40px;}</${sty}>
  16. <div class="openbtn">跳转小程序</div>
  17. </${sc}>
  18. </wx-open-launch-weapp>`);
  19. let wxHtml1 = ref(` <wx-open-launch-weapp style="display: block;width:75%;height:48px;text-align:center;border: none;position:absolute;top:2.4rem;z-index:9999;opacity:0" id="launch-btn" username="gh_a994fd2f498e" path="pages/carVideo/index.html?living_code=LIVING_CODE">
  20. <${sc} v-is="'script'" type="text/wxtag-template">
  21. <${sty} v-is="'style'">.openbtn{background-color:#38f;color:#f40;width:100px;height:40px;line-height:40px;}</${sty}>
  22. <div class="openbtn">跳转小程序</div>
  23. </${sc}>
  24. </wx-open-launch-weapp>`);
  25. </script>
  26. <style lang="scss" scoped>
  27. .container {
  28. width: 100%;
  29. display: flex;
  30. justify-content: center;
  31. position: relative;
  32. flex-wrap: wrap;
  33. }
  34. .my-button {
  35. margin-top: 25px;
  36. width: 75%;
  37. }
  38. </style>