sujectTwo.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div class="container">
  3. <div class="open" v-html="wxHtml0"></div>
  4. <!-- <van-button class="my-button" type="primary">前往观看视频</van-button> -->
  5. </div>
  6. </template>
  7. <script lang="ts" setup>
  8. import { ref } from "vue";
  9. let sc = "script";
  10. let sty = "style";
  11. let wxHtml0 = ref(` <wx-open-launch-weapp style="display: block;text-align:center;width:100%;height:48px;border: none;z-index:9999;opacity:1" id="launch-btn" username="gh_a994fd2f498e" path="pages/index/index.html?living_code=LIVING_CODE">
  12. <${sc} v-is="'script'" type="text/wxtag-template">
  13. <${sty} v-is="'style'">.openbtn{background-color:#1989fa;color:#fff;width:75%;margin:0 auto;height:40px;line-height:40px;text-align:center;}</${sty}>
  14. <div class="openbtn"><span >前往观看视频</span></div>
  15. </${sc}>
  16. </wx-open-launch-weapp>`);
  17. </script>
  18. <style lang="scss" scoped>
  19. .container {
  20. width: 100%;
  21. display: flex;
  22. justify-content: center;
  23. position: relative;
  24. }
  25. .open{
  26. width: 690px;
  27. margin: 0 auto;
  28. margin-top: 25px;
  29. }
  30. .my-button {
  31. margin-top: 25px;
  32. width: 75%;
  33. }
  34. </style>