gardenItem.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="garden-item-page">
  3. <view class="report-content">
  4. <view class="home-search">
  5. <view class="search-wrap">
  6. <up-search placeholder="搜索品种" v-model="typeSearch"></up-search>
  7. </view>
  8. </view>
  9. <view class="tips">
  10. 下拉查看溯源报告
  11. </view>
  12. <view class="swipe-item">
  13. <video class="video-wrap" src="https://birdseye-img.sysuimars.com/temp/5-25lby.mp4" controls></video>
  14. </view>
  15. </view>
  16. <l-floating-panel v-model:height="panelHeight" :anchors="anchors" :defaultAnchor="2">
  17. <view class="panel-content">
  18. <view class="panel-title">
  19. <view class="title-l">
  20. <image class="garden-img" :src="`${config.BASIC_IMG}home/garden.png`" mode=""></image>
  21. <view class="title-info">
  22. <view class="title-garden">
  23. 从化荔枝博览园
  24. </view>
  25. <view class="btn-second">
  26. 有味指数
  27. <text>4.5分</text>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="title-r">
  32. +
  33. <text class="add-text">关注</text>
  34. </view>
  35. </view>
  36. <view class="panel-video">
  37. <video class="video-dom" src="https://birdseye-img.sysuimars.com/temp/5-25lby.mp4" controls></video>
  38. </view>
  39. <hot-component-vue></hot-component-vue>
  40. </view>
  41. </l-floating-panel>
  42. </view>
  43. </template>
  44. <script setup>
  45. import { ref } from 'vue'
  46. import config from "@/api/config.js"
  47. import hotComponentVue from '../hotComponent.vue'
  48. const typeSearch = ref(null)
  49. const {windowHeight} = uni.getSystemInfoSync()
  50. const anchors = [
  51. 50,
  52. Math.round(0.5 * windowHeight),
  53. Math.round(0.95 * windowHeight),
  54. ];
  55. const panelHeight = ref(anchors[2]);
  56. const myVideo = ref(null);
  57. const onVideoReady = () => {
  58. myVideo.value.play();
  59. };
  60. </script>
  61. <style lang="scss" scoped>
  62. .garden-item-page {
  63. width: 100%;
  64. height: 100vh;
  65. .report-content {
  66. width: 100%;
  67. height: calc(100% - 140rpx);
  68. position: relative;
  69. .home-search {
  70. position: absolute;
  71. z-index: 2;
  72. top: 20rpx;
  73. left: 24rpx;
  74. display: flex;
  75. align-items: center;
  76. width: calc(100% - 48rpx);
  77. border: 2rpx solid rgba(255, 255, 255, 0.39);
  78. border-radius: 40rpx;
  79. margin-bottom: 40rpx;
  80. background-color: rgba(0, 0, 0, 0.31);
  81. .search-wrap {
  82. flex: 1;
  83. // padding-left: 22rpx;
  84. ::v-deep {
  85. .u-search {
  86. .u-search__content {
  87. background-color: transparent !important;
  88. .u-search__content__input {
  89. background-color: transparent !important;
  90. }
  91. }
  92. .uni-input-input {
  93. color: rgba(255, 255, 255, 0.8);
  94. }
  95. .u-search__action {
  96. text-align: center;
  97. line-height: 52rpx;
  98. border-radius: 40rpx;
  99. font-size: 28rpx;
  100. background-color: rgba(255, 255, 255, 0.3);
  101. color: rgba(255, 255, 255, 0.3);
  102. margin: 6rpx 8rpx;
  103. width: 112rpx;
  104. height: 52rpx;
  105. }
  106. }
  107. }
  108. }
  109. }
  110. .tips {
  111. position: absolute;
  112. z-index: 2;
  113. top: 110rpx;
  114. left: 0;
  115. color: #FFFFFF;
  116. font-size: 24rpx;
  117. width: 100%;
  118. text-align: center;
  119. }
  120. .swipe-item {
  121. width: 100%;
  122. height: 100%;
  123. .video-wrap {
  124. width: 100%;
  125. height: 100%;
  126. object-fit: contain;
  127. }
  128. }
  129. }
  130. }
  131. .panel-content {
  132. padding: 24rpx;
  133. .panel-title {
  134. display: flex;
  135. align-items: center;
  136. justify-content: space-between;
  137. .title-l {
  138. flex: 1;
  139. display: flex;
  140. align-items: center;
  141. .garden-img {
  142. width: 100rpx;
  143. height: 100rpx;
  144. border-radius: 10rpx;
  145. }
  146. .title-info {
  147. padding-left: 20rpx;
  148. .title-garden {
  149. color: #000000;
  150. font-size: 28rpx;
  151. font-weight: 600;
  152. padding-bottom: 10rpx;
  153. }
  154. .btn-second {
  155. padding: 0 30rpx;
  156. border-radius: 40rpx;
  157. font-size: 24rpx;
  158. color: #C49600;
  159. background: rgba(255, 217, 94, 0.2);
  160. height: 56rpx;
  161. line-height: 56rpx;
  162. }
  163. }
  164. }
  165. .title-r {
  166. display: flex;
  167. font-size: 24rpx;
  168. padding: 8rpx 22rpx;
  169. background: #FFD95E;
  170. border-radius: 30rpx;
  171. .add-text {
  172. padding-left: 6rpx;
  173. font-weight: 600;
  174. }
  175. }
  176. }
  177. .panel-video {
  178. padding: 20rpx 0;
  179. height: 300rpx;
  180. width: 100%;
  181. .video-dom {
  182. width: 100%;
  183. height: 100%;
  184. object-fit: cover;
  185. border-radius: 10rpx;
  186. }
  187. }
  188. }
  189. </style>