HomeIndex.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. <!--
  2. * @Description: 首页
  3. * @Author: 空白格
  4. * @Date: 2022-08-10 11:26:40
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-29 18:09:18
  7. * @FilePath: \veterans_client_web\src\views\Home\HomeIndex.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <div class="home app-main">
  12. <!-- 顶部轮播 -->
  13. <header-banner />
  14. <!-- 菜单导航 -->
  15. <menu-navigation :scrollTop="scrollTop" />
  16. <div class="home-main" :class="{ 'home-main-top': scrollTop > 473 }">
  17. <!-- 新闻最新一条 -->
  18. <div class="home-main-latest">
  19. <div class="home-main-latest-content">
  20. <div
  21. class="hmlc-title"
  22. @click="
  23. jumpPage('/newsdetails', { id: latestNews.artId, type: 'news' })
  24. "
  25. >
  26. {{ latestNews.artTitle }}
  27. </div>
  28. <!-- <div class="hmlc-content" v-html="latestNews.artContent"></div> -->
  29. </div>
  30. </div>
  31. <div class="home-main-box">
  32. <div class="home-main-news-box">
  33. <!-- 新闻部分 -->
  34. <el-row :gutter="0" class="home-main-news">
  35. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  36. <div class="home-main-news-left">
  37. <el-carousel :interval="5000" arrow="never" height="395px">
  38. <el-carousel-item
  39. v-for="(item, index) in newsList"
  40. :key="index"
  41. >
  42. <el-image
  43. @click="
  44. jumpPage('newsdetails', {
  45. id: item.artId,
  46. type: 'news',
  47. })
  48. "
  49. class="image"
  50. :src="
  51. item.artImage ||
  52. require('@/assets/images/default-news.jpg')
  53. "
  54. fit="cover"
  55. >
  56. <div slot="placeholder" class="image-slot">
  57. 加载图片中<span class="dot">...</span>
  58. </div>
  59. <div slot="error" class="image-slot">
  60. <el-image
  61. class="image"
  62. :src="require('@/assets/images/default-news.jpg')"
  63. fit="fill"
  64. ></el-image>
  65. </div>
  66. </el-image>
  67. <div
  68. class="title"
  69. @click="
  70. jumpPage('newsdetails', {
  71. id: item.artId,
  72. type: 'news',
  73. })
  74. "
  75. >
  76. {{ item.artTitle || "" }}
  77. </div>
  78. </el-carousel-item>
  79. </el-carousel>
  80. </div>
  81. </el-col>
  82. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  83. <div class="home-main-news-right">
  84. <el-tabs v-model="activeName" @tab-click="handleClick">
  85. <el-tab-pane label="新闻动态" name="first">
  86. <ul class="news-infomation">
  87. <li
  88. @click="
  89. jumpPage('newsdetails', {
  90. id: item.artId,
  91. type: 'news',
  92. })
  93. "
  94. class="news-infomation-item"
  95. v-for="(item, index) in newsList"
  96. :key="index"
  97. >
  98. <div class="title">{{ item.artTitle }}</div>
  99. <div class="date">
  100. {{ parseTime(item.createTime, "{y}-{m}-{d}") }}
  101. </div>
  102. </li>
  103. </ul>
  104. </el-tab-pane>
  105. <el-tab-pane label="通知公告" name="second">
  106. <ul class="news-infomation">
  107. <li
  108. @click="jumpPage('noticedetails', { id: item.id })"
  109. class="news-infomation-item"
  110. v-for="(item, index) in noticeList"
  111. :key="index"
  112. >
  113. <div class="title">{{ item.content }}</div>
  114. <div class="date">
  115. {{ parseTime(item.releasTime, "{y}-{m}-{d}") }}
  116. </div>
  117. </li>
  118. </ul>
  119. </el-tab-pane>
  120. </el-tabs>
  121. <div class="more-btn" @click="jumpPage('/newscenter')">
  122. 更多
  123. </div>
  124. </div>
  125. </el-col>
  126. </el-row>
  127. </div>
  128. <div class="home-main-policy-box">
  129. <!-- 政策咨询部分 -->
  130. <el-row :gutter="0" class="home-main-policy">
  131. <el-col :span="24" class="home-main-policy-carousel">
  132. <el-carousel :interval="5000" arrow="never" height="140px">
  133. <el-carousel-item
  134. v-for="(item, index) in policyObj.bannerList"
  135. :key="index"
  136. >
  137. <el-image
  138. class="image"
  139. :src="
  140. item.bannerUrl ||
  141. require('@/assets/images/default-news.jpg')
  142. "
  143. fit="cover"
  144. @click="
  145. jumpPage('/policyadvice/bannerdetails', {
  146. id: item.id,
  147. type: 2,
  148. })
  149. "
  150. >
  151. <div slot="placeholder" class="image-slot">
  152. 加载图片中<span class="dot">...</span>
  153. </div>
  154. <div slot="error" class="image-slot">
  155. <el-image
  156. class="image"
  157. :src="require('@/assets/images/default-news.jpg')"
  158. fit="cover"
  159. ></el-image>
  160. </div>
  161. </el-image>
  162. <div class="title">
  163. {{ item.artTitle || "" }}
  164. </div>
  165. </el-carousel-item>
  166. </el-carousel>
  167. </el-col>
  168. <el-col
  169. :span="24"
  170. class="home-main-policy-content"
  171. v-loading="policyObj.loading"
  172. >
  173. <el-row :gutter="54">
  174. <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
  175. <div class="hmpc-left">
  176. <el-tabs
  177. v-model="policyObj.tabCur"
  178. @tab-click="handlePolicyClick"
  179. >
  180. <el-tab-pane
  181. v-for="(item, index) in policyObj.policyTypeList"
  182. :key="index"
  183. :label="item.label"
  184. :name="item.text"
  185. >
  186. <div
  187. class="hmpc-left-list"
  188. v-if="policyObj.policyList.length"
  189. >
  190. <div
  191. @click="
  192. jumpPage('newsdetails', {
  193. id: item.artId,
  194. type: 'policy',
  195. })
  196. "
  197. class="hmpc-left-list-item"
  198. v-for="(item, index) in policyObj.policyList"
  199. :key="index"
  200. >
  201. <div class="title">{{ item.artTitle }}</div>
  202. <div class="date">
  203. {{ parseTime(item.artPostTime, "{y}-{m}-{d}") }}
  204. </div>
  205. </div>
  206. </div>
  207. <el-empty description="列表为空" v-else></el-empty>
  208. </el-tab-pane>
  209. </el-tabs>
  210. <div class="more-btn" @click="jumpPage('/policyadvice')">
  211. 更多
  212. </div>
  213. </div>
  214. </el-col>
  215. <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
  216. <div class="hmpc-right">
  217. <div class="hmpc-right-title">退役军人服务</div>
  218. <div class="hmpc-right-list">
  219. <div
  220. class="hmpc-right-list-btn hmpc-right-list-btn-1"
  221. @click="jumpPage('/policyadvice')"
  222. ></div>
  223. <div
  224. class="hmpc-right-list-btn hmpc-right-list-btn-2"
  225. @click="jumpPage('/recruitmentemployment')"
  226. ></div>
  227. <div
  228. class="hmpc-right-list-btn hmpc-right-list-btn-3"
  229. @click="jumpPage('/skilltraining')"
  230. ></div>
  231. <div
  232. class="hmpc-right-list-btn hmpc-right-list-btn-4"
  233. @click="jumpPage('/educationpromote')"
  234. ></div>
  235. <div
  236. class="hmpc-right-list-btn hmpc-right-list-btn-5"
  237. @click="jumpPage('/workguide')"
  238. ></div>
  239. </div>
  240. </div>
  241. </el-col>
  242. </el-row>
  243. </el-col>
  244. </el-row>
  245. </div>
  246. <!-- 院校合作 -->
  247. <institutional-cooperation />
  248. <!-- 企业合作 -->
  249. <enterprise-cooperation />
  250. </div>
  251. </div>
  252. <!-- 友情链接 -->
  253. <friendship-link />
  254. <!-- 右侧操作 -->
  255. <div class="home-operation">
  256. <div class="home-operation-fixed">
  257. <div class="home-operation-fixed-item home-operation-fixed-item-1">
  258. <el-image
  259. class="image"
  260. :src="require('@/assets/images/search-icon.svg')"
  261. ></el-image>
  262. </div>
  263. <div class="home-operation-fixed-item">
  264. <el-image
  265. class="image"
  266. :src="require('@/assets/images/email-icon.svg')"
  267. ></el-image>
  268. </div>
  269. <div class="home-operation-fixed-item">
  270. <el-image
  271. class="image"
  272. :src="require('@/assets/images/telephone-icon.svg')"
  273. ></el-image>
  274. </div>
  275. <div class="home-operation-fixed-item">
  276. <el-image
  277. class="image"
  278. :src="require('@/assets/images/weixin-icon.svg')"
  279. ></el-image>
  280. </div>
  281. <div
  282. class="home-operation-fixed-item home-operation-fixed-item-last"
  283. @click="backToTop"
  284. >
  285. <el-image
  286. class="image"
  287. :src="require('@/assets/images/top-icon.svg')"
  288. ></el-image>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </template>
  294. <script>
  295. import { parseTime } from "@/utils/utils";
  296. import {
  297. getBannerList,
  298. getNewsList,
  299. getNoticeList,
  300. getNewsData,
  301. } from "@/api/Home";
  302. import { getDictData } from "@/api/Dict";
  303. import { getPolicyData } from "@/api/PolicyAdvice";
  304. import HeaderBanner from "./components/HeaderBanner";
  305. import MenuNavigation from "./components/MenuNavigation";
  306. import InstitutionalCooperation from "./components/InstitutionalCooperation";
  307. import EnterpriseCooperation from "./components/EnterpriseCooperation";
  308. import FriendshipLink from "./components/FriendshipLink";
  309. export default {
  310. name: "HomeIndex",
  311. components: {
  312. HeaderBanner,
  313. MenuNavigation,
  314. InstitutionalCooperation,
  315. EnterpriseCooperation,
  316. FriendshipLink,
  317. },
  318. data() {
  319. return {
  320. latestNews: {},
  321. newsList: [],
  322. noticeList: [],
  323. activeName: "first",
  324. parseTime: parseTime,
  325. scrollTop: 0,
  326. policyObj: {
  327. loading: false,
  328. tabCur: "",
  329. policyTypeList: [],
  330. bannerList: [],
  331. policyList: [],
  332. },
  333. };
  334. },
  335. created() {
  336. this.initData();
  337. },
  338. mounted() {
  339. const that = this;
  340. window.addEventListener("scroll", that.scrollHander);
  341. },
  342. destroyed() {
  343. window.removeEventListener("scroll", this.scrollHander);
  344. },
  345. methods: {
  346. scrollHander(e) {
  347. this.scrollTop = e.srcElement.scrollingElement.scrollTop;
  348. },
  349. initData() {
  350. this.getDict();
  351. this.getNews();
  352. this.getNotice();
  353. this.getPolicyBannerList();
  354. },
  355. /**
  356. * 获取字典数据
  357. * @date 2022-08-17
  358. * @returns {any}
  359. */
  360. getDict() {
  361. getDictData({ key: "policy_type" }).then((res) => {
  362. this.policyObj.policyTypeList = res?.data;
  363. this.policyObj.policyTypeList.length &&
  364. (this.policyObj.tabCur = this.policyObj.policyTypeList[0].text) &&
  365. this.getPolicyList();
  366. });
  367. },
  368. /**
  369. * 获取新闻
  370. * @date 2022-08-10
  371. * @returns {any}
  372. */
  373. getNews() {
  374. getNewsList({
  375. artCategoryId: 2,
  376. pageNum: 1,
  377. pageSize: 10,
  378. }).then((res) => {
  379. this.newsList = res?.rows ?? [];
  380. if (this.newsList.length) {
  381. this.getNewsInfo(this.newsList[0].artId);
  382. }
  383. });
  384. },
  385. /**
  386. * 获取新闻详情
  387. * @date 2022-08-17
  388. * @param {any} id
  389. * @returns {any}
  390. */
  391. getNewsInfo(id) {
  392. getNewsData({ id }).then((res) => {
  393. this.latestNews = res?.data ?? [];
  394. });
  395. },
  396. /**
  397. * 获取公告
  398. * @date 2022-08-10
  399. * @returns {any}
  400. */
  401. getNotice() {
  402. getNoticeList().then((res) => {
  403. this.noticeList = res?.data ?? [];
  404. });
  405. },
  406. /**
  407. * tab点击事件
  408. * @date 2022-08-10
  409. * @param {any} tab
  410. * @returns {any}
  411. */
  412. handleClick(tab) {
  413. switch (tab.name) {
  414. case "first":
  415. this.getNews();
  416. break;
  417. case "second":
  418. this.getNotice();
  419. break;
  420. }
  421. },
  422. /**
  423. * 获取政策咨询轮播
  424. * @date 2022-08-17
  425. * @returns {any}
  426. */
  427. getPolicyBannerList() {
  428. getBannerList({ type: 2 }).then((res) => {
  429. this.policyObj.bannerList = res.data;
  430. });
  431. },
  432. /**
  433. * 获取咨询列表
  434. * @date 2022-08-17
  435. * @returns {any}
  436. */
  437. getPolicyList() {
  438. this.policyObj.loading = true;
  439. getPolicyData({
  440. pageNum: 1,
  441. pageSize: 10,
  442. artCategoryId: this.policyObj.tabCur,
  443. }).then((res) => {
  444. this.policyObj.policyList = res?.rows;
  445. this.policyObj.loading = false;
  446. });
  447. },
  448. /**
  449. * 政策咨询tab切换触发
  450. * @date 2022-08-17
  451. * @param {any} tab
  452. * @returns {any}
  453. */
  454. handlePolicyClick(tab) {
  455. this.policyObj.tabCur = tab.name;
  456. this.getPolicyList();
  457. },
  458. /**
  459. * 跳转到指定页面
  460. * @date 2022-08-11
  461. * @param {any} path
  462. * @returns {any}
  463. */
  464. jumpPage(path, param) {
  465. if (path) {
  466. this.$router.push({ path: path, query: param });
  467. }
  468. },
  469. /**
  470. * 返回顶部
  471. * @date 2022-08-22
  472. * @returns {any}
  473. */
  474. backToTop() {
  475. cancelAnimationFrame(this.timer);
  476. const self = this;
  477. self.timer = requestAnimationFrame(function fn() {
  478. const oTop =
  479. document.body.scrollTop || document.documentElement.scrollTop;
  480. if (oTop > 0) {
  481. document.body.scrollTop = document.documentElement.scrollTop =
  482. oTop - 50;
  483. self.timer = requestAnimationFrame(fn);
  484. } else {
  485. cancelAnimationFrame(self.timer);
  486. }
  487. });
  488. },
  489. },
  490. };
  491. </script>
  492. <style lang="scss" scoped>
  493. .home {
  494. &-main {
  495. &-latest {
  496. background-color: #fff;
  497. &-content {
  498. width: 70%;
  499. margin: 0 auto;
  500. min-width: 600px;
  501. padding: 17px 0;
  502. .hmlc-title {
  503. font-size: 28px;
  504. color: #ff001a;
  505. text-align: center;
  506. margin-bottom: 10px;
  507. cursor: pointer;
  508. }
  509. .hmlc-content {
  510. font-size: 12px;
  511. line-height: 17px;
  512. overflow: hidden;
  513. text-overflow: ellipsis;
  514. text-overflow: -o-ellipsis-lastline;
  515. display: -webkit-box;
  516. -webkit-line-clamp: 2; /* 块元素显示的文本的行数 */
  517. line-clamp: 2;
  518. -webkit-box-orient: vertical; /* 设置或检索伸缩盒对象的子元素的排列方式 ,盒子行数根据高度来计算 */
  519. overflow-wrap: break-word; /* 设置div换行 */
  520. p {
  521. img {
  522. display: none !important;
  523. }
  524. }
  525. }
  526. }
  527. }
  528. &-news-box {
  529. background-color: #f4f4f4;
  530. }
  531. &-news {
  532. width: 70%;
  533. margin: 0 auto;
  534. min-width: 600px;
  535. padding: 47px 0;
  536. border-radius: 5px;
  537. margin-top: 14px;
  538. &-left {
  539. margin-right: 30px;
  540. .image {
  541. width: 100%;
  542. height: 100%;
  543. border-radius: 2px;
  544. cursor: pointer;
  545. }
  546. .title {
  547. width: calc(100% - 26px);
  548. height: 43px;
  549. line-height: 43px;
  550. padding: 0 13px;
  551. background-color: rgba($color: #000000, $alpha: 0.6);
  552. color: #fff;
  553. white-space: nowrap;
  554. overflow: hidden;
  555. text-overflow: ellipsis;
  556. word-break: break-all;
  557. position: absolute;
  558. bottom: 0;
  559. font-size: 14px;
  560. font-weight: blod;
  561. cursor: pointer;
  562. }
  563. :deep(.el-carousel__indicators) {
  564. // 指示器
  565. left: auto;
  566. right: -20px;
  567. }
  568. :deep(.el-carousel__button) {
  569. // 指示器按钮
  570. width: 7px;
  571. height: 7px;
  572. border: none;
  573. border-radius: 50%;
  574. background-color: #fff;
  575. }
  576. :deep(.is-active .el-carousel__button) {
  577. // 指示器激活按钮
  578. width: 16px;
  579. border-radius: 10px;
  580. background-color: #f00;
  581. }
  582. }
  583. &-right {
  584. position: relative;
  585. :deep(.el-tabs__item) {
  586. font-size: 20px;
  587. font-weight: 500;
  588. color: #000000;
  589. }
  590. :deep(.el-tabs__item:hover) {
  591. color: #163da5;
  592. }
  593. :deep(.el-tabs__item.is-active) {
  594. color: #163da5;
  595. }
  596. :deep(.el-tabs__active-bar) {
  597. background-color: #163da5;
  598. }
  599. .news-infomation {
  600. &-item {
  601. display: flex;
  602. justify-content: space-between;
  603. margin-bottom: 10px;
  604. font-size: 14px;
  605. color: #373737;
  606. cursor: pointer;
  607. &:hover {
  608. text-decoration: underline;
  609. }
  610. .title {
  611. width: 80%;
  612. white-space: nowrap;
  613. overflow: hidden;
  614. text-overflow: ellipsis;
  615. word-break: break-all;
  616. }
  617. .date {
  618. width: 20%;
  619. white-space: nowrap;
  620. overflow: hidden;
  621. text-overflow: ellipsis;
  622. word-break: break-all;
  623. text-align: right;
  624. color: #797979;
  625. }
  626. }
  627. }
  628. .more-btn {
  629. position: absolute;
  630. right: 0;
  631. top: 12px;
  632. color: #727272;
  633. font-size: 14px;
  634. cursor: pointer;
  635. }
  636. }
  637. }
  638. &-policy-box {
  639. background: #f7f7f7;
  640. }
  641. &-policy {
  642. width: 70%;
  643. margin: 0 auto;
  644. min-width: 600px;
  645. padding: 40px 0;
  646. &-carousel {
  647. cursor: pointer;
  648. :deep(.el-carousel__button) {
  649. // 指示器按钮
  650. width: 7px;
  651. height: 7px;
  652. border: none;
  653. border-radius: 50%;
  654. background-color: #fff;
  655. }
  656. :deep(.is-active .el-carousel__button) {
  657. // 指示器激活按钮
  658. width: 16px;
  659. border-radius: 10px;
  660. }
  661. .image {
  662. width: 100%;
  663. height: 100%;
  664. }
  665. }
  666. &-content {
  667. margin-top: 50px;
  668. .hmpc-left {
  669. margin-bottom: 20px;
  670. position: relative;
  671. :deep(.el-tabs__item) {
  672. font-size: 20px;
  673. font-weight: 500;
  674. color: #666666;
  675. }
  676. :deep(.el-tabs__item:hover) {
  677. color: #163da5;
  678. }
  679. :deep(.el-tabs__item.is-active) {
  680. color: #163da5;
  681. }
  682. :deep(.el-tabs__active-bar) {
  683. background-color: #163da5;
  684. }
  685. &-list {
  686. padding: 10px 0;
  687. &-item {
  688. display: flex;
  689. justify-content: space-between;
  690. margin-bottom: 10px;
  691. font-size: 14px;
  692. color: #373737;
  693. cursor: pointer;
  694. &:hover {
  695. text-decoration: underline;
  696. }
  697. .title {
  698. width: 80%;
  699. white-space: nowrap;
  700. overflow: hidden;
  701. text-overflow: ellipsis;
  702. word-break: break-all;
  703. }
  704. .date {
  705. width: 20%;
  706. white-space: nowrap;
  707. overflow: hidden;
  708. text-overflow: ellipsis;
  709. word-break: break-all;
  710. text-align: right;
  711. color: #797979;
  712. }
  713. }
  714. }
  715. .more-btn {
  716. position: absolute;
  717. right: 0;
  718. top: 12px;
  719. color: #727272;
  720. font-size: 14px;
  721. cursor: pointer;
  722. }
  723. }
  724. .hmpc-right {
  725. margin-bottom: 20px;
  726. &-title {
  727. font-size: 20px;
  728. color: #163da5;
  729. margin-bottom: 10px;
  730. }
  731. &-list {
  732. &-btn {
  733. width: 100%;
  734. text-align: center;
  735. height: 47px;
  736. line-height: 47px;
  737. border-radius: 5px;
  738. cursor: pointer;
  739. font-size: 14px;
  740. margin-bottom: 7px;
  741. position: relative;
  742. &:hover {
  743. opacity: 0.8;
  744. }
  745. &::before {
  746. content: "";
  747. display: inline-block;
  748. width: 25px;
  749. height: 25px;
  750. background-size: 100% 100%;
  751. background-repeat: no-repeat;
  752. background-position: center center;
  753. vertical-align: middle;
  754. position: absolute;
  755. left: calc(45% - 35px);
  756. top: 50%;
  757. margin-top: -12.5px;
  758. }
  759. &::after {
  760. position: absolute;
  761. left: 45%;
  762. }
  763. }
  764. &-btn-1 {
  765. background-image: linear-gradient(
  766. 137deg,
  767. #c5fff6 0%,
  768. #5debd8 100%
  769. );
  770. color: #028170;
  771. &::before {
  772. background-image: url("./../../assets/images/zhengcezixun.svg");
  773. }
  774. &::after {
  775. content: "政策咨询";
  776. }
  777. }
  778. &-btn-2 {
  779. background-image: linear-gradient(
  780. 137deg,
  781. #fff6e3 0%,
  782. #f7b6a3 100%
  783. );
  784. color: #ff6253;
  785. &::before {
  786. background-image: url("./../../assets/images/woyaojiuye.svg");
  787. }
  788. &::after {
  789. content: "我要就业";
  790. }
  791. }
  792. &-btn-3 {
  793. background-image: linear-gradient(
  794. 137deg,
  795. #fff6e3 0%,
  796. #fae08a 100%
  797. );
  798. color: #ff8d34;
  799. &::before {
  800. background-image: url("./../../assets/images/woyaoxuejineng.svg");
  801. }
  802. &::after {
  803. content: "我要学技能";
  804. }
  805. }
  806. &-btn-4 {
  807. background-image: linear-gradient(
  808. 137deg,
  809. #eee3ff 0%,
  810. #d3b9ff 100%
  811. );
  812. color: #8454d3;
  813. &::before {
  814. background-image: url("./../../assets/images/woxiangshengxueli.svg");
  815. }
  816. &::after {
  817. content: "我要升学历";
  818. }
  819. }
  820. &-btn-5 {
  821. background-image: linear-gradient(
  822. 137deg,
  823. #c9e9ff 0%,
  824. #95d2fc 100%
  825. );
  826. color: #1b74b4;
  827. &::before {
  828. background-image: url("./../../assets/images/woxiangchuangye.svg");
  829. }
  830. &::after {
  831. content: "我想创业";
  832. }
  833. }
  834. }
  835. }
  836. }
  837. }
  838. }
  839. .home-main-top {
  840. margin-top: 104px;
  841. }
  842. &-operation {
  843. position: fixed;
  844. top: 50%;
  845. right: 0;
  846. margin-top: -138px;
  847. z-index: 1000;
  848. &-fixed {
  849. &-item {
  850. width: 70px;
  851. height: 70px;
  852. display: flex;
  853. justify-content: center;
  854. align-items: center;
  855. background: #416050;
  856. margin-bottom: 2px;
  857. cursor: pointer;
  858. &:nth-last-child(2) {
  859. margin-bottom: 0;
  860. }
  861. &:first-child,
  862. &:last-child {
  863. background: #73aa8d;
  864. }
  865. .image {
  866. width: 30px;
  867. height: 30px;
  868. }
  869. }
  870. &-item-last {
  871. height: 40px;
  872. .image {
  873. width: 15px;
  874. height: 15px;
  875. }
  876. }
  877. }
  878. }
  879. }
  880. </style>