sourceReport.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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="`${config.BASIC_IMG}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%" height="100vh"
  46. src="https://birdseye-img-ali-cdn.sysuimars.com//farmTeamImg/1749100102865.png"
  47. mode="scaleToFill"></up-image>
  48. </view>
  49. </swiper-item>
  50. <swiper-item>
  51. <view class="item-content">
  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 config from "@/api/config.js"
  76. import bannerTwoVue from '../components/bannerTwo.vue';
  77. import bannerThreeVue from '../components/bannerThree.vue';
  78. import bannerFourVue from '../components/bannerFour.vue';
  79. import bannerFiveVue from '../components/bannerFive.vue';
  80. import {
  81. ref,
  82. } from 'vue';
  83. const activeIndex = ref(0)
  84. const steps = ["美景", "果园", "环境", "气象", "农事", "生态"];
  85. const url = ref("https://birdseye-img-ali-cdn.sysuimars.com//fineView/1749132292921.mp4")
  86. const myVideo = ref(null);
  87. const onVideoReady = () => {
  88. myVideo.value.play();
  89. };
  90. const swiperRef = ref(null);
  91. function hanldeNext() {
  92. activeIndex.value++
  93. }
  94. function hanldePrev() {
  95. activeIndex.value--
  96. }
  97. function goBack() {
  98. uni.navigateBack()
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .source-report {
  103. height: 100vh;
  104. width: 100%;
  105. overflow: hidden;
  106. position: relative;
  107. color: #fff;
  108. .source-content {
  109. position: absolute;
  110. z-index: 2;
  111. width: 100%;
  112. height: 100vh;
  113. pointer-events: none;
  114. .source-box {
  115. position: relative;
  116. width: 100%;
  117. height: 100%;
  118. }
  119. .steps {
  120. padding: 24rpx 8rpx;
  121. width: 100%;
  122. font-size: 13px;
  123. box-sizing: border-box;
  124. .line {
  125. background: rgba(255, 255, 255, 0.18);
  126. width: 100%;
  127. height: 1.5px;
  128. }
  129. .steps-list {
  130. display: flex;
  131. justify-content: space-between;
  132. width: 100%;
  133. border-bottom: 1.5px solid rgba(255, 255, 255, 0.18);
  134. }
  135. .steps-item {
  136. flex: 1;
  137. margin-bottom: -4.5px;
  138. .name {
  139. text-align: center;
  140. background: #035197;
  141. border-radius: 20px;
  142. padding: 3px;
  143. width: 54px;
  144. margin: 0 auto 8px;
  145. font-size: 12px;
  146. }
  147. .dot {
  148. width: 8px;
  149. height: 8px;
  150. background: rgba(0, 0, 0, 0.5);
  151. border-radius: 50%;
  152. margin: auto;
  153. position: relative;
  154. &::before {
  155. content: "";
  156. position: absolute;
  157. left: -2px;
  158. top: -2px;
  159. width: 12px;
  160. height: 12px;
  161. background: rgba(255, 255, 255, 0.3);
  162. border-radius: 50%;
  163. }
  164. }
  165. &.active {
  166. .name {
  167. background-image: linear-gradient(45deg, #ffd887, #ed9e1e);
  168. }
  169. .dot {
  170. background: #ffd489;
  171. }
  172. }
  173. }
  174. }
  175. .position-wrap {
  176. z-index: 2;
  177. position: absolute;
  178. bottom: 110px;
  179. left: 12px;
  180. width: calc(100% - 24px);
  181. display: flex;
  182. flex-direction: column;
  183. align-items: center;
  184. .address {
  185. width: 100%;
  186. color: #f0d09c;
  187. padding: 10px 0;
  188. background: rgba(0, 0, 0, 0.5);
  189. border-radius: 5px;
  190. box-sizing: border-box;
  191. display: flex;
  192. font-size: 13px;
  193. align-items: center;
  194. justify-content: center;
  195. .location-img {
  196. width: 17px;
  197. height: 19px;
  198. margin-right: 4px;
  199. }
  200. }
  201. }
  202. .footer-btn {
  203. position: absolute;
  204. z-index: 2;
  205. padding: 0 12px;
  206. width: 100%;
  207. box-sizing: border-box;
  208. display: flex;
  209. justify-content: space-between;
  210. left: auto;
  211. right: 0;
  212. bottom: 86px;
  213. .btn-item {
  214. font-size: 14px;
  215. color: #FFFFFF;
  216. padding: 7px 18px;
  217. width: 80px;
  218. box-sizing: border-box;
  219. border-radius: 25px;
  220. border: 1px solid rgba(255, 255, 255, 0.3);
  221. text-align: center;
  222. font-weight: 500;
  223. background: rgba(0, 0, 0, 0.6);
  224. pointer-events: all;
  225. }
  226. .pre {
  227. position: absolute;
  228. left: 12px;
  229. }
  230. .close {
  231. position: absolute;
  232. left: 50%;
  233. transform: translateX(-50%);
  234. }
  235. .next {
  236. position: absolute;
  237. left: auto;
  238. right: 12px;
  239. }
  240. .save {
  241. color: #ff8400;
  242. }
  243. }
  244. }
  245. .report-info {
  246. .item-content {
  247. height: 100vh;
  248. width: 100%;
  249. .mp4 {
  250. width: 100%;
  251. height: 100%;
  252. object-fit: cover;
  253. ::v-deep {
  254. .uni-video-video {
  255. object-fit: cover !important;
  256. }
  257. }
  258. }
  259. .mp4-title {
  260. position: absolute;
  261. top: 62px;
  262. left: 24px;
  263. font-size: 45px;
  264. span {
  265. font-family: "jiangxizhuokai";
  266. }
  267. .text {
  268. margin-top: 4px;
  269. font-size: 16px;
  270. }
  271. }
  272. }
  273. }
  274. }
  275. </style>