| | |
| | | <template> |
| | | <div :class="` ${$state.theme === 'red' ? 'red-theme' : 'black-theme'}`" class="new-page"> |
| | | <!-- <div class="head"> --> |
| | | |
| | | <!-- <view>{{ $t('hj238') }}</view> --> |
| | | <!-- </div> --> |
| | | <!-- <div |
| | | :class="` ${$state.theme === 'red' ? 'red-theme' : 'black-theme'}`" |
| | | class="new-page" |
| | | v-if="false" |
| | | > --> |
| | | <div class="new-page" v-if="list.title"> |
| | | <page-head :title="list.title"></page-head> |
| | | <div class="newsTop"> |
| | | <div class="newsTitle">{{list.title}}</div> |
| | | <div class="newDetail-tits">{{ list.showTime| gettime}}</div> |
| | | <div class="newsTitle">{{ list.title }}</div> |
| | | <div class="newDetail-tits">{{ list.showTime | gettime }}</div> |
| | | </div> |
| | | <div class="newsDetail"> |
| | | <div>{{list.content}}</div> |
| | | <div>{{ list.content }}</div> |
| | | <div class="newsImg" v-if="list.imgurl"> |
| | | <img :src="list.imgurl"/> |
| | | <img :src="list.imgurl" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else class="new-page" style="padding-top:1em"> |
| | | <page-head></page-head> |
| | | <van-skeleton title :row="10" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as api from '@/axios/api' |
| | | import PageHead from "@/components/pageHead.vue"; |
| | | import * as api from "@/axios/api"; |
| | | export default { |
| | | created () { |
| | | created() { |
| | | if (this.$route.query.listid) { |
| | | this.list_id = this.$route.query.listid |
| | | this.list_id = this.$route.query.listid; |
| | | } |
| | | this.getqueryNewsList(this.$route.query.listid) |
| | | this.getqueryNewsList(this.$route.query.listid); |
| | | }, |
| | | data () { |
| | | components: { |
| | | PageHead |
| | | }, |
| | | data() { |
| | | return { |
| | | list_id: '', |
| | | list: [] |
| | | } |
| | | list_id: "", |
| | | list: {} |
| | | }; |
| | | }, |
| | | mounted () { |
| | | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | async getqueryNewsList (id) { |
| | | let data = await api.queryNewsDetail(id) |
| | | this.list = data.data |
| | | async getqueryNewsList(id) { |
| | | let data = await api.queryNewsDetail(id); |
| | | this.list = data.data; |
| | | } |
| | | |
| | | }, |
| | | filters: { |
| | | gettime (time) { |
| | | gettime(time) { |
| | | if (!time) { |
| | | return '' |
| | | return ""; |
| | | } |
| | | var nd = new Date(time) |
| | | var y = nd.getFullYear() |
| | | var mm = nd.getMonth() + 1 |
| | | var d = nd.getDate() |
| | | var h = nd.getHours() |
| | | var m = nd.getMinutes() |
| | | var c = nd.getSeconds() |
| | | var nd = new Date(time); |
| | | var y = nd.getFullYear(); |
| | | var mm = nd.getMonth() + 1; |
| | | var d = nd.getDate(); |
| | | var h = nd.getHours(); |
| | | var m = nd.getMinutes(); |
| | | var c = nd.getSeconds(); |
| | | if (mm < 10) { |
| | | mm = '0' + mm |
| | | mm = "0" + mm; |
| | | } |
| | | if (d < 10) { |
| | | d = '0' + d |
| | | d = "0" + d; |
| | | } |
| | | if (h < 10) { |
| | | h = '0' + h |
| | | h = "0" + h; |
| | | } |
| | | if (m < 10) { |
| | | m = '0' + m |
| | | m = "0" + m; |
| | | } |
| | | if (c < 10) { |
| | | c = '0' + c |
| | | c = "0" + c; |
| | | } |
| | | // 17:35:2922-06-2022 |
| | | return d + '-' + mm + '-' + y + ' ' + h + ':' + m + ':' + c |
| | | return d + "-" + mm + "-" + y + " " + h + ":" + m + ":" + c; |
| | | } |
| | | } |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .new-page { |
| | | height: calc(100% - 72px); |
| | | overflow: hidden; |
| | | // height: calc(100% - 72px); |
| | | // overflow: hidden; |
| | | min-height: 100vh; |
| | | .head { |
| | | height: 60px; |
| | | .mint-header { |
| | | height: 60px; |
| | | border-bottom: 1px solid #DDDDDD; |
| | | /deep/ .mintui-back, /deep/ .mint-header-title { |
| | | border-bottom: 1px solid #dddddd; |
| | | /deep/ .mintui-back, |
| | | /deep/ .mint-header-title { |
| | | font-size: 28px; |
| | | font-weight: 900; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .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 { |
| | | height: calc(100% - 254px); |
| | | overflow-y: auto; |
| | | width: 96%; |
| | | margin-left: 0; |
| | | margin-right: 0; |
| | | margin: 0 auto; |
| | | margin-top: 0.4rem; |
| | | font-size: 0.35rem; |
| | | line-height: 0.6rem; |
| | | } |
| | | /* 隐藏滚动条但能滚动 */ |
| | | .newsDetail { |
| | | overflow: auto; |
| | | /* 隐藏滚动条 */ |
| | | scrollbar-width: thin; |
| | | scrollbar-color: transparent transparent; |
| | | } |
| | | /* 隐藏滚动条的样式 */ |
| | | .newsDetail::-webkit-scrollbar { |
| | | width: 0px; |
| | | background-color: transparent; |
| | | } |
| | | .newsDetail::-webkit-scrollbar-thumb { |
| | | background-color: transparent; |
| | | } |
| | | .newsDetail::-webkit-scrollbar-track { |
| | | background-color: transparent; |
| | | } |
| | | .newsImg{ |
| | | width: 100%; |
| | | margin-top: 0.4rem; |
| | | } |
| | | .newsImg img{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .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 { |
| | | height: calc(100% - 254px); |
| | | overflow-y: auto; |
| | | width: 96%; |
| | | margin-left: 0; |
| | | margin-right: 0; |
| | | margin: 0 auto; |
| | | margin-top: 0.4rem; |
| | | font-size: 0.35rem; |
| | | line-height: 0.6rem; |
| | | } |
| | | /* 隐藏滚动条但能滚动 */ |
| | | .newsDetail { |
| | | overflow: auto; |
| | | /* 隐藏滚动条 */ |
| | | scrollbar-width: thin; |
| | | scrollbar-color: transparent transparent; |
| | | } |
| | | /* 隐藏滚动条的样式 */ |
| | | .newsDetail::-webkit-scrollbar { |
| | | width: 0px; |
| | | background-color: transparent; |
| | | } |
| | | .newsDetail::-webkit-scrollbar-thumb { |
| | | background-color: transparent; |
| | | } |
| | | .newsDetail::-webkit-scrollbar-track { |
| | | background-color: transparent; |
| | | } |
| | | .newsImg { |
| | | width: 100%; |
| | | margin-top: 0.4rem; |
| | | } |
| | | .newsImg img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |