enterprise.vue 4.3 KB

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