enterprise.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. </view>
  18. </view> -->
  19. <view class="imgbox column">
  20. <image v-for="img in enterpriseimg" :src="img" mode="widthFix"></image>
  21. </view>
  22. </view>
  23. <!-- <tabbar :actindex="1"></tabbar> -->
  24. </view>
  25. </template>
  26. <script>
  27. // import{getenterprise} from '@/api/index.js'
  28. export default {
  29. data() {
  30. return {
  31. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  32. enterpriseurl:'https://hylj-1323137866.cos.ap-chongqing.myqcloud.com/userVideo/2025328/1743138661878.mp4',
  33. enterpriseimg:[
  34. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/1ef08d879f6e49e69f49486424610b98.jpg',
  35. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/11d396a6867049f083db1eeb05801f7a.jpg',
  36. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/5048e93ec50e446fbb091993e76a6bd4.jpg',
  37. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/ada7714e48dc4ce8913817b0361ae8c1.jpg',
  38. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/e2b0a1c907b249fabf49d4482e551ec9.jpg',
  39. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/3b81107b9cda41bbb1f93988a1b4f368.jpg',
  40. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/9ae3f14f232a40f485989677f8d02323.jpg',
  41. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/53a12478f8a14c01b803eec481ee0f85.jpg',
  42. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/f7c09e4845d740549ee38662aa379e50.jpg',
  43. 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250429/5193ff633d554a49b80e271dba9a647d.jpg'
  44. ],
  45. muted:true,
  46. }
  47. },
  48. //发送给朋友
  49. onShareAppMessage(res) {
  50. return {
  51. title: "木易华康",
  52. path: '/pages/index/index',
  53. imageUrl: 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  54. }
  55. },
  56. //分享到朋友圈
  57. onShareTimeline(res) {
  58. return {
  59. title: "木易华康",
  60. imageUrl: 'https://fs-1346741853.cos.ap-chengdu.myqcloud.com/fs/20250323/6189704f2e134b84ad9c9e7c9999f103.jpg' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  61. }
  62. },
  63. mounted() {
  64. // this.getenterprise()
  65. },
  66. methods: {
  67. changvideo(e){
  68. if(e.target.fullScreen==true){
  69. this.muted=false
  70. }else{
  71. this.muted=true
  72. }
  73. e.target.fullScreen
  74. },
  75. getenterprise(){
  76. getenterprise().then(res=>{
  77. this.enterpriseurl=res.data.videoUrl
  78. this.enterpriseimg=res.data.images
  79. const url=this.enterpriseimg.split(',')
  80. this.enterpriseimg=url
  81. uni.setStorageSync('enterpriseurl',this.enterpriseurl)
  82. console.log(res)
  83. })
  84. },
  85. videoErrorCallback: function(e) {
  86. },
  87. // navToTest() {
  88. // const course = {"companyId":100,"companyUserId":6806,"corpId":"ww5a88c4f879f204c5","courseId":63,"link":"1899022782092541952","linkType":3,"qwExternalId":9914983,"qwUserId":"18931","videoId":409}
  89. // uni.navigateTo({
  90. // url: '/pages_course/video?course='+JSON.stringify(course)
  91. // })
  92. // }
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. .top-content {
  98. width: 100%;
  99. z-index: 10;
  100. position: fixed;
  101. top: 0;
  102. left: 0;
  103. background-color: #FFFFFF;
  104. .top-title {
  105. height: 88rpx;
  106. line-height: 88rpx;
  107. font-size: 42rpx;
  108. font-family: Source Han Sans CN;
  109. font-weight: bold;
  110. color: #222222;
  111. padding-left: 41rpx;
  112. background-color: #FFFFFF;
  113. }
  114. }
  115. .imgbox{
  116. position: relative;
  117. image{
  118. width: 100%;
  119. display: block;
  120. }
  121. }
  122. .videotop{
  123. width: calc(100% - 60rpx);
  124. height: 421rpx;
  125. border-radius: 20rpx;
  126. position: absolute;
  127. bottom: 30rpx;
  128. left: 50%;
  129. z-index: 9;
  130. transform: translateX(-50%);
  131. }
  132. </style>