From deef42a3596beb86ff7b74653501d4e751a33984 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Thu, 26 May 2022 22:00:47 +0800 Subject: [PATCH] 月台 视频添加 --- src/components/mini/box2-class.vue | 96 +++++++++++++++--------------------------------- 1 files changed, 30 insertions(+), 66 deletions(-) diff --git a/src/components/mini/box2-class.vue b/src/components/mini/box2-class.vue index 9b38315..2426d1f 100644 --- a/src/components/mini/box2-class.vue +++ b/src/components/mini/box2-class.vue @@ -1,22 +1,26 @@ <template> <div class="blog-container "> - <span class="blog-pigeonhole">分类</span> + <span class="blog-pigeonhole"> + <router-link :to="{path:'/articleList'}"> + 分类 + </router-link> + </span> <div class="blog-scroll "> <div class="blog-log-list"> <div class="blog-log-item" v-for="item in list1"> - <router-link to='/main1'> - <span>{{item.name}}</span> + <router-link :to="{path:'/articleList',query:{typeId:item.id}}"> + <span>{{item.typeName}}</span> </router-link> - <span>{{item.count}}</span> + <span>{{item.count==null?'--':item.count+'篇'}}</span> </div> </div> <div class="blog-log-list"> <div class="blog-log-item" v-for="item in list2"> - <router-link to="/box1"> - <span>{{item.name}}</span> + <router-link :to="{path:'/articleList',query:{typeId:item.id}}"> + <span>{{item.typeName}}</span> </router-link> - <span>{{item.count}}</span> + <span>{{item.count==null?'--':item.count+'篇'}}</span> </div> </div> @@ -26,68 +30,22 @@ </template> <script> + import { + queryBlogArticleType + } from '../../api/blogArticleType.js' export default { + beforeMount() { + this.$message.info('loading', 0.3); + queryBlogArticleType({}).then((res) => { + this.list1 = res.data.slice(0, 3) + if (res.data.length >= 3) + this.list2 = res.data.slice(3) + }) + }, data() { return { - list1: [{ - name: "日志", - count: 10 - }, { - name: "分类", - count: 12 - }, { - name: "标签", - count: 14 - }], - list2: [{ - name: "Tag", - count: 133 - }, { - name: "专题", - count: 10 - }, { - name: "偏好", - count: 12 - }, { - name: "星标", - count: 14 - },{ - name: "Tag", - count: 133 - }, { - name: "专题", - count: 10 - }, { - name: "偏好", - count: 12 - }, { - name: "星标", - count: 14 - },{ - name: "Tag", - count: 133 - }, { - name: "专题", - count: 10 - }, { - name: "偏好", - count: 12 - }, { - name: "星标", - count: 14 - },{ - name: "Tag", - count: 133 - }, { - name: "专题", - count: 10 - }, { - name: "偏好", - count: 12 - }, { - name: "星标", - count: 14 - }] + list1: [], + list2: [], } } } @@ -96,6 +54,12 @@ </script> <style lang="less"> + .blog-pigeonhole { + a { + color: black; + } + } + /*日志部分*/ .blog-log-list { line-height: 1.6; -- Gitblit v1.9.1