index.vue 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <script setup lang="ts">
  2. import left_top_logo from '@/static/image/shouye/lt_logo.png'
  3. import Rectangle from '@/static/image/shouye/Rectangle.png'
  4. import ToolFun from '@/utils/index'
  5. const titleName = ref<string>('首页')
  6. const safeHeight = ToolFun.getSafeHeight()
  7. const videoSrc = ref(
  8. 'https://test-cos-1308655658.cos.ap-shanghai.myqcloud.com/bright-intro-video.mp4',
  9. )
  10. function startFiling() {
  11. uni.navigateTo({ url: '/pages/start-filing/index' })
  12. }
  13. </script>
  14. <template>
  15. <TitleBar :title-name="titleName" />
  16. <view
  17. class="flex flex-col bg-[#F5F6F7] overflow-y-auto"
  18. :style="`height: calc(100vh - ${safeHeight}px)`"
  19. >
  20. <view class="container">
  21. <video
  22. class="absolute top-0 left-0 w-screen h-screen"
  23. :src="videoSrc"
  24. autoplay
  25. loop
  26. object-fit="cover"
  27. muted
  28. :controls="false"
  29. />
  30. <view class="content absolute box-border top-0 left-0 w-full h-full p-[23px]">
  31. <image :src="left_top_logo" class="left-3 w-48 h-6" />
  32. <view
  33. class="content_text flex justify-between flex-col w-full h-full items-center "
  34. >
  35. <view
  36. class="flex justify-center flex-col text-[29px] w-full items-center mt-[100px]
  37. tracking-[5.45px] text-[#FFF] leading-[37px]"
  38. >
  39. <view>为你的爱宠建档</view>
  40. <view>制定专业喂养方案</view>
  41. <view class="mt-[15px] text-[12px] text-center font-normal tracking-[1.45px] leading-[16px]">
  42. 科学喂养专业有爱
  43. </view>
  44. </view>
  45. <view class="flex justify-center flex-col w-full items-center h-full mt-[200px] text-[#FFF]">
  46. <view
  47. class="content_botton flex w-[176px] h-[47px] justify-center
  48. items-center bg-[#4545E5] rounded-[69px]"
  49. >
  50. <button
  51. class=" text-[18px] font-normal
  52. tracking-[.36px] leading-[37px] shrink-0" hover-class="bg-[#4545E5]"
  53. @tap="startFiling"
  54. >
  55. 开始建档
  56. </button>
  57. </view>
  58. <view class="content_details tracking-[1.8px] mt-[40px] text-[12px] font-normal ">
  59. 下拉了解详情
  60. </view>
  61. <view class="content_img mt-[15px]">
  62. <image :src="Rectangle" class="w-[15px] h-[8.485px] shrink-0 stroke-[2px] fill-white stroke-white" />
  63. <image :src="Rectangle" class="w-[15px] h-[8.485px] shrink-0 stroke-[2px] fill-white stroke-white" />
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </template>
  71. <style lang="sass" scoped>
  72. .container
  73. position: relative
  74. width: 100%
  75. height: 650px /* 根据需要设置视频容器的高度 */
  76. /* display: flex; */
  77. overflow: hidden
  78. padding-top: calc(100% / (16 / 9)) /* 视频宽高比 */
  79. .video-player
  80. position: absolute
  81. top: 0
  82. left: 0
  83. width: 100%
  84. height: 100%
  85. controlslist: none
  86. aspect-ratio: 16 / 9
  87. object-fit: cover
  88. </style>