enterprise.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="column" style="height: 100%;position: relative;">
  3. <view class="top-content ">
  4. <view class="status_bar" :style="{height: statusBarHeight+'px'}"></view>
  5. <!-- 这里是状态栏 -->
  6. <view class="top-title">企业理念</view>
  7. </view>
  8. <view :style="{marginTop: `calc(${statusBarHeight}px + 88rpx)`}">
  9. <view class="imgbox">
  10. <image :src="enterpriseimg[0]" mode="widthFix"></image>
  11. <view class="myVideobox">
  12. <video id="myVideo" :src='enterpriseurl'
  13. show-mute-btn='true' @fullscreenchange='changvideo'
  14. vslide-gesture-in-fullscreen='true' :muted='muted' loop='true'
  15. @error="videoErrorCallback" enable-danmu controls autoplay="true"
  16. class="videotop"></video>
  17. <!-- <video class="myVideo" id="myVideo" :src="enterpriseurl"
  18. @error="videoErrorCallback" controls></video> -->
  19. </view>
  20. </view>
  21. <view class="imgbox column">
  22. <image :src="enterpriseimg[1]" mode="widthFix"></image>
  23. <image :src="enterpriseimg[2]" mode="widthFix"></image>
  24. <image :src="enterpriseimg[3]" mode="widthFix"></image>
  25. </view>
  26. </view>
  27. <!-- <tabbar :actindex="1"></tabbar> -->
  28. </view>
  29. </template>
  30. <script>
  31. // import{getenterprise} from '@/api/index.js'
  32. export default {
  33. data() {
  34. return {
  35. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  36. enterpriseurl:'https://hylj-1323137866.cos.ap-chongqing.myqcloud.com/userVideo/2025328/1743138661878.mp4',
  37. enterpriseimg:[
  38. 'https://cos.his.cdwjyyh.com/fs/20250328/35a52839074940cb9ba7c1208140e3c7.png',
  39. 'https://cos.his.cdwjyyh.com/fs/20250328/39f2e5fc37da4240850313e69caa120c.png',
  40. 'https://cos.his.cdwjyyh.com/fs/20250328/628f59a6f3864541a0599886fae8e54e.png',
  41. 'https://cos.his.cdwjyyh.com/fs/20250328/f13448a48d3c491ab40b44e749983fed.png'
  42. ],
  43. muted:true,
  44. }
  45. },
  46. //发送给朋友
  47. onShareAppMessage(res) {
  48. return {
  49. title: "御君方互联网医院",
  50. path: '/pages/index/index',
  51. imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  52. }
  53. },
  54. //分享到朋友圈
  55. onShareTimeline(res) {
  56. return {
  57. title: "御君方互联网医院",
  58. path: '/pages/index/index',
  59. imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  60. }
  61. },
  62. mounted() {
  63. const imgs = []
  64. // this.enterpriseimg= imgs.split(',')
  65. // this.enterpriseurl='https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250115/1736925706514.mp4'
  66. // this.getenterprise()
  67. },
  68. methods: {
  69. changvideo(e){
  70. if(e.target.fullScreen==true){
  71. this.muted=false
  72. }else{
  73. this.muted=true
  74. }
  75. e.target.fullScreen
  76. },
  77. getenterprise(){
  78. getenterprise().then(res=>{
  79. this.enterpriseurl=res.data.videoUrl
  80. this.enterpriseimg=res.data.images
  81. const url=this.enterpriseimg.split(',')
  82. this.enterpriseimg=url
  83. uni.setStorageSync('enterpriseurl',this.enterpriseurl)
  84. console.log(res)
  85. })
  86. },
  87. videoErrorCallback: function(e) {
  88. },
  89. // navToTest() {
  90. // const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
  91. // uni.navigateTo({
  92. // url: '/pages_course/video?course='+JSON.stringify(course)
  93. // })
  94. // }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .top-content {
  100. width: 100%;
  101. z-index: 10;
  102. position: fixed;
  103. top: 0;
  104. left: 0;
  105. background-color: #FFFFFF;
  106. .top-title {
  107. height: 88rpx;
  108. line-height: 88rpx;
  109. font-size: 42rpx;
  110. font-family: Source Han Sans CN;
  111. font-weight: bold;
  112. color: #222222;
  113. padding-left: 41rpx;
  114. background-color: #FFFFFF;
  115. }
  116. }
  117. .imgbox{
  118. position: relative;
  119. image{
  120. width: 100%;
  121. display: block;
  122. }
  123. }
  124. .videotop{
  125. width: calc(100% - 60rpx);
  126. height: 421rpx;
  127. border-radius: 20rpx;
  128. position: absolute;
  129. bottom: 30rpx;
  130. left: 50%;
  131. z-index: 9;
  132. transform: translateX(-50%);
  133. }
  134. </style>