transmit.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view :class="[AppTheme]" class="transmit">
  3. <view class="pop">
  4. <view class="video_blck">
  5. <yfsVideo :src="videoSrc"></yfsVideo>
  6. </view>
  7. </view>
  8. <admyself :opshow="true"></admyself>
  9. </view>
  10. </template>
  11. <script>
  12. import Api from '@/api/broadcast/index.js';
  13. import yfsVideo from '@/components/yfs-video/yfs-video.vue';
  14. export default {
  15. data() {
  16. return {
  17. primary: this.$theme.primary,
  18. videoSrc: '',
  19. title: '',
  20. settingFile: getApp().globalData.siteinfo
  21. };
  22. },
  23. components: {
  24. yfsVideo
  25. },
  26. onLoad(options) {
  27. let that = this;
  28. Api.getvideo({
  29. id: options.id
  30. }).then(res => {
  31. if (res.status == 200) {
  32. console.log(res.data)
  33. that.videoSrc = res.data.src;
  34. uni.setNavigationBarTitle({
  35. title: res.data.title,
  36. success: () => {
  37. console.log("修改标题成功")
  38. },
  39. fail: () => {
  40. console.log("修改标题失败")
  41. },
  42. complete: () => {
  43. console.log("修改标题结束")
  44. },
  45. })
  46. that.title = res.data.title;
  47. } else {
  48. that.$api.msg(res.msg);
  49. setTimeout(() => {
  50. uni.navigateBack({})
  51. }, 1000)
  52. }
  53. });
  54. },
  55. methods: {
  56. },
  57. };
  58. </script>
  59. <style lang="scss">
  60. page {
  61. width: 100%;
  62. height: 100%;
  63. }
  64. .transmit {
  65. width: 100%;
  66. height: 100%;
  67. .pop {
  68. top: 0;
  69. left: 0;
  70. width: 100%;
  71. .video_blck {
  72. width: 100%;
  73. height: 100%;
  74. justify-content: cener;
  75. align-items: center;
  76. }
  77. }
  78. .left_img {
  79. position: absolute;
  80. top: 80rpx;
  81. left: 25rpx;
  82. z-index: 9;
  83. image {
  84. width: 25rpx;
  85. height: 30rpx;
  86. }
  87. }
  88. }
  89. </style>