| | |
| | | <template> |
| | | <div class=""> |
| | | <div class="header"> |
| | | <mt-header title="新闻"> |
| | | <router-link to="/user" slot="left"> |
| | | <mt-button icon="back"></mt-button> |
| | | </router-link> |
| | | </mt-header> |
| | | <div :class="` ${$state.theme === 'red' ? 'red-theme' : 'black-theme'}`" class=""> |
| | | |
| | | <div class="newsTop"> |
| | | <div class="newsTitle">{{list.title}}</div> |
| | | <div class="newDetail-tits">{{ list.addTime| gettime}}</div> |
| | | </div> |
| | | <div class=""> |
| | | <div>{{list.title}}</div> |
| | | <div class="item-times">{{ | gettime}}</div> |
| | | <div class="newsDetail"> |
| | | <div>{{list.content}}</div> |
| | | <div class="newsImg" v-if="list.imgurl"> |
| | | <img :src="list.imgurl"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | export default { |
| | | created() { |
| | | if (this.$route.query.id) { |
| | | this.list_id = this.$route.query.id; |
| | | if (this.$route.query.listid) { |
| | | this.list_id = this.$route.query.listid; |
| | | } |
| | | |
| | | this.getqueryNewsList(this.$route.query.listid); |
| | | }, |
| | | data () { |
| | | return{ |
| | | list_id:"" |
| | | list_id:"", |
| | | list:[], |
| | | }}, |
| | | mounted(){ |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | async getqueryNewsList(id){ |
| | | let data = await api.queryNewsDetail(id); |
| | | this.list = data.data |
| | | |
| | | } |
| | | |
| | | }, |
| | | filters:{ |
| | | gettime(time) { |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .item-times{ |
| | | color: #999; |
| | | margin-bottom: 0.15rem; |
| | | .newDetail-tits{ |
| | | margin-top: 0.4rem; |
| | | font-size: 0.4rem; |
| | | margin-bottom: 0.4rem; |
| | | } |
| | | .newsTop{ |
| | | border-bottom: 0.01rem solid #cdcdcd; |
| | | padding-top: 0.3rem; |
| | | color: #000; |
| | | width: 96%; |
| | | margin-left: 0; |
| | | margin-right: 0; |
| | | margin: 0 auto; |
| | | } |
| | | .newsTitle{ |
| | | font-size: 0.55rem; |
| | | font-weight: 500; |
| | | } |
| | | .newsDetail{ |
| | | width: 96%; |
| | | margin-left: 0; |
| | | margin-right: 0; |
| | | margin: 0 auto; |
| | | margin-top: 0.4rem; |
| | | font-size: 0.35rem; |
| | | line-height: 0.6rem; |
| | | } |
| | | .newsImg{ |
| | | width: 100%; |
| | | margin-top: 0.4rem; |
| | | } |
| | | .newsImg img{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |