| | |
| | | <template> |
| | | <div class="article-meta"> |
| | | <!-- <div> |
| | | <a-button @click="()=>this.$router.back(-1)" style="position: absolute;"> |
| | | <a-icon type="left" /> |
| | | </a-button> |
| | | </div> --> |
| | | |
| | | <div class="headertop filter-dot headertop-bar " v-if="coverURL.length>0"> |
| | | <figure class="centerbg" v-bind:style="{'background-image':'url('+this.coverURL+')'}"> |
| | |
| | | </div> |
| | | |
| | | <div v-if="showMsg && !myLock"> |
| | | <div class="mySecretSamll" v-if="articleFileType==myConstant.fileTypeShort"> |
| | | <div class="mySecretSamll" v-if="articleFileType==fileType.fileTypeTalking_9"> |
| | | <p>碎碎念只有那么一点了</p> |
| | | <p>但是下面依旧可以碎碎念</p> |
| | | </div> |
| | |
| | | <span class="myTip">{{errorMsg}}</span> |
| | | </div> |
| | | |
| | | <div class="mySecret" v-else-if="articleFileType==myConstant.fileTypeVideo |
| | | || articleFileType==myConstant.fileTypeMp3 |
| | | || articleFileType==myConstant.fileTypeShort"> |
| | | <div class="mySecret" v-else-if="articleFileType==fileType.fileTypeVideo_3 |
| | | || articleFileType==fileType.fileTypeVideo_3 |
| | | || articleFileType==fileType.fileTypeTalking_9"> |
| | | |
| | | <div class="mySecretSamll" v-if="introduce.length==0"> |
| | | <p>碎碎念只有那么一点了</p> |
| | | <p>碎碎念只有那么一点了22</p> |
| | | <p>但是下面依旧可以碎碎念</p> |
| | | </div> |
| | | <pre style="white-space: pre-line;"> |
| | | {{introduce}} |
| | | <pre style="white-space: pre-line;padding: 10px;max-width: 100%;"> |
| | | {{introduce}} |
| | | </pre> |
| | | </div> |
| | | <div v-viewer.static class="markdown-body article-detail" v-else> |
| | | <div class="articleTitle"> |
| | | <h4>{{articelMeta.title}}</h4> |
| | | </div> |
| | | <vue-markdown :source="source"></vue-markdown> |
| | | </div> |
| | | </div> |
| | |
| | | import { |
| | | queryBlogArticleDetail |
| | | } from '../../api/blogArticle.js' |
| | | |
| | | import comment from "../mini/box12-comment.vue" |
| | | |
| | | import axios from 'axios' |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | myConstant: myConstant, |
| | | fileType: myConstant.fileType, |
| | | articelMeta: '', |
| | | isAllowedComment: 1, |
| | | introduce: "", |
| | | articleId: "", |
| | | articleFileType: myConstant.fileTypeMarkDown, |
| | | articleFileType: myConstant.fileType.fileTypeMarkDown_1, |
| | | typeId: null, |
| | | source: "", |
| | | showMsg: false, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(111); |
| | | console.log(this.$route.params); |
| | | this.articleId = this.$route.query.id; |
| | | this.articleFileType = this.$route.query.articleFileType; |
| | | this.typeId = this.$route.query.typeId; |
| | |
| | | queryDetail() { |
| | | this.showMsg = true; |
| | | this.errorMsg = "加载中.."; |
| | | |
| | | // if (this.articleFileType == myConstant.fileTypeShort) { |
| | | // this.errorMsg = "该类型日志在这里没有更多啦.."; |
| | | // return |
| | | // } |
| | | |
| | | queryBlogArticleDetail({ |
| | | id: this.articleId, |
| | |
| | | |
| | | this.articelMeta = res.data; |
| | | |
| | | if (res.data.articleFileType == myConstant.fileTypeMarkDown || |
| | | res.data.articleFileType == myConstant.fileTypeHtml) { |
| | | if (res.data.articleFileType == this.fileType.fileTypeMarkDown_1 || |
| | | res.data.articleFileType == this.fileType.fileTypeHtml_2) { |
| | | if (res.data.articleFileURL != null && res.data.articleFileURL != '') { |
| | | this.$axios |
| | | .get(res.data.articleFileURL) |
| | |
| | | <style lang="less"> |
| | | @import '../../assets/md.less'; |
| | | |
| | | .articleTitle { |
| | | h4 { |
| | | margin: 0px 0px 20px 0px; |
| | | -webkit-line-clamp: 1; |
| | | } |
| | | |
| | | text-align: center; |
| | | width: 100%; |
| | | |
| | | } |
| | | |
| | | .headertop { |
| | | position: relative; |