warning.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view>
  3. <view class="warning-page">
  4. <view class="video-wrap">
  5. <video
  6. id="myVideo"
  7. show-mute-btn="true"
  8. :src="videoUrl"
  9. object-fit="contain"
  10. class="warning-video"
  11. ></video>
  12. </view>
  13. <view class="btn-wrap">
  14. <button class="admin-button-com big blue back-btn" @click="goBack">返回</button>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. /**
  21. * 花店端警示说明视频页;续费成功等场景跳转播放平台通知视频。
  22. */
  23. import { APIHOST } from '@/config'
  24. export default {
  25. name: 'noticeWarning',
  26. data() {
  27. return {
  28. videoUrl: ''
  29. }
  30. },
  31. methods: {
  32. // globalMixins onLoad 会调用 init,此处加载并自动播放警示视频
  33. init() {
  34. this.videoUrl = APIHOST + '/jc/warning.mp4'
  35. this.videoContext = uni.createVideoContext('myVideo', this)
  36. this.videoContext.play()
  37. },
  38. goBack() {
  39. uni.navigateBack()
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .warning-page {
  46. padding: 40upx 20upx;
  47. width: 95vw;
  48. font-size: 36upx;
  49. }
  50. .video-wrap {
  51. margin-top: 20upx;
  52. }
  53. .warning-video {
  54. width: 700upx;
  55. height: 1100upx;
  56. }
  57. .btn-wrap {
  58. margin-top: 40upx;
  59. text-align: center;
  60. }
  61. .back-btn {
  62. width: 200upx;
  63. }
  64. </style>