guide.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="guide-v">
  3. <view class="content">
  4. <swiper class="swiper" @change="onChange">
  5. <swiper-item>
  6. <view class="swiper-item">
  7. <view class="swiper-item-img">
  8. <image class="itemImg" :src="guide1"></image>
  9. </view>
  10. </view>
  11. </swiper-item>
  12. <swiper-item>
  13. <view class="swiper-item">
  14. <view class="swiper-item-img">
  15. <image class="itemImg" :src="guide2"></image>
  16. </view>
  17. </view>
  18. </swiper-item>
  19. <swiper-item>
  20. <view class="swiper-item">
  21. <view class="swiper-item-img">
  22. <image class="itemImg" :src="guide3"></image>
  23. </view>
  24. <view class="swiper-item-btn" @click="setLaunchFlag()">立即体验</view>
  25. </view>
  26. </swiper-item>
  27. </swiper>
  28. <view class="jump-over" @click="setLaunchFlag()">跳过</view>
  29. <view class="bannerDots" v-if="currenTab!=3">
  30. <view class="banner-dot" v-for="(item,index) in bannerDot" :key="index"
  31. :class="{'active':index===currenTab}">
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import resources from '@/libs/resources.js'
  39. export default {
  40. data() {
  41. return {
  42. bannerDot: [0, 1, 2],
  43. currenTab: 0,
  44. guide1: resources.guide.guide1,
  45. guide2: resources.guide.guide2,
  46. guide3: resources.guide.guide3
  47. }
  48. },
  49. methods: {
  50. setLaunchFlag() {
  51. uni.setStorageSync('launchFlag', true)
  52. uni.reLaunch({
  53. url: '/pages/login/index'
  54. })
  55. },
  56. onChange(e) {
  57. this.currenTab = e.detail.current
  58. },
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. page {
  64. width: 100%;
  65. height: 100%;
  66. }
  67. .guide-v {
  68. width: 100%;
  69. height: 100%;
  70. .status-bar {
  71. height: var(--status-bar-height);
  72. width: 100%;
  73. background-color: #FFFFFF;
  74. .top-view {
  75. height: var(--status-bar-height);
  76. width: 100%;
  77. position: fixed;
  78. background-color: #FFFFFF;
  79. top: 0;
  80. z-index: 999;
  81. }
  82. }
  83. .content {
  84. width: 100%;
  85. height: 100%;
  86. background-size: 100% auto;
  87. padding: 0;
  88. touch-action: none;
  89. position: fixed;
  90. }
  91. .swiper {
  92. width: 100%;
  93. height: 100% !important;
  94. background: #FFFFFF;
  95. }
  96. .itemImg {
  97. width: 100%;
  98. height: 100%;
  99. }
  100. .swiper-item {
  101. width: 100%;
  102. height: 100%;
  103. }
  104. .swiper-item-img {
  105. width: 100%;
  106. height: 100%;
  107. }
  108. .swiper-item-text {
  109. .swiper-item-title {
  110. line-height: 130rpx;
  111. font-size: 87rpx;
  112. color: $u-type-primary;
  113. font-weight: 500;
  114. }
  115. .swiper-item-content {
  116. font-size: 28rpx;
  117. color: #666666;
  118. }
  119. }
  120. .bannerDots {
  121. width: 100%;
  122. height: 16rpx;
  123. display: flex;
  124. position: fixed;
  125. bottom: 8%;
  126. z-index: 99;
  127. left: 50%;
  128. transform: translate(-50%);
  129. align-items: center;
  130. justify-content: center;
  131. .banner-dot {
  132. width: 16rpx;
  133. height: 16rpx;
  134. border-radius: 50%;
  135. background: #CACACA;
  136. margin: 0 10rpx;
  137. &.active {
  138. width: 40rpx;
  139. height: 16rpx;
  140. background: $u-type-primary;
  141. border-radius: 8rpx;
  142. }
  143. }
  144. }
  145. .jump-over {
  146. position: absolute;
  147. z-index: 999;
  148. right: 46rpx;
  149. top: 86rpx;
  150. width: 128rpx;
  151. height: 54rpx;
  152. line-height: 54rpx;
  153. color: #fff;
  154. border-radius: 27rpx;
  155. text-align: center;
  156. font-size: 32rpx;
  157. background: rgba(123, 123, 123, 0.42);
  158. }
  159. .swiper-item-btn {
  160. position: absolute;
  161. right: 7rem;
  162. bottom: 10rem;
  163. text-align: center;
  164. width: 296rpx;
  165. height: 84rpx;
  166. background-color: #E8F2FF;
  167. opacity: 1;
  168. border-radius: 50rpx;
  169. line-height: 84rpx;
  170. color: #3463FF;
  171. font-size: 28rpx;
  172. z-index: 99999;
  173. letter-spacing: 2rpx;
  174. }
  175. }
  176. </style>