ruleCenter.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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">
  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">去看看</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" @click="goTo('/my/setting/mimi')">
  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. goTo(url) {
  135. if(!url)
  136. return;
  137. uni.navigateTo({
  138. url
  139. });
  140. },
  141. // 暂停自动播放
  142. pauseAutoplay() {
  143. this.autoplay = false;
  144. },
  145. // 开始自动播放
  146. startAutoplay() {
  147. this.autoplay = true;
  148. },
  149. // 去面试详情,boss层
  150. goMianshiBoss() {
  151. uni.navigateTo({
  152. url: "/my/jilu/bossMianshiDetail",
  153. });
  154. },
  155. },
  156. onShow() {
  157. // 页面显示时恢复自动播放
  158. this.startAutoplay();
  159. },
  160. onHide() {
  161. // 页面隐藏时暂停自动播放
  162. this.pauseAutoplay();
  163. },
  164. onLoad(){
  165. this.getData()
  166. }
  167. };
  168. </script>
  169. <style lang="scss" scoped>
  170. .rule-center {
  171. position: absolute;
  172. left: 0;
  173. right: 0;
  174. bottom: 0;
  175. top: 0;
  176. background: #f7f7f7;
  177. .detail-bg {
  178. height: 744rpx;
  179. width: 100%;
  180. background: linear-gradient(180deg, rgba(255, 102, 0, 1), rgba(255, 102, 0, 0) 100%);
  181. position: absolute;
  182. left: 0;
  183. top: 0;
  184. }
  185. .rule-content {
  186. position: relative;
  187. z-index: 2;
  188. padding: 40rpx;
  189. box-sizing: border-box;
  190. .rule-title {
  191. color: #fff;
  192. font-size: 50rpx;
  193. font-weight: 600;
  194. font-family: DM Sans;
  195. margin-bottom: 30rpx;
  196. }
  197. .rule-image {
  198. width: 144rpx;
  199. height: 144rpx;
  200. position: absolute;
  201. right: 44rpx;
  202. top: -24rpx;
  203. }
  204. }
  205. .banner-box {
  206. width: 100%;
  207. height: 172rpx;
  208. margin-top: 40rpx;
  209. }
  210. .rule-txt-box {
  211. display: flex;
  212. justify-content: space-between;
  213. align-items: center;
  214. padding: 56rpx 46rpx;
  215. box-sizing: border-box;
  216. border-radius: 12rpx;
  217. background: rgba(255, 255, 255, 1);
  218. margin-top: 20rpx;
  219. border: 1rpx solid rgba(227, 231, 236, 1);
  220. .rule-text {
  221. .rule-text-title {
  222. color: rgba(51, 51, 51, 1);
  223. font-family: DM Sans;
  224. font-size: 24rpx;
  225. font-weight: 400;
  226. line-height: 32rpx;
  227. letter-spacing: 0px;
  228. }
  229. .rule-text-desc {
  230. color: rgba(153, 153, 153, 1);
  231. font-family: DM Sans;
  232. font-size: 20rpx;
  233. font-weight: 400;
  234. line-height: 26rpx;
  235. }
  236. }
  237. .rule-txt-icon {
  238. image {
  239. width: 40rpx;
  240. height: 40rpx;
  241. }
  242. }
  243. }
  244. .notice {
  245. display: flex;
  246. flex-direction: column;
  247. gap: 24rpx;
  248. box-sizing: border-box;
  249. border: 1rpx solid rgba(227, 231, 236, 1);
  250. border-radius: 12rpx;
  251. background: #fdfdfd;
  252. padding: 32rpx;
  253. padding-bottom: 42rpx;
  254. box-sizing: border-box;
  255. margin-top: 20rpx;
  256. .notice-item {
  257. color: rgba(29, 33, 41, 1);
  258. font-family: DM Sans;
  259. font-size: 24rpx;
  260. font-weight: 600;
  261. line-height: 32rpx;
  262. text-align: left;
  263. }
  264. }
  265. .banner-container {
  266. width: 100%;
  267. height: 100%;
  268. position: relative;
  269. }
  270. .custom-swiper {
  271. width: 100%;
  272. height: 172rpx !important;
  273. overflow: hidden;
  274. border-radius: 12rpx;
  275. background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
  276. }
  277. .banner-item {
  278. width: 100%;
  279. height: 100%;
  280. position: relative;
  281. border-radius: 12rpx;
  282. overflow: hidden;
  283. .banner-bg {
  284. width: 100%;
  285. height: 100%;
  286. position: absolute;
  287. top: 0;
  288. left: 0;
  289. z-index: 1;
  290. }
  291. .banner-content {
  292. position: absolute;
  293. top: 0;
  294. left: 0;
  295. width: 100%;
  296. height: 100%;
  297. z-index: 2;
  298. padding: 40rpx;
  299. box-sizing: border-box;
  300. display: flex;
  301. align-items: center;
  302. justify-content: space-between;
  303. .paopao {
  304. position: absolute;
  305. width: 306rpx;
  306. height: 306rpx;
  307. z-index: -1;
  308. }
  309. .paopao-one {
  310. left: 86rpx;
  311. }
  312. .paopao-two {
  313. top: 60rpx;
  314. right: 124rpx;
  315. }
  316. .paopao-three {
  317. right: -84rpx;
  318. top: -108rpx;
  319. }
  320. }
  321. .banner-txt {
  322. }
  323. .banner-btn {
  324. padding: 7rpx 40rpx;
  325. box-sizing: border-box;
  326. color: rgba(1, 107, 246, 1);
  327. font-family: DM Sans;
  328. font-size: 16rpx;
  329. font-weight: 400;
  330. line-height: 20rpx;
  331. letter-spacing: 0%;
  332. text-align: center;
  333. background-color: #fff;
  334. border-radius: 100rpx;
  335. }
  336. .banner-title {
  337. font-size: 36rpx;
  338. font-weight: bold;
  339. color: #ffffff;
  340. margin-bottom: 12rpx;
  341. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
  342. }
  343. .banner-subtitle {
  344. font-size: 26rpx;
  345. color: #ffffff;
  346. opacity: 0.9;
  347. margin-bottom: 30rpx;
  348. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);
  349. }
  350. }
  351. .custom-indicator {
  352. display: flex;
  353. justify-content: center;
  354. align-items: center;
  355. margin-top: -20rpx;
  356. gap: 16rpx;
  357. .indicator-dot {
  358. width: 6rpx;
  359. height: 6rpx;
  360. border-radius: 50%;
  361. background: #fff;
  362. transition: all 0.3s ease;
  363. &.active {
  364. width: 19rpx;
  365. border-radius: 10rpx;
  366. background: linear-gradient(90deg, #ff6600, #ff9900);
  367. }
  368. }
  369. }
  370. }
  371. </style>