Pārlūkot izejas kodu

首页右侧固定导航/新闻中心

yangzj 2 gadi atpakaļ
vecāks
revīzija
2c49efa7d4

+ 10 - 0
src/assets/images/email-icon.svg

@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 36" class="design-iconfont">
+  <defs>
+    <filter id="m9z6u7973__xugnwy6vda">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g transform="translate(-1849 -758)" filter="url(#m9z6u7973__xugnwy6vda)" fill="none" fill-rule="evenodd">
+    <path d="M4.60053185,0 L41.3994681,0 C43.9098162,0 45.9680888,1.99735099 46,4.44503311 L23.0079778,17.0172185 L0.0212741357,4.46092715 C0.0425482715,2.00264901 2.0848653,0 4.60053185,0 Z M0.0212741357,9.27152318 L0,31.5019868 C0,33.9761589 2.0689097,36 4.60053185,36 L41.3994681,36 C43.9310903,36 46,33.9761589 46,31.5019868 L46,9.26092715 L23.5504683,21.2450331 C23.2047636,21.4304636 22.7899179,21.4304636 22.4495317,21.2450331 L0.0212741357,9.27152318 Z" fill="#000" fill-rule="nonzero" transform="translate(1849 758)"/>
+  </g>
+</svg>

+ 10 - 0
src/assets/images/search-icon.svg

@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="design-iconfont">
+  <defs>
+    <filter id="j48tt8obs__bclwd2s5pa">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g transform="translate(-1848 -655)" filter="url(#j48tt8obs__bclwd2s5pa)" fill="none" fill-rule="evenodd">
+    <path d="M46.6793514,46.6793083 C44.9184866,48.4402306 42.0651031,48.4402306 40.3042383,46.6793083 L32.3482599,38.7230705 C29.0769645,40.8205245 25.2093228,42.0711706 21.0364646,42.0711706 C9.41788745,42.0711706 0,32.6545413 0,21.0355853 C0,9.4166293 9.41788745,0 21.0364646,0 C32.6550417,0 42.0713639,9.41819457 42.0713639,21.0355853 C42.0713639,25.2101449 40.8207586,29.0763474 38.723373,32.3493148 L46.6793514,40.3055526 C48.4402162,42.0664748 48.4402162,44.9215167 46.6793514,46.6808736 L46.6793514,46.6808736 L46.6793514,46.6793083 Z M21.0380298,6.01061445 C12.7392697,6.01061445 6.01198366,12.7381199 6.01198366,21.0355853 C6.01198366,29.3330507 12.7392697,36.0605562 21.0380298,36.0605562 C29.3352246,36.0605562 36.0625118,29.3330507 36.0625118,21.0355853 C36.0656411,12.7381199 29.3352246,6.01061445 21.0380298,6.01061445 L21.0380298,6.01061445 Z" fill="#000" fill-rule="nonzero" transform="translate(1848 655)"/>
+  </g>
+</svg>

+ 10 - 0
src/assets/images/telephone-icon.svg

@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" class="design-iconfont">
+  <defs>
+    <filter id="182v9pbbu__67aj1t9u6a">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g transform="translate(-1851 -852)" filter="url(#182v9pbbu__67aj1t9u6a)" fill="none" fill-rule="evenodd">
+    <path d="M41.1810287,33.3011232 L32.4663765,24.5861595 C31.3717025,23.4941623 29.5997176,23.4941623 28.5050436,24.5861595 L26.5243772,26.5668172 C25.4039719,27.6872175 21.7759596,26.572069 18.6020615,23.3978349 C15.4281634,20.2236008 14.3109094,16.5973551 15.4330652,15.4755543 L17.4137317,13.4948967 C18.5057337,12.4002275 18.5057337,10.6282505 17.4137317,9.5335813 L8.69872936,0.818967657 C7.60417536,-0.272989219 5.8323006,-0.272989219 4.7377466,0.818967657 L2.75708013,2.79962531 C1.29355073,4.26314824 0.402128302,6.188136 0.106971538,8.52136967 C-0.166827482,10.6854929 0.0856137954,13.1125601 0.856942816,15.7339466 C2.40415247,20.9998281 5.89351463,26.5360061 10.6793958,31.3204656 C15.4652769,36.104925 21.0004291,39.5956723 26.2645832,41.1428751 C28.2039347,41.7132289 30.0361474,42 31.7342617,42 C32.3173784,42.000938 32.8999761,41.9651544 33.4785926,41.892843 C35.8118366,41.5976876 37.7368329,40.7062691 39.2003623,39.2427462 L41.1810287,37.2620885 C42.2729904,36.1675393 42.2729904,34.3956724 41.1810287,33.3011232 Z" fill="#5C5C66" fill-rule="nonzero" transform="translate(1851 852)"/>
+  </g>
+</svg>

+ 13 - 0
src/assets/images/top-icon.svg

@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" class="design-iconfont">
+  <defs>
+    <filter id="or10fc7xa__myqwf9rwva">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g transform="translate(-1859 -1025)" filter="url(#or10fc7xa__myqwf9rwva)" fill="none" fill-rule="evenodd">
+    <g fill="#13CBB9" fill-rule="nonzero">
+      <path d="M0 2L0 0 26 0 26 2z" transform="translate(1859 1025)"/>
+      <path d="M9.81144621,26 L9.81144621,15.2557573 L6.59977924,15.2557573 C5.9597662,15.2558833 5.38130039,14.8620039 5.12927092,14.2544831 C4.87724145,13.6469623 5.00017875,12.9427833 5.44178777,12.4644014 L11.8507268,5.51409035 C12.1526906,5.18584867 12.571894,5 13.0103177,5 C13.4487414,5 13.8679448,5.18584867 14.1699086,5.51409035 L20.5612538,12.4677048 C21.0008513,12.9465462 21.1223004,13.6496241 20.8701442,14.2558937 C20.6179879,14.8621634 20.0406123,15.2552885 19.4016629,15.2557573 L16.3947237,15.2557573 L16.3947237,26 L9.81144621,26 Z" transform="translate(1859 1025)"/>
+    </g>
+  </g>
+</svg>

+ 13 - 0
src/assets/images/weixin-icon.svg

@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 36" class="design-iconfont">
+  <defs>
+    <filter id="3dfs5ti42__qy6irbq3xa">
+      <feColorMatrix in="SourceGraphic" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"/>
+    </filter>
+  </defs>
+  <g transform="translate(-1850 -952)" filter="url(#3dfs5ti42__qy6irbq3xa)" fill="none" fill-rule="evenodd">
+    <g fill="#000" fill-rule="nonzero">
+      <path d="M30.4817418,11.0642912 C30.948925,11.0642912 31.5328168,11.0642912 32,11.1807213 C30.5984941,4.77506762 23.8248172,0 15.883226,0 C7.12406424,0 0,5.93975956 0,13.5100618 C0,17.9357522 2.33574164,21.4297412 6.42337657,24.224889 L4.78836613,29 L10.3942157,26.2048522 C12.3796135,26.6707464 13.8978717,27.0201236 15.8832695,27.0201236 C16.4672049,27.0201236 16.9343445,27.0201236 17.4015277,27.0201236 C17.1679796,25.9719486 16.9343445,24.8072566 16.9343445,23.6426081 C16.9343445,16.6546302 22.890538,11.0642478 30.4817853,11.0642478 L30.4817418,11.0642912 Z M21.9562152,6.75498748 C23.124086,6.75498748 23.941613,7.57025881 23.941613,8.73490733 C23.941613,9.89955585 23.124086,10.7148272 21.9562152,10.7148272 C20.671505,10.7148272 19.5036342,9.89955585 19.5036342,8.73490733 C19.5036342,7.57025881 20.671505,6.75498748 21.9562152,6.75498748 Z M10.744516,10.7148706 C9.5766452,10.7148706 8.40877438,9.89959927 8.40877438,8.73495074 C8.40877438,7.57030222 9.5766452,6.75503089 10.744516,6.75503089 C11.9123868,6.75503089 12.7299138,7.57030222 12.7299138,8.73495074 C12.7299138,9.89959927 11.9123868,10.7148706 10.744516,10.7148706 Z" transform="translate(1850 952)"/>
+      <path d="M44,23.2075589 C44,17.0943335 37.8361549,12 30.9999791,12 C23.7155412,12 18,17.0943335 18,23.2075589 C18,29.4339993 23.7154994,34.4151178 30.9999791,34.4151178 C32.4568834,34.4151178 34.0258637,34.0754731 35.5948022,33.7358706 L39.7413631,36 L38.6206868,32.150904 C41.6465714,29.7735174 44,26.7169258 44,23.2075167 L44,23.2075589 Z M26.7414258,21.2830742 C25.9569356,21.2830742 25.1724873,20.6038269 25.1724873,19.8113647 C25.1724873,19.0189026 25.9569774,18.2264826 26.7414258,18.2264826 C27.8621021,18.2264826 28.6465922,19.0189448 28.6465922,19.8113647 C28.6465922,20.6038269 27.8621021,21.2830742 26.7414258,21.2830742 L26.7414258,21.2830742 Z M35.14654,21.2830742 C34.3620081,21.2830742 33.6896357,20.6038269 33.6896357,19.8113647 C33.6896357,19.0189026 34.3620499,18.2264826 35.14654,18.2264826 C36.2672164,18.2264826 37.0517065,19.0189448 37.0517065,19.8113647 C37.0517065,20.6038269 36.2671746,21.2830742 35.14654,21.2830742 L35.14654,21.2830742 Z" transform="translate(1850 952)"/>
+    </g>
+  </g>
+</svg>

+ 18 - 12
src/components/BannerBreadcrumb/index.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-11 13:44:08
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-11 13:49:12
+ * @LastEditTime: 2022-08-22 10:25:33
  * @FilePath: \veterans_client_web\src\components\BannerBreadcrumb\index.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -14,25 +14,31 @@
       <div class="banner-breadcrumb-header-title">{{ title }}</div>
     </div>
     <!-- 面包屑 -->
-    <div class="banner-breadcrumb-breadcrumb">
-      <el-breadcrumb separator-class="el-icon-arrow-right">
-        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
-        <el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
-      </el-breadcrumb>
-    </div>
+    <template v-if="breadcrumb">
+      <div class="banner-breadcrumb-breadcrumb">
+        <el-breadcrumb separator-class="el-icon-arrow-right">
+          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+          <el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+    </template>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'BannerBreadcrumb',
+  name: "BannerBreadcrumb",
   props: {
     title: {
       type: String,
-      default: ''
-    }
-  }
-}
+      default: "",
+    },
+    breadcrumb: {
+      type: Boolean,
+      default: true,
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 9 - 0
src/router/index.js

@@ -138,6 +138,15 @@ const routes = [
         meta: {
           title: '退役军人认证'
         }
+      },
+      {
+        path: 'newscenter',
+        name: 'NewsCenterIndex',
+        component: () =>
+          import('@/views/NewsCenter/NewsCenterIndex.vue'),
+        meta: {
+          title: '新闻中心'
+        }
       }
     ]
   },

+ 2 - 1
src/views/CooperativeColleges/CollegesDetails/CollegesDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-16 10:40:45
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-16 11:44:55
+ * @LastEditTime: 2022-08-22 10:08:53
  * @FilePath: \veterans_client_web\src\views\CooperativeColleges\CollegesDetails\CollegesDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -204,6 +204,7 @@ export default {
     const { schoolId } = this.$route.query;
     if (schoolId) {
       this.getSchoolDetails(schoolId);
+      document.documentElement.scrollTop = 0;
     }
   },
   methods: {

+ 2 - 1
src/views/CooperativeEnterprise/EnterpriseDetails/EnterpriseDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-15 14:54:50
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-16 13:27:50
+ * @LastEditTime: 2022-08-22 10:08:18
  * @FilePath: \veterans_client_web\src\views\CooperativeEnterprise\EnterpriseDetails\EnterpriseDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -255,6 +255,7 @@ export default {
       this.getCompanyDetails(companyId);
       this.positionObj.queryParams.companyId = companyId;
       this.getPositionList();
+      document.documentElement.scrollTop = 0;
     }
   },
   methods: {

+ 116 - 144
src/views/Home/HomeIndex.vue

@@ -3,38 +3,16 @@
  * @Author: 空白格
  * @Date: 2022-08-10 11:26:40
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-17 17:49:33
+ * @LastEditTime: 2022-08-22 10:22:23
  * @FilePath: \veterans_client_web\src\views\Home\HomeIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
 <template>
   <div class="home app-main">
-    <!-- 轮播图 -->
-    <div class="home-carousel">
-      <el-carousel :interval="5000" arrow="always" height="400px">
-        <el-carousel-item v-for="(item, index) in bannerList" :key="index">
-          <el-image class="image" :src="item.bannerUrl" fit="contain">
-            <div slot="placeholder" class="image-slot">
-              加载图片中<span class="dot">...</span>
-            </div>
-          </el-image>
-        </el-carousel-item>
-      </el-carousel>
-    </div>
-    <!-- 菜单 -->
-    <div class="home-menu" :class="{ 'home-menu-fixed': scrollTop > 473 }">
-      <div class="home-menu-list">
-        <div
-          class="home-menu-list-item"
-          :class="{ active: index === 0 }"
-          v-for="(item, index) in menuList"
-          :key="index"
-          @click="jumpPage(item.path)"
-        >
-          {{ item.name }}
-        </div>
-      </div>
-    </div>
+    <!-- 顶部轮播 -->
+    <header-banner />
+    <!-- 菜单导航 -->
+    <menu-navigation :scrollTop="scrollTop" />
     <div class="home-main" :class="{ 'home-main-top': scrollTop > 473 }">
       <!-- 新闻最新一条 -->
       <div class="home-main-latest">
@@ -111,6 +89,7 @@
                   </ul>
                 </el-tab-pane>
               </el-tabs>
+              <div class="more-btn" @click="jumpPage('/newscenter')">更多</div>
             </div>
           </el-col>
         </el-row>
@@ -217,7 +196,45 @@
       </div>
     </div>
     <!-- 友情链接 -->
-    <friendship-link/>
+    <friendship-link />
+    <!-- 右侧操作 -->
+    <div class="home-operation">
+      <div class="home-operation-fixed">
+        <div class="home-operation-fixed-item home-operation-fixed-item-1">
+          <el-image
+            class="image"
+            :src="require('@/assets/images/search-icon.svg')"
+          ></el-image>
+        </div>
+        <div class="home-operation-fixed-item">
+          <el-image
+            class="image"
+            :src="require('@/assets/images/email-icon.svg')"
+          ></el-image>
+        </div>
+        <div class="home-operation-fixed-item">
+          <el-image
+            class="image"
+            :src="require('@/assets/images/telephone-icon.svg')"
+          ></el-image>
+        </div>
+        <div class="home-operation-fixed-item">
+          <el-image
+            class="image"
+            :src="require('@/assets/images/weixin-icon.svg')"
+          ></el-image>
+        </div>
+        <div
+          class="home-operation-fixed-item home-operation-fixed-item-last"
+          @click="backToTop"
+        >
+          <el-image
+            class="image"
+            :src="require('@/assets/images/top-icon.svg')"
+          ></el-image>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -231,65 +248,22 @@ import {
 } from "@/api/Home";
 import { getDictData } from "@/api/Dict";
 import { getPolicyData } from "@/api/PolicyAdvice";
+import HeaderBanner from "./components/HeaderBanner";
+import MenuNavigation from "./components/MenuNavigation";
 import InstitutionalCooperation from "./components/InstitutionalCooperation";
 import EnterpriseCooperation from "./components/EnterpriseCooperation";
 import FriendshipLink from "./components/FriendshipLink";
 export default {
   name: "HomeIndex",
   components: {
+    HeaderBanner,
+    MenuNavigation,
     InstitutionalCooperation,
     EnterpriseCooperation,
-    FriendshipLink
+    FriendshipLink,
   },
   data() {
     return {
-      bannerList: [],
-      menuList: [
-        {
-          name: "首页",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-1.svg"),
-        },
-        {
-          name: "政策咨询",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-1.svg"),
-          path: "/policyadvice",
-        },
-        {
-          name: "招聘就业",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-2.svg"),
-          path: "/recruitmentemployment",
-        },
-        {
-          name: "合作企业",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-3.svg"),
-          path: "/cooperativeenterprise",
-        },
-        {
-          name: "合作院校",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-4.svg"),
-          path: "/cooperativecolleges",
-        },
-        {
-          name: "技能培训",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-5.svg"),
-          path: "/skilltraining",
-        },
-        {
-          name: "适应性培训",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-6.svg"),
-          path: "/adaptivetraining",
-        },
-        {
-          name: "学历提升",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-7.svg"),
-          path: "/educationpromote",
-        },
-        {
-          name: "创业指引",
-          icon: require("@/assets/images/home-menu-icon/home-menu-icon-8.svg"),
-          path: "/workguide",
-        },
-      ],
       latestNews: {},
       newsList: [],
       noticeList: [],
@@ -321,7 +295,6 @@ export default {
     },
     initData() {
       this.getDict();
-      this.getBanner();
       this.getNews();
       this.getNotice();
       this.getPolicyBannerList();
@@ -339,16 +312,6 @@ export default {
           this.getPolicyList();
       });
     },
-    /**
-     * 获取轮播图
-     * @date 2022-08-10
-     * @returns {any}
-     */
-    getBanner() {
-      getBannerList({ type: 0 }).then((res) => {
-        this.bannerList = res.data;
-      });
-    },
     /**
      * 获取新闻
      * @date 2022-08-10
@@ -450,69 +413,32 @@ export default {
         this.$router.push(path);
       }
     },
+    /**
+     * 返回顶部
+     * @date 2022-08-22
+     * @returns {any}
+     */
+    backToTop() {
+      cancelAnimationFrame(this.timer);
+      const self = this;
+      self.timer = requestAnimationFrame(function fn() {
+        const oTop =
+          document.body.scrollTop || document.documentElement.scrollTop;
+        if (oTop > 0) {
+          document.body.scrollTop = document.documentElement.scrollTop =
+            oTop - 50;
+          self.timer = requestAnimationFrame(fn);
+        } else {
+          cancelAnimationFrame(self.timer);
+        }
+      });
+    },
   },
 };
 </script>
 
 <style lang="scss" scoped>
 .home {
-  &-carousel {
-    .image {
-      width: 100%;
-      height: 100%;
-    }
-    .image-slot {
-      line-height: 400px;
-      text-align: center;
-    }
-    :deep(.el-carousel__arrow) {
-      border: solid 1px rgba($color: #fff, $alpha: 0.7);
-    }
-    :deep(.el-carousel__button) {
-      // 指示器按钮
-      width: 10px;
-      height: 10px;
-      border: none;
-      border-radius: 50%;
-      background-color: #fff;
-    }
-    :deep(.is-active .el-carousel__button) {
-      // 指示器激活按钮
-      width: 18px;
-      border-radius: 10px;
-    }
-  }
-  &-menu {
-    background-color: #416050;
-    width: 100%;
-    line-height: 104px;
-    &-list {
-      width: 70%;
-      min-width: 600px;
-      display: flex;
-      flex-wrap: wrap;
-      // justify-content: space-between;
-      margin: 0 auto;
-      &-item {
-        color: #fff;
-        font-size: 22px;
-        padding: 0 30px;
-        cursor: pointer;
-        &:hover {
-          background-color: #478364;
-        }
-      }
-      .active {
-        background-color: #478364;
-      }
-    }
-  }
-  .home-menu-fixed {
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 111;
-  }
   &-main {
     &-latest {
       background-color: #fff;
@@ -600,6 +526,7 @@ export default {
         }
       }
       &-right {
+        position: relative;
         :deep(.el-tabs__item) {
           font-size: 20px;
           font-weight: 500;
@@ -643,6 +570,14 @@ export default {
             }
           }
         }
+        .more-btn {
+          position: absolute;
+          right: 0;
+          top: 12px;
+          color: #727272;
+          font-size: 14px;
+          cursor: pointer;
+        }
       }
     }
     &-policy {
@@ -833,5 +768,42 @@ export default {
   .home-main-top {
     margin-top: 104px;
   }
+  &-operation {
+    position: fixed;
+    top: 50%;
+    right: 0;
+    margin-top: -214px;
+    z-index: 1000;
+    &-fixed {
+      &-item {
+        width: 95px;
+        height: 95px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        background: #416050;
+        margin-bottom: 2px;
+        cursor: pointer;
+        &:nth-last-child(2) {
+          margin-bottom: 0;
+        }
+        &:first-child,
+        &:last-child {
+          background: #73aa8d;
+        }
+        .image {
+          width: 48px;
+          height: 48px;
+        }
+      }
+      &-item-last {
+        height: 42px;
+        .image {
+          width: 26px;
+          height: 26px;
+        }
+      }
+    }
+  }
 }
 </style>

+ 80 - 0
src/views/Home/components/HeaderBanner.vue

@@ -0,0 +1,80 @@
+<!--
+ * @Description: 顶部轮播图
+ * @Author: 空白格
+ * @Date: 2022-08-22 09:14:32
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-22 09:17:40
+ * @FilePath: \veterans_client_web\src\views\Home\components\HeaderBanner.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="home-carousel">
+    <el-carousel :interval="5000" arrow="always" height="400px">
+      <el-carousel-item v-for="(item, index) in bannerList" :key="index">
+        <el-image class="image" :src="item.bannerUrl" fit="contain">
+          <div slot="placeholder" class="image-slot">
+            加载图片中<span class="dot">...</span>
+          </div>
+        </el-image>
+      </el-carousel-item>
+    </el-carousel>
+  </div>
+</template>
+
+<script>
+import { getBannerList } from "@/api/Home";
+export default {
+  name: "HeaderBanner",
+  data() {
+    return {
+      bannerList: [],
+    };
+  },
+  created() {
+    this.getBanner();
+  },
+  methods: {
+    /**
+     * 获取轮播图
+     * @date 2022-08-22
+     * @returns {any}
+     */
+    getBanner() {
+      getBannerList({ type: 0 }).then((res) => {
+        this.bannerList = res.data;
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.home {
+  &-carousel {
+    .image {
+      width: 100%;
+      height: 100%;
+    }
+    .image-slot {
+      line-height: 400px;
+      text-align: center;
+    }
+    :deep(.el-carousel__arrow) {
+      border: solid 1px rgba($color: #fff, $alpha: 0.7);
+    }
+    :deep(.el-carousel__button) {
+      // 指示器按钮
+      width: 10px;
+      height: 10px;
+      border: none;
+      border-radius: 50%;
+      background-color: #fff;
+    }
+    :deep(.is-active .el-carousel__button) {
+      // 指示器激活按钮
+      width: 18px;
+      border-radius: 10px;
+    }
+  }
+}
+</style>

+ 134 - 0
src/views/Home/components/MenuNavigation.vue

@@ -0,0 +1,134 @@
+<!--
+ * @Description: 菜单导航
+ * @Author: 空白格
+ * @Date: 2022-08-22 09:22:47
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-22 09:29:26
+ * @FilePath: \veterans_client_web\src\views\Home\components\MenuNavigation.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="home-menu" :class="{ 'home-menu-fixed': scrollTop > 473 }">
+    <div class="home-menu-list">
+      <div
+        class="home-menu-list-item"
+        :class="{ active: index === 0 }"
+        v-for="(item, index) in menuList"
+        :key="index"
+        @click="jumpPage(item.path)"
+      >
+        {{ item.name }}
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      menuList: [
+        {
+          name: "首页",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-1.svg"),
+        },
+        {
+          name: "政策咨询",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-1.svg"),
+          path: "/policyadvice",
+        },
+        {
+          name: "招聘就业",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-2.svg"),
+          path: "/recruitmentemployment",
+        },
+        {
+          name: "合作企业",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-3.svg"),
+          path: "/cooperativeenterprise",
+        },
+        {
+          name: "合作院校",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-4.svg"),
+          path: "/cooperativecolleges",
+        },
+        {
+          name: "技能培训",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-5.svg"),
+          path: "/skilltraining",
+        },
+        {
+          name: "适应性培训",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-6.svg"),
+          path: "/adaptivetraining",
+        },
+        {
+          name: "学历提升",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-7.svg"),
+          path: "/educationpromote",
+        },
+        {
+          name: "创业指引",
+          icon: require("@/assets/images/home-menu-icon/home-menu-icon-8.svg"),
+          path: "/workguide",
+        },
+      ],
+    };
+  },
+  props: {
+    scrollTop: {
+      type: Number,
+      default: 0,
+    },
+  },
+  methods: {
+    /**
+     * 跳转到指定页面
+     * @date 2022-08-22
+     * @param {any} path
+     * @returns {any}
+     */
+    jumpPage(path) {
+      if (path) {
+        this.$router.push(path);
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.home {
+  &-menu {
+    background-color: #416050;
+    width: 100%;
+    line-height: 104px;
+    &-list {
+      width: 70%;
+      min-width: 600px;
+      display: flex;
+      flex-wrap: wrap;
+      // justify-content: space-between;
+      margin: 0 auto;
+      &-item {
+        color: #fff;
+        font-size: 22px;
+        padding: 0 30px;
+        cursor: pointer;
+        &:hover {
+          background-color: #478364;
+        }
+      }
+      .active {
+        background-color: #478364;
+      }
+    }
+    &-fixed {
+      position: fixed;
+      top: 0;
+      left: 0;
+      z-index: 111;
+    }
+  }
+}
+</style>

+ 24 - 0
src/views/NewsCenter/NewsCenterIndex.vue

@@ -0,0 +1,24 @@
+<!--
+ * @Description: 新闻中心
+ * @Author: 空白格
+ * @Date: 2022-08-22 10:20:21
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-22 10:25:48
+ * @FilePath: \veterans_client_web\src\views\NewsCenter\NewsCenterIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="app-main">
+    <BannerBreadcrumb title="新闻中心" :breadcrumb="false" />
+  </div>
+</template>
+
+<script>
+import BannerBreadcrumb from "@/components/BannerBreadcrumb";
+export default {
+  name: "NewsCenterIndex",
+  components: {
+    BannerBreadcrumb,
+  },
+};
+</script>