GoodsVideo.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <home-base :show="false" ><view class="div container common-popup-wrapper" :style="'width:'+getBannerStyle.width+'px;height:'+getBannerStyle.height+'px'">
  3. <view class="div common-header-wrap">
  4. <view :style="'height:'+navHeight+'px'"></view>
  5. <view class="common-header-holder"></view>
  6. <view class="common-header-fixed">
  7. <title-header />
  8. <uni-nav-bar title="视频" class="common-header" left-icon="back" @clickLeft="goBack()">
  9. </uni-nav-bar>
  10. </view>
  11. </view>
  12. <view class="div common-popup-content">
  13. <video v-if="detailInfo.goodsvideo_url" style="width:100%;height:100%" autoplay="autoplay" controls="controls" controlslist="nodownload" :src="detailInfo.goodsvideo_url" />
  14. </view>
  15. </view></home-base>
  16. </template>
  17. <script>
  18. import {getFontSize} from '@/util/common'
  19. import TitleHeader from '../../TitleHeader'
  20. import HomeBase from '../HomeBase'
  21. import { mapState, mapMutations } from 'vuex'
  22. export default {
  23. name:'HomeGoodsVideo',
  24. mounted(){
  25. // #ifdef MP-WEIXIN
  26. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  27. // #endif
  28. },
  29. data(){
  30. return {
  31. navHeight: 0,
  32. }
  33. },
  34. components:{
  35. TitleHeader,
  36. HomeBase,
  37. },
  38. computed:{
  39. fontSize(){
  40. return getFontSize()
  41. },
  42. ...mapState({
  43. detailInfo: state => state.goodsdetail.detailInfo
  44. }),
  45. getBannerStyle: function () {
  46. const res = uni.getSystemInfoSync()
  47. var width = res.windowWidth
  48. var height = res.windowHeight
  49. let itemWidth = width
  50. let itemHeight = height
  51. return {
  52. width: itemWidth,
  53. height: itemHeight
  54. }
  55. },
  56. },
  57. created () {
  58. },
  59. methods:{
  60. goBack(){uni.navigateBack({delta:1})},
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. </style>