video.vue 490 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <view>
  3. <web-view v-if=url :src="url"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import {
  8. server_host
  9. } from "@/config/system"
  10. export default {
  11. data() {
  12. return {
  13. url: null,
  14. }
  15. },
  16. mounted() {
  17. const token = uni.getStorageSync('token')
  18. console.log('token', token);
  19. this.url = `/hybrid/html/player.html?token=${token}&base=${server_host}`
  20. },
  21. methods: {
  22. }
  23. }
  24. </script>
  25. <style>
  26. #player {
  27. width: 100vw;
  28. height: calc(100vw * 5 / 8)
  29. }
  30. </style>