| | |
| | | <div class="headertop filter-dot headertop-bar " v-if="coverURL.length>0"> |
| | | <figure class="centerbg" v-bind:style="{'background-image':'url('+this.coverURL+')'}"> |
| | | </figure> |
| | | <div class="countMeta" |
| | | v-if="articleFileType==fileType.fileTypeMarkDown_1|| articleFileType==fileType.fileTypeHtml_2"> |
| | | <div style="display: flex;justify-content: space-between;padding: 0px 10px;"> |
| | | <div style="display: flex;align-items: center;"> <span>发布时间:{{articelMeta.publishDate}}</span></div> |
| | | <div style="display: inline-grid;"> |
| | | <span style="text-align: end;">字数:{{wordCount}}</span> |
| | | <span>预计耗时:{{Math.floor(wordCount/500)}}~{{Math.ceil(wordCount/300)}}分钟</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="mySecret" v-if="myLock"> |
| | |
| | | </div> |
| | | |
| | | <div v-else> |
| | | |
| | | <div v-if="articleFileType==fileType.fileTypeTalking_9"> |
| | | <div class="markdown-body articleTitle"> |
| | | <h4>{{articelMeta.title}}</h4> |
| | |
| | | <div class="articleTitle"> |
| | | <h4>{{articelMeta.title}}</h4> |
| | | </div> |
| | | <vue-markdown :source="source" v-if="source.length>0"></vue-markdown> |
| | | <vue-markdown :source="source" v-if="source== null || source.length>0"></vue-markdown> |
| | | |
| | | <div class="introduceSamll" v-else-if="introduce.length==0"> |
| | | <div class="introduceSamll" v-else-if="introduce==null || introduce.length==0"> |
| | | <p>空荡荡的..我好像忘记写点什么了OωO</p> |
| | | </div> |
| | | |
| | |
| | | }, |
| | | options: optionsConfig, |
| | | img404: myConstant.img404, |
| | | |
| | | wordCount: 0 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | getWordCount() { |
| | | var iTotal = 0; |
| | | var c; |
| | | for (var i = 0; i < this.source.length; i++) { |
| | | c = this.source.charAt(i); |
| | | //基本汉字 |
| | | if (c.match(/[\u4e00-\u9fa5]/)) { |
| | | iTotal++; |
| | | } |
| | | //基本汉字补充 |
| | | else if (c.match(/[\u9FA6-\u9fcb]/)) { |
| | | iTotal++; |
| | | } |
| | | } |
| | | this.wordCount = iTotal; |
| | | }, |
| | | articleOptionHandle(type) { |
| | | this.$message.info(type) |
| | | }, |
| | |
| | | this.source = res.data; |
| | | }).catch(() => [ |
| | | this.$message.error("获取文件好像失败了..", 3) |
| | | ]) |
| | | ]).finally(() => { |
| | | setTimeout(() => { |
| | | _this.getWordCount(); |
| | | }, 500); |
| | | }) |
| | | } |
| | | } else if (res.data.articleFileType == this.fileType.fileTypeVideo_3) { |
| | | if (res.data.videoUrlList == null || res.data.videoUrlList.length < 1) { |
| | |
| | | transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); |
| | | border-radius: 16px; |
| | | } |
| | | } |
| | | |
| | | .countMeta { |
| | | position: absolute; |
| | | bottom: 0px; |
| | | width: 100%; |
| | | background: #f0f2f5; |
| | | opacity: 0.6; |
| | | } |
| | | |
| | | .headertop { |
| | |
| | | max-width: 120px; |
| | | } |
| | | } |
| | | .countMeta{ |
| | | bottom: 10px; |
| | | } |
| | | } |
| | | </style> |