ruleCenter.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <view class="rule-center">
  3. <view class="detail-bg"></view>
  4. <nav-bar title="亿职赞规则中心"></nav-bar>
  5. <view class="rule-content">
  6. <view class="rule-title">规则中心</view>
  7. <image
  8. src="@/static/images/my/guizezhongxin.png"
  9. class="rule-image"
  10. mode="scaleToFill"
  11. />
  12. <!-- 自定义轮播图 -->
  13. <view class="banner-box">
  14. <view class="banner-container">
  15. <!-- 轮播图主体 -->
  16. <swiper
  17. class="custom-swiper"
  18. :current="currentIndex"
  19. :autoplay="autoplay"
  20. :interval="interval"
  21. :duration="duration"
  22. circular
  23. @change="onSwiperChange"
  24. >
  25. <swiper-item v-for="(item, index) in bannerList" :key="index">
  26. <view class="banner-item" @click="handleBannerClick(item)">
  27. <view class="banner-content">
  28. <image
  29. src="@/static/images/my/icon/paopao.svg"
  30. mode="aspectFill"
  31. class="paopao paopao-one"
  32. />
  33. <image
  34. src="@/static/images/my/icon/paopao.svg"
  35. mode="aspectFill"
  36. class="paopao paopao-two"
  37. />
  38. <image
  39. src="@/static/images/my/icon/paopao.svg"
  40. mode="aspectFill"
  41. class="paopao paopao-three"
  42. />
  43. <view class="banner-txt">
  44. <view class="banner-title">{{ item.title }}</view>
  45. <view class="banner-subtitle">{{ item.subtitle }}</view>
  46. </view>
  47. <view class="banner-btn" @click="goMianshiBoss">去看看</view>
  48. </view>
  49. </view>
  50. </swiper-item>
  51. </swiper>
  52. <!-- 自定义指示器 -->
  53. <view class="custom-indicator">
  54. <view
  55. v-for="(item, index) in bannerList"
  56. :key="index"
  57. class="indicator-dot"
  58. :class="{ active: currentIndex === index }"
  59. @click="switchBanner(index)"
  60. ></view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="rule-txt-box">
  65. <view class="rule-text">
  66. <view class="rule-text-title">平台总则</view>
  67. <view class="rule-text-desc">亿职赞规则公约</view>
  68. </view>
  69. <view class="rule-txt-icon">
  70. <image src="@/static/images/my/icon/pingtaizongze.svg" mode="scaleToFill" />
  71. </view>
  72. </view>
  73. <view class="notice">
  74. <view class="notice-item">平台公告</view>
  75. <view class="notice-item">诚信求职共建真实求职环境</view>
  76. <view class="notice-item">求职文明公约</view>
  77. <view class="notice-item">关于冒用平台名义发布虚假信息的通告</view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import navBar from "@/components/nav-bar/index.vue";
  84. export default {
  85. data() {
  86. return {
  87. currentIndex: 0,
  88. autoplay: true,
  89. interval: 3000,
  90. duration: 500,
  91. bannerList: [
  92. {
  93. title: "招聘文明公约",
  94. subtitle: "平等尊重 生态共建",
  95. // image: require('@/static/images/banner/banner1.jpg'),
  96. link: "/pages/rules/convention",
  97. },
  98. {
  99. title: "用户服务协议",
  100. subtitle: "诚信合作 互利共赢",
  101. // image: require('@/static/images/banner/banner2.jpg'),
  102. link: "/pages/rules/agreement",
  103. },
  104. {
  105. title: "隐私保护政策",
  106. subtitle: "安全可靠 数据保障",
  107. // image: require('@/static/images/banner/banner3.jpg'),
  108. link: "/pages/rules/privacy",
  109. },
  110. ],
  111. };
  112. },
  113. components: {
  114. navBar,
  115. },
  116. methods: {
  117. // 轮播图切换事件
  118. onSwiperChange(e) {
  119. this.currentIndex = e.detail.current;
  120. },
  121. // 切换轮播图
  122. switchBanner(index) {
  123. this.currentIndex = index;
  124. },
  125. // 点击轮播图
  126. handleBannerClick(item) {
  127. if (item.link) {
  128. uni.navigateTo({
  129. url: item.link,
  130. });
  131. }
  132. },
  133. // 暂停自动播放
  134. pauseAutoplay() {
  135. this.autoplay = false;
  136. },
  137. // 开始自动播放
  138. startAutoplay() {
  139. this.autoplay = true;
  140. },
  141. // 去面试详情,boss层
  142. goMianshiBoss() {
  143. uni.navigateTo({
  144. url: "/my/jilu/bossMianshiDetail",
  145. });
  146. },
  147. },
  148. onShow() {
  149. // 页面显示时恢复自动播放
  150. this.startAutoplay();
  151. },
  152. onHide() {
  153. // 页面隐藏时暂停自动播放
  154. this.pauseAutoplay();
  155. },
  156. };
  157. </script>
  158. <style lang="scss" scoped>
  159. .rule-center {
  160. position: absolute;
  161. left: 0;
  162. right: 0;
  163. bottom: 0;
  164. top: 0;
  165. background: #f7f7f7;
  166. .detail-bg {
  167. height: 744rpx;
  168. width: 100%;
  169. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  170. position: absolute;
  171. left: 0;
  172. top: 0;
  173. }
  174. .rule-content {
  175. position: relative;
  176. z-index: 2;
  177. padding: 40rpx;
  178. box-sizing: border-box;
  179. .rule-title {
  180. color: #fff;
  181. font-size: 50rpx;
  182. font-weight: 600;
  183. font-family: DM Sans;
  184. margin-bottom: 30rpx;
  185. }
  186. .rule-image {
  187. width: 144rpx;
  188. height: 144rpx;
  189. position: absolute;
  190. right: 44rpx;
  191. top: -24rpx;
  192. }
  193. }
  194. .banner-box {
  195. width: 100%;
  196. height: 172rpx;
  197. margin-top: 40rpx;
  198. }
  199. .rule-txt-box {
  200. display: flex;
  201. justify-content: space-between;
  202. align-items: center;
  203. padding: 56rpx 46rpx;
  204. box-sizing: border-box;
  205. border-radius: 12rpx;
  206. background: rgba(255, 255, 255, 1);
  207. margin-top: 20rpx;
  208. border: 1rpx solid rgba(227, 231, 236, 1);
  209. .rule-text {
  210. .rule-text-title {
  211. color: rgba(51, 51, 51, 1);
  212. font-family: DM Sans;
  213. font-size: 24rpx;
  214. font-weight: 400;
  215. line-height: 32rpx;
  216. letter-spacing: 0px;
  217. }
  218. .rule-text-desc {
  219. color: rgba(153, 153, 153, 1);
  220. font-family: DM Sans;
  221. font-size: 20rpx;
  222. font-weight: 400;
  223. line-height: 26rpx;
  224. }
  225. }
  226. .rule-txt-icon {
  227. image {
  228. width: 40rpx;
  229. height: 40rpx;
  230. }
  231. }
  232. }
  233. .notice {
  234. display: flex;
  235. flex-direction: column;
  236. gap: 24rpx;
  237. box-sizing: border-box;
  238. border: 1rpx solid rgba(227, 231, 236, 1);
  239. border-radius: 12rpx;
  240. background: #fdfdfd;
  241. padding: 32rpx;
  242. padding-bottom: 42rpx;
  243. box-sizing: border-box;
  244. margin-top: 20rpx;
  245. .notice-item {
  246. color: rgba(29, 33, 41, 1);
  247. font-family: DM Sans;
  248. font-size: 24rpx;
  249. font-weight: 600;
  250. line-height: 32rpx;
  251. text-align: left;
  252. }
  253. }
  254. .banner-container {
  255. width: 100%;
  256. height: 100%;
  257. position: relative;
  258. }
  259. .custom-swiper {
  260. width: 100%;
  261. height: 172rpx !important;
  262. overflow: hidden;
  263. border-radius: 12rpx;
  264. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  265. }
  266. .banner-item {
  267. width: 100%;
  268. height: 100%;
  269. position: relative;
  270. border-radius: 12rpx;
  271. overflow: hidden;
  272. .banner-bg {
  273. width: 100%;
  274. height: 100%;
  275. position: absolute;
  276. top: 0;
  277. left: 0;
  278. z-index: 1;
  279. }
  280. .banner-content {
  281. position: absolute;
  282. top: 0;
  283. left: 0;
  284. width: 100%;
  285. height: 100%;
  286. z-index: 2;
  287. padding: 40rpx;
  288. box-sizing: border-box;
  289. display: flex;
  290. align-items: center;
  291. justify-content: space-between;
  292. .paopao {
  293. position: absolute;
  294. width: 306rpx;
  295. height: 306rpx;
  296. z-index: -1;
  297. }
  298. .paopao-one {
  299. left: 86rpx;
  300. }
  301. .paopao-two {
  302. top: 60rpx;
  303. right: 124rpx;
  304. }
  305. .paopao-three {
  306. right: -84rpx;
  307. top: -108rpx;
  308. }
  309. }
  310. .banner-txt {
  311. }
  312. .banner-btn {
  313. padding: 7rpx 40rpx;
  314. box-sizing: border-box;
  315. color: rgba(1, 107, 246, 1);
  316. font-family: DM Sans;
  317. font-size: 16rpx;
  318. font-weight: 400;
  319. line-height: 20rpx;
  320. letter-spacing: 0%;
  321. text-align: center;
  322. background-color: #fff;
  323. border-radius: 100rpx;
  324. }
  325. .banner-title {
  326. font-size: 36rpx;
  327. font-weight: bold;
  328. color: #ffffff;
  329. margin-bottom: 12rpx;
  330. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
  331. }
  332. .banner-subtitle {
  333. font-size: 26rpx;
  334. color: #ffffff;
  335. opacity: 0.9;
  336. margin-bottom: 30rpx;
  337. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
  338. }
  339. }
  340. .custom-indicator {
  341. display: flex;
  342. justify-content: center;
  343. align-items: center;
  344. margin-top: -20rpx;
  345. gap: 16rpx;
  346. .indicator-dot {
  347. width: 6rpx;
  348. height: 6rpx;
  349. border-radius: 50%;
  350. background: #fff;
  351. transition: all 0.3s ease;
  352. &.active {
  353. width: 19rpx;
  354. border-radius: 10rpx;
  355. background: linear-gradient(90deg, #ff6600, #ff9900);
  356. }
  357. }
  358. }
  359. }
  360. </style>