video.vue 701 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <video :src="info.path"></video>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. info: {},
  13. };
  14. },
  15. onLoad(e) {
  16. const that = this;
  17. let info = {
  18. path: e.path || '',
  19. name: e.name || ''
  20. }
  21. that.$set(that, `info`, info);
  22. that.search()
  23. },
  24. methods: {
  25. search() {
  26. const that = this;
  27. if (that.info && that.info.name) {
  28. uni.setNavigationBarTitle({
  29. title: that.info.name
  30. });
  31. }
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. .content {
  38. .one {
  39. text-align: center;
  40. padding: 10px;
  41. video {
  42. width: 100%;
  43. height: 250px;
  44. }
  45. }
  46. }
  47. </style>