2021-12-16 16:04:21 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="Detail">
|
|
|
|
|
<div class="header-top">
|
2021-12-23 15:09:25 +08:00
|
|
|
<div class="titles">{{data.title}}</div>
|
2021-12-23 18:54:49 +08:00
|
|
|
<div class="flex">
|
|
|
|
|
<span class="left">
|
|
|
|
|
<span class="type" v-if="data.categoryName">{{data.categoryName}}</span>
|
|
|
|
|
<span class="times">{{ data.createTime }}</span>
|
|
|
|
|
</span>
|
2021-12-16 16:04:21 +08:00
|
|
|
|
2021-12-23 18:54:49 +08:00
|
|
|
<span class="right">
|
2021-12-27 09:23:39 +08:00
|
|
|
<img src="./img/view-icon.png" alt="">
|
2021-12-23 18:54:49 +08:00
|
|
|
<span>{{data.viewCount}}</span>
|
|
|
|
|
</span>
|
2021-12-16 16:04:21 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="header-middle">
|
2021-12-23 20:02:26 +08:00
|
|
|
<div class="contsnts">
|
|
|
|
|
<u-parse :html="data.content"></u-parse>
|
|
|
|
|
</div>
|
2021-12-24 21:20:52 +08:00
|
|
|
|
|
|
|
|
|
2021-12-23 18:54:49 +08:00
|
|
|
</div>
|
2022-03-21 15:44:22 +08:00
|
|
|
<!-- <div class="img-list" v-if="data.files && data.files.length && data.contentType != 1">
|
2021-12-23 18:54:49 +08:00
|
|
|
<div class="title">图片</div>
|
2021-12-24 09:04:23 +08:00
|
|
|
<img :src="item.accessUrl" alt="" v-for="(item, index) in data.files" :key="index" @click="previewImage(data.files, item.accessUrl)" />
|
2022-03-21 15:44:22 +08:00
|
|
|
</div> -->
|
2021-12-24 14:48:06 +08:00
|
|
|
<div class="img-list" v-if="data.files && data.files.length && data.contentType == 1">
|
2022-01-18 13:38:53 +08:00
|
|
|
<video width="400" height="400" :poster="data.pictureUrl" :src="data.files[0].url"></video>
|
2021-12-24 14:48:06 +08:00
|
|
|
</div>
|
2021-12-16 16:04:21 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: 'Detail',
|
|
|
|
|
components: {},
|
|
|
|
|
props: {},
|
|
|
|
|
data() {
|
2021-12-16 17:13:18 +08:00
|
|
|
return {
|
2021-12-23 15:09:25 +08:00
|
|
|
data: {},
|
2021-12-16 17:13:18 +08:00
|
|
|
id: '',
|
2021-12-23 15:09:25 +08:00
|
|
|
listName: '',
|
|
|
|
|
selectList: []
|
2021-12-16 17:13:18 +08:00
|
|
|
}
|
2021-12-16 16:04:21 +08:00
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
watch: {},
|
2021-12-16 17:13:18 +08:00
|
|
|
onLoad(o) {
|
|
|
|
|
this.id = o.id
|
2021-12-23 15:09:25 +08:00
|
|
|
this.listName = o.listName
|
|
|
|
|
this.getType()
|
2021-12-24 15:27:36 +08:00
|
|
|
},
|
|
|
|
|
onShow() {
|
2021-12-24 14:17:10 +08:00
|
|
|
document.title = this.listName
|
2021-12-16 17:13:18 +08:00
|
|
|
},
|
2021-12-24 15:27:36 +08:00
|
|
|
|
2021-12-16 16:04:21 +08:00
|
|
|
mounted() {},
|
2021-12-16 17:13:18 +08:00
|
|
|
methods: {
|
2021-12-24 09:04:23 +08:00
|
|
|
previewImage(images, img) {
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
urls: images.map(v => v.url),
|
|
|
|
|
current: img
|
|
|
|
|
})
|
|
|
|
|
},
|
2021-12-16 17:13:18 +08:00
|
|
|
getDetail() {
|
2021-12-23 15:09:25 +08:00
|
|
|
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
|
2021-12-16 17:13:18 +08:00
|
|
|
if (res?.data) {
|
|
|
|
|
this.data = res.data
|
2021-12-23 15:09:25 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getType() {
|
|
|
|
|
this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
2021-12-23 18:54:49 +08:00
|
|
|
if(res.data && res.data.length) {
|
2021-12-23 15:09:25 +08:00
|
|
|
this.selectList = res.data[0].categoryList
|
2021-12-16 17:13:18 +08:00
|
|
|
}
|
2021-12-23 17:42:50 +08:00
|
|
|
this.getDetail()
|
2021-12-16 17:13:18 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
2021-12-16 16:04:21 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
uni-page-body {
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
.Detail {
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 0 32px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
.header-top {
|
|
|
|
|
padding: 40px 0 32px 0;
|
|
|
|
|
.titles {
|
|
|
|
|
font-size: 48px;
|
|
|
|
|
font-weight: 600;
|
2021-12-23 18:54:49 +08:00
|
|
|
width: 100%;
|
|
|
|
|
font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
|
|
color: #333;
|
|
|
|
|
line-height: 66px;
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
margin-bottom: 16px;
|
2021-12-16 16:04:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.titles-bottom {
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
.to-left {
|
|
|
|
|
margin-left: 32px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.header-middle {
|
2021-12-23 18:54:49 +08:00
|
|
|
padding: 64px 0 48px 0;
|
2021-12-16 16:04:21 +08:00
|
|
|
.contsnts {
|
|
|
|
|
font-size: 36px;
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
}
|
|
|
|
|
img {
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
width: 686px;
|
|
|
|
|
height: 486px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-23 15:09:25 +08:00
|
|
|
|
|
|
|
|
.img-list{
|
|
|
|
|
img{
|
|
|
|
|
width: 204px;
|
|
|
|
|
height: 204px;
|
|
|
|
|
margin: 0 8px 8px 0;
|
|
|
|
|
}
|
2021-12-23 18:54:49 +08:00
|
|
|
.title{
|
|
|
|
|
width: 100%;
|
|
|
|
|
line-height: 112px;
|
|
|
|
|
background: #FFF;
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flex {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.left {
|
|
|
|
|
.garydiv {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
background: #eeeeee;
|
|
|
|
|
border-radius: 24px;
|
|
|
|
|
padding: 4px 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.times {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.type{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
line-height: 48px;
|
|
|
|
|
background: #EEE;
|
|
|
|
|
border-radius: 24px;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #999;
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #999;
|
|
|
|
|
img{
|
|
|
|
|
width: 32px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
.font {
|
|
|
|
|
color: #4181ff;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-23 15:09:25 +08:00
|
|
|
}
|
2021-12-24 14:48:06 +08:00
|
|
|
|
|
|
|
|
::v-deep uni-video{
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2021-12-16 16:04:21 +08:00
|
|
|
}
|
|
|
|
|
</style>
|