<template>
|
|
<view class="postDetail">
|
|
<navbar leftClick @leftClick="$utils.navigateBack" title="动态详情" />
|
|
|
|
<view class="swipe">
|
|
<uv-swiper :list="item.image &&
|
|
item.image.split(',')" indicator height="320rpx"></uv-swiper>
|
|
</view>
|
|
|
|
<view class="box">
|
|
|
|
<view class="title">
|
|
{{ item.title }}
|
|
</view>
|
|
|
|
<view class="createBy">
|
|
<view class="">
|
|
发布人:{{ item.userId }}
|
|
</view>
|
|
<view class="">
|
|
发布时间:{{ item.createTime }}
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="controls">
|
|
<contentControls />
|
|
</view>
|
|
|
|
|
|
<view class="content">
|
|
<uv-parse :content="item.content"></uv-parse>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import contentControls from '@/components/content/contentControls.vue'
|
|
export default {
|
|
components: {
|
|
contentControls
|
|
},
|
|
data() {
|
|
return {
|
|
list: [
|
|
],
|
|
item: {},
|
|
}
|
|
},
|
|
mounted() {
|
|
console.log("===")
|
|
this.getData(options.id)
|
|
},
|
|
onLoad(options) {
|
|
// this.$route.query的参数
|
|
console.log(options)
|
|
this.getData(options.id)
|
|
},
|
|
methods: {
|
|
getData(id) {
|
|
this.$api('indexGetTrendsDetail', {
|
|
id
|
|
}, res => {
|
|
if (res.code == 200) {
|
|
this.item = res.result
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.postDetail {
|
|
.box {
|
|
padding: 20rpx;
|
|
width: 100vw;
|
|
|
|
.title {
|
|
font-size: 30rpx;
|
|
font-weight: 600;
|
|
color: #000;
|
|
}
|
|
|
|
.createBy {
|
|
display: flex;
|
|
margin-top: auto;
|
|
margin-bottom: 10rpx;
|
|
font-size: 24rpx;
|
|
margin-top: 20rpx;
|
|
color: #555;
|
|
|
|
&>view {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding-right: 20rpx;
|
|
}
|
|
}
|
|
|
|
.controls {
|
|
margin-top: 30rpx;
|
|
}
|
|
|
|
.content {
|
|
margin-top: 30rpx;
|
|
color: #777;
|
|
}
|
|
}
|
|
}
|
|
</style>
|