|
|
@ -3,7 +3,7 @@ |
|
|
<lf-nav :spreadOut="true" :showIcon="true" title="详情"></lf-nav> |
|
|
<lf-nav :spreadOut="true" :showIcon="true" title="详情"></lf-nav> |
|
|
<view class="lf-p-32"> |
|
|
<view class="lf-p-32"> |
|
|
<view class="lf-flex"> |
|
|
<view class="lf-flex"> |
|
|
<view class="tag-father"> |
|
|
|
|
|
|
|
|
<view class="tag-father" @click="$url('/pages/user/my/my?user_id='+discover_details.user_id)"> |
|
|
<image :src="discover_details.user.avatar" mode="aspectFill" class="head-img"></image> |
|
|
<image :src="discover_details.user.avatar" mode="aspectFill" class="head-img"></image> |
|
|
<view class="head-tag">V</view> |
|
|
<view class="head-tag">V</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -40,10 +40,10 @@ |
|
|
<self-line/> |
|
|
<self-line/> |
|
|
<!-- 评论 --> |
|
|
<!-- 评论 --> |
|
|
<view class="comment" v-if="commentList.length != 0"> |
|
|
<view class="comment" v-if="commentList.length != 0"> |
|
|
<view class="lf-color-555 lf-font-24">共 {{commentList.total}}条评论</view> |
|
|
|
|
|
|
|
|
<view class="lf-color-555 lf-font-24">共 {{discover_details.comments_count}}条评论</view> |
|
|
<!-- 评论开始 --> |
|
|
<!-- 评论开始 --> |
|
|
<view v-for="(commentitem,commentindex) of commentList" :key="commentindex"> |
|
|
<view v-for="(commentitem,commentindex) of commentList" :key="commentindex"> |
|
|
<view class="lf-m-t-20" @click="applyComment(commentitem.user.id,commentitem.id)"> |
|
|
|
|
|
|
|
|
<view class="lf-m-t-20" @click="applySub(commentitem.user.id,commentitem.id)"> |
|
|
<view class="lf-flex"> |
|
|
<view class="lf-flex"> |
|
|
<view> |
|
|
<view> |
|
|
<image class="comment-img" :src="commentitem.user.avatar" mode="aspectFill"></image> |
|
|
<image class="comment-img" :src="commentitem.user.avatar" mode="aspectFill"></image> |
|
|
@ -104,7 +104,7 @@ |
|
|
<input class="rom-search" type="text" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" /> |
|
|
<input class="rom-search" type="text" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="lf-row-center"> |
|
|
<view class="lf-row-center"> |
|
|
<view class="lf-row-center lf-m-r-35" @click="addLike(discover_details.id)"> |
|
|
|
|
|
|
|
|
<view class="lf-row-center lf-m-r-35" @click.stop="addLike(discover_details.id)"> |
|
|
<text class="lf-iconfont icon-xihuanlike lf-color-price" v-if="discover_details.is_like"></text> |
|
|
<text class="lf-iconfont icon-xihuanlike lf-color-price" v-if="discover_details.is_like"></text> |
|
|
<text class="lf-iconfont icon-xihuan" v-else></text> |
|
|
<text class="lf-iconfont icon-xihuan" v-else></text> |
|
|
<text class="lf-font-24 lf-color-777 lf-m-l-10">{{discover_details.likes_count}}</text> |
|
|
<text class="lf-font-24 lf-color-777 lf-m-l-10">{{discover_details.likes_count}}</text> |
|
|
@ -195,7 +195,7 @@ |
|
|
api: 'api/discover/comment/list', |
|
|
api: 'api/discover/comment/list', |
|
|
data: { |
|
|
data: { |
|
|
discover_id: this.discover_id, |
|
|
discover_id: this.discover_id, |
|
|
user_id: 6 |
|
|
|
|
|
|
|
|
user_id: this.$cookieStorage.get('user_info').id |
|
|
}, |
|
|
}, |
|
|
header: { |
|
|
header: { |
|
|
Authorization: this.$cookieStorage.get('user_token') |
|
|
Authorization: this.$cookieStorage.get('user_token') |
|
|
@ -248,6 +248,7 @@ |
|
|
this.$msg('回复成功').then(() => { |
|
|
this.$msg('回复成功').then(() => { |
|
|
console.log('更新回复列表'); |
|
|
console.log('更新回复列表'); |
|
|
this.comment = ''; |
|
|
this.comment = ''; |
|
|
|
|
|
this.ifApply = false; |
|
|
this.getCommentList(); |
|
|
this.getCommentList(); |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
@ -331,6 +332,7 @@ |
|
|
if (res.data.code == 200) { |
|
|
if (res.data.code == 200) { |
|
|
if (res.data.status) { |
|
|
if (res.data.status) { |
|
|
this.getCommentList(); |
|
|
this.getCommentList(); |
|
|
|
|
|
this.getDiscoverDetails(); |
|
|
} else { |
|
|
} else { |
|
|
wx.showModal({ |
|
|
wx.showModal({ |
|
|
content: res.data.message || '请下拉页面刷新重试', |
|
|
content: res.data.message || '请下拉页面刷新重试', |
|
|
@ -359,7 +361,7 @@ |
|
|
api: 'api/discover/detail', |
|
|
api: 'api/discover/detail', |
|
|
data: { |
|
|
data: { |
|
|
id: this.discover_id, |
|
|
id: this.discover_id, |
|
|
user_id: 6 |
|
|
|
|
|
|
|
|
user_id: this.$cookieStorage.get('user_info').id |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
|