Explorar o código

修改新闻框架

lrf402788946 %!s(int64=5) %!d(string=hai) anos
pai
achega
4237ff67b2
Modificáronse 2 ficheiros con 40 adicións e 27 borrados
  1. 4 4
      src/router.js
  2. 36 23
      src/views/info/detail.vue

+ 4 - 4
src/router.js

@@ -19,12 +19,12 @@ export default new Router({
           path: 'list',
           path: 'list',
           component: () => import('@/views/info/list.vue'),
           component: () => import('@/views/info/list.vue'),
         },
         },
-        {
-          path: 'detail',
-          component: () => import('@/views/info/detail.vue'),
-        },
       ],
       ],
     },
     },
+    {
+      path: '/info/detail',
+      component: () => import('@/views/info/detail.vue'),
+    },
     {
     {
       path: '/jobfair',
       path: '/jobfair',
       component: () => import('@/views/jobfair/index.vue'),
       component: () => import('@/views/jobfair/index.vue'),

+ 36 - 23
src/views/info/detail.vue

@@ -1,36 +1,49 @@
 <template>
 <template>
   <div id="index">
   <div id="index">
-    <el-row v-if="!loading">
-      <el-col :span="24">
-        <el-breadcrumb separator-class="el-icon-arrow-right">
-          <el-breadcrumb-item :to="{ path: '/' }"
-            ><i class="el-icon-s-home"></i>
-            <span style="font-size: 0.8rem;">网站首页</span>
-          </el-breadcrumb-item>
-          <el-breadcrumb-item><span style="font-size: 0.9rem;">新闻列表</span></el-breadcrumb-item>
-          <el-breadcrumb-item><span style="font-zise: 0.8rem;">新闻详情</span></el-breadcrumb-item>
-        </el-breadcrumb>
-      </el-col>
-      <!-- <el-col :span="24" align="right" style="font-size: 0.8rem;">插件</el-col> -->
-      <el-col :span="24" align="center" style="font-size: 1.5rem; padding-top: 1rem;">{{ info.title }}</el-col>
-      <el-col :span="24" align="right" class="date">
-        发布时间:{{ info.meta && info.meta.createdAt ? new Date(info.meta.createdAt).toLocaleDateString() : '' || '' }}
-        <!-- 点击人次:26125 -->
-      </el-col>
-      <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-row>
+    <recruitdetail-layout :needRight="false" v-if="!loading">
+      <template v-slot:mainInfoTop>
+        <el-row>
+          <el-col :span="24">
+            <el-breadcrumb separator-class="el-icon-arrow-right">
+              <el-breadcrumb-item :to="{ path: '/' }"
+                ><i class="el-icon-s-home"></i>
+                <span style="font-size: 0.8rem;">网站首页</span>
+              </el-breadcrumb-item>
+              <el-breadcrumb-item>
+                <span style="font-size: 0.9rem;"><el-link :underline="false" @click="$router.push({ path: '/info/list' })">新闻列表</el-link></span>
+              </el-breadcrumb-item>
+              <el-breadcrumb-item><span style="font-zise: 0.8rem;">新闻详情</span></el-breadcrumb-item>
+            </el-breadcrumb>
+          </el-col>
+        </el-row>
+      </template>
+      <template v-slot:mainLeft>
+        <el-row>
+          <!-- <el-col :span="24" align="right" style="font-size: 0.8rem;">插件</el-col> -->
+          <el-col :span="24" align="center" style="font-size: 1.5rem; padding-top: 1rem;">{{ info.title }}</el-col>
+          <el-col :span="24" align="right" class="date">
+            发布时间:{{ info.meta && info.meta.createdAt ? new Date(info.meta.createdAt).toLocaleDateString() : '' || '' }}
+            <!-- 点击人次:26125 -->
+          </el-col>
+          <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-row>
+      </template>
+    </recruitdetail-layout>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import recruitdetailLayout from '@/layout/recruitdetail-layout.vue';
 import { mapActions, mapState } from 'vuex';
 import { mapActions, mapState } from 'vuex';
 export default {
 export default {
   name: 'index',
   name: 'index',
   props: {},
   props: {},
-  components: {},
+  components: {
+    recruitdetailLayout,
+  },
   data: () => ({
   data: () => ({
     info: {},
     info: {},
     loading: true,
     loading: true,