Browse Source

首页底部栏展示修改 视频新闻将视频放到顶部

master
aBin 3 years ago
parent
commit
7ee7e586ba
  1. 12
      src/components/Footer/Footer.vue
  2. 8
      src/components/RichText/RichText.vue

12
src/components/Footer/Footer.vue

@ -60,18 +60,18 @@ import { getLink } from 'config/api';
export default { export default {
data() { data() {
return { return {
isTrue: true, isTrue: false,
str: '', str: '',
otherLink: {}, otherLink: {},
}; };
}, },
watch: { watch: {
'$route.path'(value) { '$route.path'(value) {
if (value === '/') { // if (value === '/') {
this.isTrue = true; // this.isTrue = true;
} else { // } else {
this.isTrue = false; // this.isTrue = false;
} // }
}, },
}, },
created() { created() {

8
src/components/RichText/RichText.vue

@ -8,6 +8,9 @@
<div v-if="richObj.publishTime">发表日期: {{ $moment(richObj.publishTime).format('YYYY-MM-DD') }}</div> <div v-if="richObj.publishTime">发表日期: {{ $moment(richObj.publishTime).format('YYYY-MM-DD') }}</div>
</div> </div>
</template> </template>
<div style="text-align:center;" class="mt-4" v-if="richObj && richObj.titleUrl && code === '0207'">
<video style="width: 100%;height: 400px" controls :src="richObj.titleUrl" />
</div>
<div class="mt-4 content-size" v-if="richObj.content" v-dompurify-html="richObj.content"></div> <div class="mt-4 content-size" v-if="richObj.content" v-dompurify-html="richObj.content"></div>
<a-empty v-else /> <a-empty v-else />
<template v-if="richObj && richObj.title"> <template v-if="richObj && richObj.title">
@ -24,7 +27,7 @@ export default {
}, },
}, },
data() { data() {
return {}; return { code: '' };
}, },
watch: { watch: {
richObj(val) { richObj(val) {
@ -34,6 +37,9 @@ export default {
} }
}, },
}, },
mounted() {
this.code = this.$route.query.code;
},
created() { created() {
if (this.richObj.jumpUrl) { if (this.richObj.jumpUrl) {
window.open(this.richObj.jumpUrl); window.open(this.richObj.jumpUrl);

Loading…
Cancel
Save