watchLive.vue 529 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view>
  3. <video :src="src" class="live-video"></video>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. src:'',
  11. id:0
  12. }
  13. },
  14. onLoad(e) {
  15. this.id = e.id
  16. this.getInfo()
  17. },
  18. methods: {
  19. getInfo(){
  20. this.$post({
  21. data:{
  22. do:'LiveInfo',
  23. data:{
  24. user_id:uni.getStorageSync('id'),
  25. chapter_id:this.id
  26. }
  27. }
  28. }).then(res=>{
  29. this.src = res.data.live.ll_url
  30. })
  31. }
  32. }
  33. }
  34. </script>
  35. <style>
  36. .live-video{
  37. width: 100%;
  38. }
  39. </style>