startPage.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <template>
  2. <view class="start-page">
  3. <image class="circle" src="../../../static/images/jobApplicant/Circle.svg" mode="aspectFill"></image>
  4. <view class="start-content">
  5. <swiper
  6. class="custom-swiper"
  7. autoplay
  8. :current="currentIndex"
  9. @change="onSwiperChange"
  10. >
  11. <swiper-item v-for="(item, index) in ads" :key="index">
  12. <view v-if="currentIndex<ads.length-1" @click="goLogin" class="skip">Skip</view>
  13. <view class="content">
  14. <image
  15. :src="item.cover"
  16. class="wumen-img"
  17. mode="aspectFill"
  18. />
  19. <view class="txt-box">
  20. <view class="start-logo">
  21. <image
  22. src="../../../static/images/jobApplicant/logo-column.svg"
  23. mode="scaleToFill"
  24. />
  25. </view>
  26. <view class="start-title">{{item.title}}</view>
  27. <view class="start-desc"
  28. >{{item.desc}} <br />
  29. {{item.desc1}}</view
  30. >
  31. </view>
  32. </view></swiper-item
  33. >
  34. </swiper>
  35. <!-- 自定义指示器 -->
  36. <view class="custom-indicator">
  37. <view
  38. v-for="(item, index) in ads"
  39. :key="index"
  40. class="indicator-dot"
  41. :class="{ active: currentIndex === index }"
  42. @click="switchBanner(index)"
  43. ></view>
  44. </view>
  45. </view>
  46. <view class="start-btn" @click="goLogin">开启探索之旅</view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. currentIndex: 0,
  54. ads:[
  55. {
  56. cover:'../../../static/images/jobApplicant/wumen.svg',
  57. title:'让你的逐梦之路更简单',
  58. desc:'星光不负逐梦人',
  59. desc1:'愿你在亿职赞找到心仪的工作',
  60. },
  61. {
  62. cover:'../../../static/images/jobApplicant/wumen1.svg',
  63. title:'垂直跨境岗 精准配才强',
  64. desc:'跨境人才直通车',
  65. desc1:'招聘求职零弯路',
  66. },
  67. {
  68. cover:'../../../static/images/jobApplicant/wumen2.svg',
  69. title:'人才秒配 跨境不等待',
  70. desc:'跨境电商',
  71. desc1:'垂直人才精准链接平台人',
  72. }
  73. ]
  74. };
  75. },
  76. methods: {
  77. // 轮播图切换事件
  78. onSwiperChange(e) {
  79. this.currentIndex = e.detail.current;
  80. },
  81. // 切换轮播图
  82. switchBanner(index) {
  83. this.currentIndex = index;
  84. },
  85. // 点击轮播图
  86. handleBannerClick(item) {
  87. if (item.link) {
  88. uni.navigateTo({
  89. url: item.link,
  90. });
  91. }
  92. },
  93. goLogin() {
  94. // uni.navigateTo({
  95. // url: "/pages/my/jobApplicant/login",
  96. // });
  97. // #ifdef H5
  98. this.$queue.toLogin('navigateTo')
  99. // #endif
  100. // #ifdef APP-PLUS
  101. uni.navigateTo({
  102. url: '/pages/public/loginV2?isFirst=1'
  103. })
  104. // #endif
  105. },
  106. // 暂停自动播放
  107. pauseAutoplay() {
  108. this.autoplay = false;
  109. },
  110. // 开始自动播放
  111. startAutoplay() {
  112. this.autoplay = true;
  113. },
  114. },
  115. onShow() {
  116. // 页面显示时恢复自动播放
  117. this.startAutoplay();
  118. },
  119. onHide() {
  120. // 页面隐藏时暂停自动播放
  121. this.pauseAutoplay();
  122. },
  123. };
  124. </script>
  125. <style lang="scss" scoped>
  126. .skip{
  127. color: #fff;
  128. text-align: right;
  129. position: absolute;
  130. right: 4%;
  131. top: 4%;
  132. }
  133. .circle{
  134. width: 100vw;
  135. height:100vw;
  136. top:-16vw;
  137. left:-15vw;
  138. position:absolute;
  139. z-index: 0;
  140. transform: rotate(160deg) scale(2.5);
  141. }
  142. .start-page {
  143. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  144. // position: absolute;
  145. // left: 0;
  146. // right: 0;
  147. // top: 0;
  148. // bottom: 0;
  149. display: flex;
  150. flex-direction: column;
  151. padding: 20rpx 24rpx;
  152. box-sizing: border-box;
  153. height: 100vh;
  154. box-sizing: border-box;
  155. // background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  156. // position: fixed;
  157. // top: 0;
  158. // left: 0;
  159. // width: 100%;
  160. // height: 100%;
  161. // height: calc(100vh + constant(safe-area-inset-bottom));
  162. // height: calc(100vh + env(safe-area-inset-bottom));
  163. // display: flex;
  164. // flex-direction: column;
  165. // padding: 20rpx 24rpx;
  166. // box-sizing: border-box;
  167. // overflow: hidden;
  168. // z-index: 0;
  169. .start-content {
  170. padding: 28rpx;
  171. box-sizing: border-box;
  172. padding-top: 5vh;
  173. box-sizing: border-box;
  174. flex: 1;
  175. .content {
  176. position: relative;
  177. margin-top: 780rpx;
  178. .wumen-img {
  179. // width: 614rpx;
  180. height: 780rpx;
  181. position: absolute;
  182. left: 0;
  183. right: 0;
  184. top: -760rpx;
  185. margin: auto;
  186. z-index: 1;
  187. }
  188. .txt-box {
  189. position: relative;
  190. background-color: #fff;
  191. border-radius: 64rpx;
  192. padding: 64rpx 48rpx;
  193. box-sizing: border-box;
  194. z-index: 20;
  195. .start-logo {
  196. margin: auto;
  197. width: 240rpx;
  198. height: 66rpx;
  199. image {
  200. width: 100%;
  201. height: 100%;
  202. }
  203. }
  204. .start-title {
  205. color: #016bf6;
  206. font-family: DM Sans;
  207. font-size: 48rpx;
  208. font-weight: 700;
  209. line-height: 32px;
  210. letter-spacing: 0%;
  211. text-align: center;
  212. padding: 48rpx 0;
  213. box-sizing: border-box;
  214. }
  215. .start-desc {
  216. color: #9ca4ab;
  217. font-family: DM Sans;
  218. font-size: 28rpx;
  219. font-weight: 400;
  220. line-height: 44rpx;
  221. letter-spacing: 0%;
  222. text-align: center;
  223. }
  224. }
  225. }
  226. }
  227. .start-btn {
  228. flex-shrink: 0;
  229. color: #016bf6;
  230. font-family: DM Sans;
  231. font-size: 32rpx;
  232. font-weight: 400;
  233. line-height: 48rpx;
  234. letter-spacing: 0%;
  235. text-align: center;
  236. background-color: #fff;
  237. border-radius: 100rpx;
  238. padding: 16rpx 32rpx;
  239. box-sizing: border-box;
  240. display: flex;
  241. justify-content: center;
  242. align-items: center;
  243. margin-bottom: 52rpx;
  244. }
  245. .custom-swiper {
  246. height: 100%;
  247. }
  248. .custom-indicator {
  249. display: flex;
  250. justify-content: center;
  251. align-items: center;
  252. margin-top: -60rpx;
  253. gap: 16rpx;
  254. position: relative;
  255. z-index: 3;
  256. .indicator-dot {
  257. width: 20rpx;
  258. height: 20rpx;
  259. border-radius: 50%;
  260. background: #fff;
  261. transition: all 0.3s ease;
  262. &.active {
  263. width: 64rpx;
  264. border-radius: 20rpx;
  265. background: #fff;
  266. }
  267. }
  268. }
  269. }
  270. </style>