|
@@ -8,7 +8,7 @@
|
|
<!-- <span class="describe">{{ contentsItem.describe }}</span> -->
|
|
<!-- <span class="describe">{{ contentsItem.describe }}</span> -->
|
|
<span class="date">
|
|
<span class="date">
|
|
发表时间: {{ contentsItem.date | dates }}
|
|
发表时间: {{ contentsItem.date | dates }}
|
|
- <span class="visit" v-if="contentsItem.source">来源: {{ contentsItem.source | source }}</span>
|
|
|
|
|
|
+ <span class="visit" v-if="contentsItem.source">来源: {{ contentsItem.source }}</span>
|
|
<span class="visit" v-if="contentsItem.author">作者 : {{ contentsItem && contentsItem.author }}</span>
|
|
<span class="visit" v-if="contentsItem.author">作者 : {{ contentsItem && contentsItem.author }}</span>
|
|
<span class="visit">访问量: {{ contentsItem.visit }}</span>
|
|
<span class="visit">访问量: {{ contentsItem.visit }}</span>
|
|
</span>
|
|
</span>
|
|
@@ -25,7 +25,6 @@
|
|
import moment from 'moment';
|
|
import moment from 'moment';
|
|
import breadcrumb from '../components/breadcrumb/index.vue';
|
|
import breadcrumb from '../components/breadcrumb/index.vue';
|
|
import { mapState, mapActions } from 'vuex';
|
|
import { mapState, mapActions } from 'vuex';
|
|
-let _this;
|
|
|
|
export default {
|
|
export default {
|
|
name: 'detailsHome',
|
|
name: 'detailsHome',
|
|
components: {
|
|
components: {
|
|
@@ -37,14 +36,21 @@ export default {
|
|
if (this.contentsItem.bind.includes('012')) return true;
|
|
if (this.contentsItem.bind.includes('012')) return true;
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ // isdetails() {
|
|
|
|
+ // const contentsItem = { ...this.contentsItem };
|
|
|
|
+ // contentsItem.source = this.dict?.source.find(e => e.code == contentsItem.source).name;
|
|
|
|
+ // return contentsItem;
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
id: ''
|
|
id: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ async created () {
|
|
|
|
+ await this.sourceQuery();
|
|
|
|
+ },
|
|
async mounted() {
|
|
async mounted() {
|
|
- _this = this;
|
|
|
|
this.id = this.$route.params.id;
|
|
this.id = this.$route.params.id;
|
|
const type = this.$route.query.type;
|
|
const type = this.$route.query.type;
|
|
if (type) {
|
|
if (type) {
|
|
@@ -52,7 +58,6 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
await this.contentsFetch({ id: this.id });
|
|
await this.contentsFetch({ id: this.id });
|
|
- await this.sourceQuery();
|
|
|
|
// eslint-disable-next-line no-unused-expressions
|
|
// eslint-disable-next-line no-unused-expressions
|
|
if (this.$refs.detailsHome) this.$refs.detailsHome?.scrollIntoView(true);
|
|
if (this.$refs.detailsHome) this.$refs.detailsHome?.scrollIntoView(true);
|
|
},
|
|
},
|
|
@@ -62,10 +67,6 @@ export default {
|
|
filters: {
|
|
filters: {
|
|
dates(e) {
|
|
dates(e) {
|
|
return moment(e).format('YYYY-MM-DD');
|
|
return moment(e).format('YYYY-MM-DD');
|
|
- },
|
|
|
|
- source(code) {
|
|
|
|
- const name = _this.dict?.source?.find(e => e.code == code).name;
|
|
|
|
- return name;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -106,9 +107,12 @@ export default {
|
|
padding-bottom: 10px;
|
|
padding-bottom: 10px;
|
|
}
|
|
}
|
|
.content {
|
|
.content {
|
|
- text-align: left;
|
|
|
|
- white-space: pre-wrap;
|
|
|
|
- word-wrap: break-word;
|
|
|
|
|
|
+ ::v-deep p {
|
|
|
|
+ margin: 0;
|
|
|
|
+ line-height: 2em;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ text-align: justify;
|
|
|
|
+ }
|
|
::v-deep iframe {
|
|
::v-deep iframe {
|
|
width: 70%;
|
|
width: 70%;
|
|
height: 500px;
|
|
height: 500px;
|