sourceReport.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view class="source-report">
  3. <view class="source-content">
  4. <view class="source-box">
  5. <view class="steps">
  6. <view class="steps-list">
  7. <view class="steps-item" :class="{ active: activeIndex == index }"
  8. v-for="(item, index) in steps" :key="index">
  9. <view class="name">{{ item }}</view>
  10. <view class="dot"></view>
  11. </view>
  12. </view>
  13. </view>
  14. <!-- 位置 -->
  15. <view class="position-wrap">
  16. <view class="address">
  17. <image class="location-img" src="/static/home/adress-icon.png" mode=""></image>
  18. <span>荔枝博览园(江埔街道江埔街环市东路1280号广州市从化区)</span>
  19. </view>
  20. </view>
  21. <!-- 关闭,下一页 -->
  22. <view class="footer-btn">
  23. <div class="btn-item pre" v-show="activeIndex!==0" @click="hanldePrev">上一页</div>
  24. <view class="btn-item close" @click="goBack">关闭</view>
  25. <view class="btn-item next" v-show="activeIndex!==5" @click="hanldeNext">下一页</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="report-info">
  30. <swiper ref="swiperRef" :indicator-dots="true" :autoplay="false" :interval="3000" style="height: 100vh"
  31. :current="activeIndex">
  32. <swiper-item>
  33. <view class="item-content">
  34. <video v-if="url" :src="url" object-fit="cover" ref="myVideo" :show-fullscreen-btn="false"
  35. :autoplay="true" class="mp4" loop muted controls @canplay="onVideoReady">
  36. </video>
  37. <view class="mp4-title">
  38. <span>在线赏园</span>
  39. <view class="text">科学定义好吃,数字评估生态</view>
  40. </view>
  41. </view>
  42. </swiper-item>
  43. <swiper-item>
  44. <view class="item-content">
  45. <up-image class="img-dom" width="100%"
  46. src="https://birdseye-img-ali-cdn.sysuimars.com//farmTeamImg/1749100102865.png"
  47. mode="widthFix"></up-image>
  48. </view>
  49. </swiper-item>
  50. <swiper-item>
  51. <view class="item-content" v-if="activeIndex === 2">
  52. <banner-two-vue></banner-two-vue>
  53. </view>
  54. </swiper-item>
  55. <swiper-item>
  56. <view class="item-content">
  57. <banner-three-vue></banner-three-vue>
  58. </view>
  59. </swiper-item>
  60. <swiper-item>
  61. <view class="item-content">
  62. <banner-four-vue></banner-four-vue>
  63. </view>
  64. </swiper-item>
  65. <swiper-item>
  66. <view class="item-content">
  67. <banner-five-vue></banner-five-vue>
  68. </view>
  69. </swiper-item>
  70. </swiper>
  71. </view>
  72. </view>
  73. </template>
  74. <script setup>
  75. import bannerTwoVue from '../components/bannerTwo.vue';
  76. import bannerThreeVue from '../components/bannerThree.vue';
  77. import bannerFourVue from '../components/bannerFour.vue';
  78. import bannerFiveVue from '../components/bannerFive.vue';
  79. import {
  80. ref,
  81. } from 'vue';
  82. const activeIndex = ref(0)
  83. const steps = ["美景", "果园", "环境", "气象", "农事", "生态"];
  84. const url = ref("https://birdseye-img-ali-cdn.sysuimars.com//fineView/1749132292921.mp4")
  85. const myVideo = ref(null);
  86. const onVideoReady = () => {
  87. myVideo.value.play();
  88. };
  89. const swiperRef = ref(null);
  90. function hanldeNext() {
  91. activeIndex.value++
  92. }
  93. function hanldePrev() {
  94. activeIndex.value--
  95. }
  96. function goBack() {
  97. uni.navigateBack()
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. .source-report {
  102. height: 100vh;
  103. width: 100%;
  104. overflow: hidden;
  105. position: relative;
  106. color: #fff;
  107. .source-content {
  108. position: absolute;
  109. z-index: 2;
  110. width: 100%;
  111. height: 100vh;
  112. pointer-events: none;
  113. .source-box {
  114. position: relative;
  115. width: 100%;
  116. height: 100%;
  117. }
  118. .steps {
  119. padding: 24rpx 8rpx;
  120. width: 100%;
  121. font-size: 13px;
  122. box-sizing: border-box;
  123. .line {
  124. background: rgba(255, 255, 255, 0.18);
  125. width: 100%;
  126. height: 1.5px;
  127. }
  128. .steps-list {
  129. display: flex;
  130. justify-content: space-between;
  131. width: 100%;
  132. border-bottom: 1.5px solid rgba(255, 255, 255, 0.18);
  133. }
  134. .steps-item {
  135. flex: 1;
  136. margin-bottom: -4.5px;
  137. .name {
  138. text-align: center;
  139. background: #035197;
  140. border-radius: 20px;
  141. padding: 3px;
  142. width: 54px;
  143. margin: 0 auto 8px;
  144. font-size: 12px;
  145. }
  146. .dot {
  147. width: 8px;
  148. height: 8px;
  149. background: rgba(0, 0, 0, 0.5);
  150. border-radius: 50%;
  151. margin: auto;
  152. position: relative;
  153. &::before {
  154. content: "";
  155. position: absolute;
  156. left: -2px;
  157. top: -2px;
  158. width: 12px;
  159. height: 12px;
  160. background: rgba(255, 255, 255, 0.3);
  161. border-radius: 50%;
  162. }
  163. }
  164. &.active {
  165. .name {
  166. background-image: linear-gradient(45deg, #ffd887, #ed9e1e);
  167. }
  168. .dot {
  169. background: #ffd489;
  170. }
  171. }
  172. }
  173. }
  174. .position-wrap {
  175. z-index: 2;
  176. position: absolute;
  177. bottom: 110px;
  178. left: 12px;
  179. width: calc(100% - 24px);
  180. display: flex;
  181. flex-direction: column;
  182. align-items: center;
  183. .address {
  184. width: 100%;
  185. color: #f0d09c;
  186. padding: 10px 0;
  187. background: rgba(0, 0, 0, 0.5);
  188. border-radius: 5px;
  189. box-sizing: border-box;
  190. display: flex;
  191. font-size: 13px;
  192. align-items: center;
  193. justify-content: center;
  194. .location-img {
  195. width: 17px;
  196. height: 19px;
  197. margin-right: 4px;
  198. }
  199. }
  200. }
  201. .footer-btn {
  202. position: absolute;
  203. z-index: 2;
  204. padding: 0 12px;
  205. width: 100%;
  206. box-sizing: border-box;
  207. display: flex;
  208. justify-content: space-between;
  209. left: auto;
  210. right: 0;
  211. bottom: 86px;
  212. .btn-item {
  213. font-size: 14px;
  214. color: #FFFFFF;
  215. padding: 7px 18px;
  216. width: 80px;
  217. box-sizing: border-box;
  218. border-radius: 25px;
  219. border: 1px solid rgba(255, 255, 255, 0.3);
  220. text-align: center;
  221. font-weight: 500;
  222. background: rgba(0, 0, 0, 0.6);
  223. pointer-events: all;
  224. }
  225. .pre {
  226. position: absolute;
  227. left: 12px;
  228. }
  229. .close {
  230. position: absolute;
  231. left: 50%;
  232. transform: translateX(-50%);
  233. }
  234. .next {
  235. position: absolute;
  236. left: auto;
  237. right: 12px;
  238. }
  239. .save {
  240. color: #ff8400;
  241. }
  242. }
  243. }
  244. .report-info {
  245. .item-content {
  246. height: 100vh;
  247. width: 100%;
  248. .mp4 {
  249. width: 100%;
  250. height: 100%;
  251. object-fit: cover;
  252. ::v-deep {
  253. .uni-video-video {
  254. object-fit: cover !important;
  255. }
  256. }
  257. }
  258. .mp4-title {
  259. position: absolute;
  260. top: 62px;
  261. left: 24px;
  262. font-size: 45px;
  263. span {
  264. font-family: "jiangxizhuokai";
  265. }
  266. .text {
  267. margin-top: 4px;
  268. font-size: 16px;
  269. }
  270. }
  271. }
  272. }
  273. }
  274. </style>