Преглед на файлове

Merge branch 'master' of http://git.cc-lotus.info/smart-jobs/web-center

lrf402788946 преди 5 години
родител
ревизия
41c6fb60b1

+ 37 - 34
src/components/aboutInfo.vue

@@ -1,21 +1,24 @@
 <template>
-  <div id="aboutInfo">
+  <div id="index">
     <el-row>
-      <el-col :span="24" class="top">
-        <div class="w_1200">
-          <top :info="info" :Color="Color"></top>
+      <el-col :sapn="24" class="top">
+        <div class="w_1270">
+          <top :info="info"></top>
         </div>
       </el-col>
-      <el-col :span="24" class="menu">
-        <menuInfo :backColor="backColor"></menuInfo>
+      <el-col :sapn="24" class="banner">
+        <banner :info="info"></banner>
       </el-col>
-      <el-col :span="24" class="main">
-        <div class="w_1200">
+      <el-col :sapn="24" class="menu">
+        <menuInfo :menuList="menuList" :backColor="backColor"></menuInfo>
+      </el-col>
+      <el-col :sapn="24" class="main">
+        <div class="w_1270">
           <about :aboutInfo="aboutInfo"></about>
         </div>
       </el-col>
-      <el-col :span="24" class="foot">
-        <foot :info="info" :backColor="backColor"></foot>
+      <el-col :sapn="24" class="down">
+        <down :info="info" :backColor="backColor"></down>
       </el-col>
     </el-row>
   </div>
@@ -23,24 +26,24 @@
 
 <script>
 import top from '@/layout/index/top.vue';
+import banner from '@/layout/index/banner.vue';
 import menuInfo from '@/layout/index/menuInfo.vue';
-import listLeft from '@/layout/list/listLeft.vue';
 import about from '@/layout/detail/about.vue';
-
-import foot from '@/layout/index/foot.vue';
+import down from '@/layout/index/down.vue';
 export default {
-  name: 'aboutInfo',
+  name: 'index',
   props: {
-    info: null, //头部信息
-    Color: null, //头部电话字体颜色
-    backColor: null, //导航菜单背景颜色
-    aboutInfo: null, //关于我们详细信息
+    backColor: null, //背景颜色
+    info: null, //站点信息
+    menuList: null, //菜单
+    aboutInfo: null, //关于我们
   },
   components: {
     top, //头部
-    menuInfo, //导航
-    foot, //底部信息
-    about, //詳情
+    banner, //banner
+    menuInfo, //菜单
+    about, //关于我们
+    down, //底部
   },
   data: () => ({}),
   created() {},
@@ -50,29 +53,29 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.w_1200 {
-  width: 1200px;
+.w_1270 {
+  width: 1270px;
   margin: 0 auto;
 }
 .top {
-  height: 120px;
+  height: 40px;
   overflow: hidden;
+  background-color: #f5f5f54f;
 }
-.menu {
-  height: 40px;
+.banner {
+  height: 300px;
   overflow: hidden;
 }
-.main {
-  min-height: 1060px;
-  margin: 30px 0 20px 0;
+.menu {
+  height: 50px;
   overflow: hidden;
 }
-.mainList {
-  float: right;
-  width: 930px;
+.main {
+  min-height: 1000px;
+  background: #f6f6f6;
 }
-.foot {
-  height: 133px;
+.down {
+  min-height: 135px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/corp.vue

@@ -77,7 +77,7 @@ export default {
   margin: 20px 0;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/detail.vue

@@ -79,7 +79,7 @@ export default {
   background: #f6f6f6;
 }
 .down {
-  height: 135px;
+  min-height: 135px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/index.vue

@@ -247,7 +247,7 @@ export default {
   overflow: hidden;
 }
 .down {
-  height: 135px;
+  min-height: 135px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/jobfair.vue

@@ -79,7 +79,7 @@ export default {
   border: 1px solid #ccc;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/jobinfo.vue

@@ -77,7 +77,7 @@ export default {
   margin: 20px 0;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   overflow: hidden;
 }
 </style>

+ 1 - 1
src/components/jobs.vue

@@ -84,7 +84,7 @@ export default {
   margin: 20px 0;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   overflow: hidden;
 }
 </style>

+ 1 - 2
src/components/list.vue

@@ -89,8 +89,7 @@ export default {
   margin: 0 0 0 20px;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   background-color: #0457c7;
-  overflow: hidden;
 }
 </style>

+ 1 - 2
src/components/member.vue

@@ -118,7 +118,6 @@ export default {
   margin: 30px 0 0 0;
 }
 .down {
-  height: 135px;
-  overflow: hidden;
+  min-height: 135px;
 }
 </style>

+ 1 - 2
src/components/memberDetail.vue

@@ -67,7 +67,6 @@ export default {
   background: #f6f6f6;
 }
 .down {
-  height: 135px;
-  overflow: hidden;
+  min-height: 135px;
 }
 </style>

+ 1 - 2
src/components/memberList.vue

@@ -84,7 +84,6 @@ export default {
   margin: 40px 0 0 0;
 }
 .down {
-  height: 135px;
-  overflow: hidden;
+  min-height: 135px;
 }
 </style>

+ 1 - 2
src/components/newsList.vue

@@ -91,8 +91,7 @@ export default {
   margin: 0 0 0 20px;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   background-color: #0457c7;
-  overflow: hidden;
 }
 </style>

+ 1 - 2
src/components/quietDetail.vue

@@ -81,8 +81,7 @@ export default {
   background: #f5f5f5;
 }
 .foot {
-  height: 133px;
+  min-height: 133px;
   background-color: #0457c7;
-  overflow: hidden;
 }
 </style>

+ 1 - 2
src/components/talk.vue

@@ -77,7 +77,6 @@ export default {
   margin: 20px 0;
 }
 .foot {
-  height: 133px;
-  overflow: hidden;
+  min-height: 133px;
 }
 </style>

+ 1 - 1
src/layout/detail/about.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="about">
-    <el-row>
+    <el-row style="margin:30px 0;">
       <el-col :span="24" class="top">
         <span>关于我们</span>
       </el-col>

+ 5 - 0
src/router/index.js

@@ -87,6 +87,11 @@ const router = new Router({
       name: 'quiet',
       component: () => import('../views/quiet.vue'),
     },
+    {
+      path: '/about',
+      name: 'about',
+      component: () => import('../views/aboutMe.vue'),
+    },
   ],
 });
 

+ 91 - 12
src/views/aboutMe.vue

@@ -1,12 +1,19 @@
 <template>
   <div id="aboutMe">
-    <about-detail :info="info" :backColor="backColor" :Color="Color" :aboutInfo="aboutInfo"></about-detail>
+    <about-detail :info="site" :menuList="menu" :backColor="backColor" :Color="Color" :aboutInfo="aboutInfo"></about-detail>
   </div>
 </template>
 
 <script>
 import aboutDetail from '@/components/aboutInfo.vue';
+import { mapActions, mapState } from 'vuex';
+import _ from 'lodash';
 export default {
+  metaInfo() {
+    return {
+      title: this.siteTitle ? this.siteTitle : '吉林省高等学校毕业生就业信息网',
+    };
+  },
   name: 'aboutMe',
   props: {},
   components: {
@@ -14,16 +21,16 @@ export default {
   },
   data: () => ({
     info: {
-      src: require('@/assets/logo.png'),
-      phone: '0431-12345678',
-      banner: require('@/assets/banner.png'),
-      address: '办公地址:长春市经济技术开发区金川街151号吉林省高等学校毕业生就业指导中心2楼一站式办公大厅',
-      email: '邮编:130012',
-      gongjiao: '公交线路:乘坐120路、227路、20路、260路、80路、130路、281路、154路、190路、125路公交北方市场下车,北方市场南门南行200米。',
-      mobile: '业务咨询电话:0431-84657570 0431-84657571;',
-      date: '办公时间:周一至周五,法定假日不对外办公。',
-      footTitle: '吉ICP备09006292号-1 Copyright 2013 版权所有 吉林省高等学校毕业生就业指导中心 All Rights Reserved',
+      title: '吉林省高等学校毕业生就业信息网',
+      english: 'Jilin University Graduate Employment Guidance Center',
+      banner: require('@/assets/banner.jpg'),
+      logo: require('@/assets/logo.png'),
+      copyright: '吉ICP备09006292号-1 Copyright 2019 版权所有 吉林省高等学校毕业生就业指导中心 All Rights Reserved',
     },
+    site: {}, //站点信息
+    siteTitle: '吉林省高等学校毕业生就业信息网', //站点标题
+    menu: [], //菜单
+    modules: [], //模块
     backColor: '#0457c7',
     Color: '#0457c7',
     aboutInfo: {
@@ -48,9 +55,81 @@ export default {
         '“天时人事日相催,冬至阳生春又来”,中心将秉承“热情、公正、廉洁、高效”的宗旨,竭诚为广大高校毕业生提供更全面、快捷的就业服务,不断开创毕业生就业工作新局面。',
     },
   }),
-  created() {},
+  async created() {
+    await this.toGetSite(); //获取主站信息
+    this.loadMenu(); //获取菜单信息
+  },
   computed: {},
-  methods: {},
+  methods: {
+    ...mapActions(['getSite', `getMenu`, 'getColumn', 'getAllNews', 'getAllColumn', 'getModule', 'getNews', 'getJobInfo', 'getPosts', 'getLink']),
+    //站点信息
+    async toGetSite() {
+      let site = sessionStorage.getItem('site');
+      if (site) {
+        this.$set(this, `site`, JSON.parse(site));
+        this.$set(this, `siteTitle`, this.site.name);
+      } else {
+        let result = await this.getSite({ type: 'search' });
+        if (result.errcode === 0) {
+          sessionStorage.setItem('site', JSON.stringify(result.data));
+          if (_.get(result.data, `custom`)) {
+            let item = result.custom;
+          }
+          this.$set(this, `site`, result.data);
+          this.$set(this, `siteTitle`, this.site.name);
+        }
+      }
+    },
+    //菜单
+    async loadMenu() {
+      let menu = sessionStorage.getItem('menu');
+      if (menu) {
+        this.$set(this, `menu`, JSON.parse(menu));
+        this.finishedMenu();
+        return;
+      } else this.toGetMenu();
+    },
+    async toGetMenu() {
+      let result = await this.getMenu({ type: `list` });
+      if (result.errcode === 0) {
+        // sessionStorage.setItem('menu', JSON.stringify(result.data));
+        this.$set(this, `menu`, result.data);
+        this.finishedMenu();
+      }
+    },
+    async finishedMenu() {
+      let menus = JSON.parse(JSON.stringify(this.menu));
+      for (const item of menus) {
+        if (item.type === 'content') {
+          item.path = `/detail?id=${item.content_id}`;
+        } else if (item.type !== 'url') {
+          let res = await this.completeMenu(item);
+          item.children = res;
+        }
+      }
+      this.$set(this, `menu`, menus);
+    },
+    async completeMenu(item) {
+      let result = await this.getColumn({
+        type: `list`,
+        data: { parent_id: item.id },
+      });
+      if (result.errcode === 0) {
+        let columns = result.data;
+        for (const col of columns) {
+          if (col.type === 'content') {
+            col.path = `/detail/${col.content_id}`;
+          } else if (col.type !== 'url') {
+            col.path = `/newsList/menu/${col.id}?title=${col.title}`;
+            if (col.parent.includes('党员')) {
+              col.path = `/memberList/menu/${col.id}?title=${col.title}`;
+            }
+          }
+        }
+        return columns;
+      }
+    },
+  },
 };
 </script>