|
@@ -11,7 +11,7 @@
|
|
|
{{ item.title }}
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="date">
|
|
|
- {{ item.create_date || '暂无' }}
|
|
|
+ {{ getDate(item.create_date) || '暂无' }}
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="orgin"> 信息来源:{{ item.origin || '暂无' }} </el-col>
|
|
|
</el-col>
|
|
@@ -24,6 +24,7 @@
|
|
|
<script>
|
|
|
import top from './parts/topColumn.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+var moment = require('moment');
|
|
|
export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -53,6 +54,11 @@ export default {
|
|
|
detailBtn(data) {
|
|
|
this.$router.push({ path: './list', query: { index: 0, id: data._id } });
|
|
|
},
|
|
|
+ // 整理时间
|
|
|
+ getDate(date) {
|
|
|
+ let newsDate = moment(date).format('YYYY-MM-DD');
|
|
|
+ if (newsDate) return newsDate;
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|