|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="question-wrap" :style="isShowComment ? 'height: 100vh;overflow:hidden' : ''">
|
|
|
+ <!-- :style="isShowComment ? 'height: 100vh;overflow:hidden' : ''" -->
|
|
|
<template v-if="hasAuth">
|
|
|
<view class="question-top" :class="{'noAuth':!(isUserResearcher||userInfo.status&&userAuth)}">
|
|
|
<view @click="showPopup" v-if="isUserResearcher||userInfo.status&&userAuth"
|
|
@@ -120,12 +121,12 @@
|
|
|
<view class="commment-top">
|
|
|
<text class="title">{{comment_obj.title}} {{comment_obj.total}}</text>
|
|
|
<view class="comment-top-right">
|
|
|
- <text :class="select_comment_type === 1 && 'act'" @click="changeCommentTypeHandle">精选</text>
|
|
|
- <text :class="select_comment_type === 2 && 'act'" @click="changeCommentTypeHandle">我的</text>
|
|
|
+ <text :class="select_comment_type === 1 && 'act'" @click="changeCommentTypeHandle(1)">精选</text>
|
|
|
+ <text :class="select_comment_type === 2 && 'act'" @click="changeCommentTypeHandle(2)">我的</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="comment-list-cont" v-if="comment_obj.total">
|
|
|
- <view class="comment-list-item" v-for="(item,index) in commentList" :key="item.community_question_comment_id">
|
|
|
+ <view class="comment-list-item" v-for="(item,index) in commentList" :key="item.community_question_comment_id">
|
|
|
<view class="comment">
|
|
|
<text style="color: #333;">{{item.user_name}}:</text>
|
|
|
{{item.content}}
|
|
@@ -310,8 +311,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
/* 切换评论类型*/
|
|
|
- changeCommentTypeHandle() {
|
|
|
- this.select_comment_type = this.select_comment_type === 1 ? 2 : 1;
|
|
|
+ changeCommentTypeHandle(type) {
|
|
|
+ if(type === this.select_comment_type) return
|
|
|
+ this.select_comment_type = type;
|
|
|
this.getComment();
|
|
|
},
|
|
|
|
|
@@ -340,7 +342,6 @@ export default {
|
|
|
confirmColor: "#EE3636",
|
|
|
cancelColor: '#333',
|
|
|
success: async(res) => {
|
|
|
- // res.cancel && return
|
|
|
if( res.cancel) return
|
|
|
const { code } = await apiDelComment({ community_question_comment_id });
|
|
|
if( code !== 200 ) return
|
|
@@ -594,7 +595,7 @@ page {
|
|
|
.comment-list-item {
|
|
|
margin: 30rpx 0;
|
|
|
.comment { color: #666; }
|
|
|
- .del { color: #D80000;margin-top: 10rpx; }
|
|
|
+ .del { color: #D80000;margin-top: 10rpx;width: 200rpx; }
|
|
|
}
|
|
|
}
|
|
|
.write-wrap {
|