Explorar o código

网站首页头部+新闻图片链接

guhongwei %!s(int64=5) %!d(string=hai) anos
pai
achega
f737e3b239

+ 2 - 1
src/layout/layout-part/foot.vue

@@ -1,12 +1,13 @@
 <template>
   <div id="foot">
     <el-row class="foot">
-      <el-col class="footTit">
+      <el-col :span="24" class="footTit">
         <p>
           <span class="text">{{ site.copyright }}</span>
           <span class="line">|</span>
           <span class="text">域名备案信息:{{ site.domain }}</span>
         </p>
+        <p v-html="site.remark"></p>
       </el-col>
     </el-row>
   </div>

+ 67 - 0
src/layout/layout-part/top.vue

@@ -0,0 +1,67 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col :span="24" class="top" :style="'background: url(' + site.banner + ');'">
+        <div class="w_1200">
+          <el-col :span="24" class="topMain">
+            <el-col :span="2">
+              <el-image style="width:100px;height:100px" :src="site.logo || ''"></el-image>
+            </el-col>
+            <el-col :span="22" class="topTit">
+              <el-link :underline="false">
+                {{ site.name }}
+              </el-link>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'top',
+  props: {},
+  components: {},
+  data: () => ({
+    site: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    async search() {
+      let site = sessionStorage.getItem('site');
+      if (site) {
+        site = JSON.parse(site);
+        this.$set(this, `site`, site);
+        return;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  min-height: 300px;
+}
+.topMain {
+  padding: 80px 0;
+}
+.topTit .el-link.el-link--default {
+  height: 100px;
+  line-height: 100px;
+  padding: 0 10px;
+  font-size: 3em;
+  font-family: cursive;
+  color: #850000;
+  text-shadow: 2px 2px 0 #fff;
+}
+</style>

+ 1 - 1
src/layout/recruitdetail-layout.vue

@@ -154,7 +154,7 @@ export default {
 .mainLeft {
   // width: 900px;
   min-height: 1000px;
-  padding: 0 15px;
+  padding: 0 50px;
   border-right: 1px solid #f6f6f6;
 }
 .mainRight {

+ 6 - 22
src/views/index/index.vue

@@ -1,26 +1,7 @@
 <template>
   <div id="index">
     <el-row>
-      <el-row>
-        <div class="w_0100 top">
-          <div class="topTit">
-            <div class="w_1200">
-              <el-col :span="12" class="logo">
-                <el-image style="width: 600px; height: 100px" :src="site.banner || ''"></el-image>
-                <span class="logo_txt" :style="`background:${backColor}`">{{ site.name }}</span>
-              </el-col>
-              <el-col :span="12" class="search">
-                <el-col :span="3" style="float: right;"
-                  ><el-button type="danger" icon="el-icon-search" :style="`background:${backColor}; border-color:${borderCol}`"></el-button
-                ></el-col>
-                <el-col :span="10" style="float: right;" class="searchInput" :style="`border-color:${borderCol}`"
-                  ><el-input v-model="input" placeholder="请输入内容"></el-input
-                ></el-col>
-              </el-col>
-            </div>
-          </div>
-        </div>
-      </el-row>
+      <top></top>
       <top-menu></top-menu>
       <div class="w_0100">
         <div class="w_1200">
@@ -37,7 +18,9 @@
                   <div class="block" style="width: 460px;float: left;">
                     <el-carousel style="width:460px;height:250px;overflow-y: hidden;" ref="shubiao">
                       <el-carousel-item v-for="(item, index) in newList" :key="index" :name="`${index}`">
-                        <img :src="item.picurl" class="newList" />
+                        <el-link :underline="false" @click="$router.push({ path: '/info/detail', query: { id: item.id } })"
+                          ><img :src="item.picurl" class="newList"
+                        /></el-link>
                       </el-carousel-item>
                     </el-carousel>
                   </div>
@@ -614,6 +597,7 @@
 
 <script>
 import foot from '@/layout/layout-part/foot.vue';
+import top from '@/layout/layout-part/top.vue';
 import topMenu from '@/layout/layout-part/top-menu.vue';
 import { mapActions, mapState } from 'vuex';
 export default {
@@ -640,6 +624,7 @@ export default {
   components: {
     foot,
     topMenu,
+    top,
   },
   data: () => ({
     color: '#850000',
@@ -1593,7 +1578,6 @@ img {
   float: left;
   position: relative;
   width: 100%;
-  height: 94px;
   background: #333333;
 }
 .el-carousel__item h3 {

+ 1 - 1
src/views/info/detail.vue

@@ -28,7 +28,7 @@
           <el-col :span="24" style="text-align:center">
             <el-image :src="info.picurl" style="height:60%;width:60%"></el-image>
           </el-col>
-          <el-col :span="24" style="padding-top: 1rem;" v-html="info.content"> </el-col>
+          <el-col :span="24" style="padding-top: 1rem;font-size: 20px;text-indent: 2rem;line-height: 30px;" v-html="info.content"> </el-col>
         </el-row>
       </template>
     </recruitdetail-layout>