|
@@ -1,11 +1,12 @@
|
|
|
<template>
|
|
|
<view class="article">
|
|
|
<image class="header-bg" :src="url" />
|
|
|
- <div class="content">
|
|
|
+ <view class="content">
|
|
|
+ <h3 style="text-align:center; margin-bottom: 20rpx" >{{ title }}</h3>
|
|
|
<rich-text :nodes="content" />
|
|
|
- </div>
|
|
|
- <div class="list">
|
|
|
- <view class="title">全部评论</view>
|
|
|
+ </view>
|
|
|
+ <view class="list">
|
|
|
+ <view class="title" v-if="tableData.length > 0">全部评论</view>
|
|
|
<view v-for="item in tableData" :key="item.commentId" style="margin-bottom: 48rpx">
|
|
|
<view flex between>
|
|
|
<view flex center>
|
|
@@ -43,7 +44,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -59,6 +60,8 @@ export default {
|
|
|
},
|
|
|
// 背景图
|
|
|
url: '',
|
|
|
+ // 标题
|
|
|
+ title: '',
|
|
|
// 内容
|
|
|
content: '',
|
|
|
// 列表
|
|
@@ -77,6 +80,7 @@ export default {
|
|
|
}).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.url = res.data.data.pic
|
|
|
+ this.title = res.data.data.title
|
|
|
this.content = res.data.data.content
|
|
|
}
|
|
|
})
|