From 80476fae71f08bf4408c7509eff254031a4eeac6 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Wed, 24 Aug 2022 18:47:09 +0800 Subject: [PATCH] 路由修正,常量提取 --- src/components/mini/box14-video.vue | 82 ++++++++++++++++++++-------------------- 1 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/components/mini/box14-video.vue b/src/components/mini/box14-video.vue index ad280c1..dba2231 100644 --- a/src/components/mini/box14-video.vue +++ b/src/components/mini/box14-video.vue @@ -5,50 +5,50 @@ <a-icon type="delete" /> 空空如也.. </p> </div> - <div class="gridClass"> - <div class="entry-preview" v-for="item in data"> - <div class="thumbnail_box" @click="showMyVideo(item)"> - <div class="thumbnail"> - <img :src="item.coverFileURL" alt="" loading="lazy" :onerror="img404"> - </div> - </div> - <div class="entry-post"> - <div class="entry-header"> - <h5 class="entry-title"> - <router-link :to="{path:'videoDetail',query:{id:item.id}}" :title="item.title"> - {{item.title}} - </router-link> - <!-- {{item.title}} --> - </h5> - <div class="post_content"> - {{item.introduce}} + <div style="min-height: 600px;"> + <div class="gridClass"> + <div class="entry-preview" v-for="item in data"> + <div class="thumbnail_box" @click="showMyVideo(item)"> + <div class="thumbnail"> + <img :src="item.coverFileURL" alt="" loading="lazy" :onerror="img404"> </div> </div> - <div class="entry-meta"> - <div class="post-categories"> - <span class="tag vcard"> - <a-icon type="customer-service" /> - <a href="#" rel="category tag"> {{item.articleTypeName}}</a> - </span> - <!-- <span class="tag-list"> + <div class="entry-post"> + <div class="entry-header"> + <h5 class="entry-title"> + <router-link :to="{path:'videoDetail',query:{id:item.id}}" :title="item.title"> + {{item.title}} + </router-link> + <!-- {{item.title}} --> + </h5> + <div class="post_content"> + {{item.introduce}} + </div> + </div> + <div class="entry-meta"> + <div class="post-categories"> + <span class="tag vcard"> + <a-icon type="customer-service" /> + <a href="#" rel="category tag"> {{item.articleTypeName}}</a> + </span> + <!-- <span class="tag-list"> <a href="#" rel="tag">影评</a> <a href="#" rel="tag">电影</a> <a href="#" rel="tag">蜘蛛侠</a> </span> --> - </div> - <div class="post-on"> - <span class="entry-date"> - <a-icon type="calendar" /> - <a href="#" rel="bookmark"> - {{item.publishDate}} - </a> - </span> + </div> + <div class="post-on"> + <span class="entry-date"> + <a-icon type="calendar" /> + <a href="#" rel="bookmark"> + {{item.publishDate}} + </a> + </span> + </div> </div> </div> </div> - </div> - </div> <a-row type="flex" justify="center"> <div> @@ -60,7 +60,7 @@ </template> <script> import { - queryBlogArticleList + platform } from '../../api/blogArticle.js' import myConstant from "../../config/myConstant.js" @@ -76,7 +76,7 @@ defaultPageSize: 6 }, data: [], - img404: "this.onerror='';this.src=\"http://t.inleft.com/share/media_photo/idea_beijing.jpg\"", + img404: myConstant.img404, } }, mounted() { @@ -85,10 +85,10 @@ methods: { onChange(current) { this.page.current = current; - queryBlogArticleList({ + platform({ pageNo: current, pageSize: this.page.pageSize, - fileType: myConstant.fileTypeVideo + activeKey: this.$attrs.activeKey }).then((res) => { this.page.total = Number(res.data.total) this.page.pageSize = Number(res.data.size); @@ -275,17 +275,17 @@ grid-template-columns: repeat(2, 1fr); } } - + @media screen and (max-width:767px) { .gridClass { grid-row-gap: 2rem; grid-column-gap: 0rem; grid-template-columns: repeat(1, 1fr); - + .entry-preview { display: block; } - + .thumbnail_box { min-width: 100%; } -- Gitblit v1.9.1