ruleCenter.vue 9.0 KB

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