tijiao
This commit is contained in:
@@ -130,12 +130,11 @@
|
||||
</view>
|
||||
<view style="color: #525156">{{ articleInfo.readCount }}人阅读</view>
|
||||
</view>
|
||||
|
||||
|
||||
<rich-text
|
||||
:nodes="articleInfo.content"
|
||||
style="height: auto; margin-bottom: 260rpx; color: #4b4b4b"
|
||||
/>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 显示聊天记录 -->
|
||||
@@ -167,15 +166,19 @@
|
||||
</view>
|
||||
<text style="letter-spacing: 4rpx">点赞</text>
|
||||
</view>
|
||||
<view class="footer_item" style="color: #9a9a9a" @click.stop="onHandleClickBuy">
|
||||
<view class="footer_item_icon"
|
||||
<view
|
||||
class="footer_item"
|
||||
style="color: #9a9a9a"
|
||||
@click.stop="onHandleClickOpenComment"
|
||||
>
|
||||
<view class="footer_item_icon"
|
||||
><uni-icons
|
||||
type="chat-filled"
|
||||
size="30"
|
||||
style="color: #9a9a9a"
|
||||
></uni-icons>
|
||||
<view class="footer_item_count" style="text-align: center">{{
|
||||
articleInfo.likeCount ? articleInfo.likeCount : "0"
|
||||
articleInfo.commentCount ? articleInfo.commentCount : "0"
|
||||
}}</view>
|
||||
</view>
|
||||
<text style="letter-spacing: 4rpx">评论</text>
|
||||
@@ -195,27 +198,34 @@
|
||||
</view>
|
||||
|
||||
<!-- <z-navigation></z-navigation> -->
|
||||
<u-popup :show="orderModalShow" mode="bottom" :round="8">
|
||||
<view class="orderModalShow popup_box">
|
||||
<view style="text-align: center;">全部{{commentData.length?commentData.length:' 0'}} 条评论</view>
|
||||
<u-popup
|
||||
:show="orderModalShow"
|
||||
mode="bottom"
|
||||
:round="8"
|
||||
style="background-color: #fff"
|
||||
>
|
||||
<view class="orderModalShow popup_box">
|
||||
<view style="text-align: center"
|
||||
>全部 {{ articleInfo.commentCount }} 条评论</view
|
||||
>
|
||||
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="closeOrderModalShow"
|
||||
style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"
|
||||
></u-icon>
|
||||
<hb-comment style="margin-top: 40rpx;height: 60vh"
|
||||
<u-icon
|
||||
name="close"
|
||||
color="#333"
|
||||
size="18"
|
||||
@click="closeOrderModalShow"
|
||||
style="
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
"
|
||||
></u-icon>
|
||||
<hb-comment
|
||||
style="margin-top: 40rpx; height: 60vh;overflow: auto;padding-bottom: 60rpx;"
|
||||
:user="articleInfo.taihuTalent"
|
||||
|
||||
ref="hbComment"
|
||||
@add="add"
|
||||
@add="sendComment"
|
||||
@del="del"
|
||||
@like="like"
|
||||
@focusOn="focusOn"
|
||||
@@ -223,8 +233,8 @@
|
||||
:cmData="commentData"
|
||||
v-if="commentData"
|
||||
></hb-comment>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -242,8 +252,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderModalShow:false,
|
||||
commentData:[],
|
||||
orderModalShow: false,
|
||||
commentData: [],
|
||||
articleInfo: {},
|
||||
editorOption: {},
|
||||
options: {},
|
||||
@@ -384,16 +394,13 @@ export default {
|
||||
}, 800);
|
||||
},
|
||||
methods: {
|
||||
onHandleClickBuy() {
|
||||
|
||||
console.log('111 at line 384:', 111)
|
||||
this.orderModalShow = true;
|
||||
|
||||
},
|
||||
closeOrderModalShow() {
|
||||
|
||||
this.orderModalShow = false;
|
||||
},
|
||||
onHandleClickOpenComment() {
|
||||
console.log("111 at line 384:", 111);
|
||||
this.orderModalShow = true;
|
||||
},
|
||||
closeOrderModalShow() {
|
||||
this.orderModalShow = false;
|
||||
},
|
||||
saveContens(content) {
|
||||
console.log("content at line 322:", content);
|
||||
this.formData.message = content;
|
||||
@@ -526,29 +533,7 @@ export default {
|
||||
console.log(this.selectedItems);
|
||||
console.log(this.selectedId);
|
||||
},
|
||||
//基因模糊查询列表
|
||||
getGenes(name) {
|
||||
this.$http
|
||||
.request({
|
||||
url: "taihumed/precisionMedicine/getPrecisionMedicineGenes",
|
||||
method: "POST",
|
||||
data: { name: name },
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.genes && res.genes.length > 0) {
|
||||
this.searchResults = res.genes;
|
||||
this.searchResultStatus = true;
|
||||
} else {
|
||||
this.searchResults = "";
|
||||
this.searchResultStatus = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//勾选
|
||||
toggleCheck() {
|
||||
this.isChecked = !this.isChecked;
|
||||
@@ -597,7 +582,7 @@ export default {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//点击每个记录
|
||||
clickRecord(item, index) {
|
||||
//重新定义id
|
||||
@@ -686,7 +671,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
//创建对话 获取sessionId
|
||||
this.createChat();
|
||||
},
|
||||
//创建新对话
|
||||
createChat() {
|
||||
@@ -711,15 +695,15 @@ export default {
|
||||
});
|
||||
},
|
||||
//创建新对话
|
||||
createComment() {
|
||||
sendComment(comment,pid) {
|
||||
this.$http
|
||||
.request({
|
||||
url: "common/taihuTalentArticle/addArticleComment",
|
||||
method: "POST",
|
||||
data: {
|
||||
"pid":"", //第一条评论为0
|
||||
"articleId":"", //文章id
|
||||
"content":"" //内容
|
||||
pid: pid?pid:0, //第一条评论为0
|
||||
articleId: this.options.id, //文章id
|
||||
content: comment, //内容
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -728,28 +712,29 @@ export default {
|
||||
.then((res) => {
|
||||
console.log("res at line 713:", res);
|
||||
if (res.code == 0) {
|
||||
|
||||
} else {
|
||||
this.$commonJS.showToast("评论失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//交谈请求,获取回答
|
||||
getTree(data) {
|
||||
let result = [];
|
||||
let map = {};
|
||||
data.forEach(item => {
|
||||
let result = [];
|
||||
let map = {};
|
||||
data.forEach((item) => {
|
||||
map[item.id] = item;
|
||||
});
|
||||
data.forEach(item => {
|
||||
});
|
||||
data.forEach((item) => {
|
||||
let parent = map[item.parentId];
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
(parent.children || (parent.children = [])).push(item);
|
||||
} else {
|
||||
result.push(item);
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
});
|
||||
return result;
|
||||
},
|
||||
getMedicalDetail(fn) {
|
||||
//清空消息记录
|
||||
|
||||
@@ -771,15 +756,11 @@ export default {
|
||||
this.articleInfo = res.article;
|
||||
this.commentData = res.comments;
|
||||
|
||||
res={
|
||||
"readNumer": 193,
|
||||
"commentList": []
|
||||
}
|
||||
this.commentData = {
|
||||
"readNumer": res.readNumer,
|
||||
"commentSize": res.commentList.length,
|
||||
"comment": this.getTree(res.commentList)
|
||||
}
|
||||
|
||||
commentSize: res.commentCount,
|
||||
comment: this.getTree(this.commentData),
|
||||
};
|
||||
this.$forceUpdate();
|
||||
|
||||
// 滚动到最底部锚点
|
||||
@@ -1360,21 +1341,22 @@ h3 {
|
||||
font-size: 24rpx;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
} .orderModalShow {
|
||||
width: 100%;
|
||||
// max-height: 48vh;
|
||||
// padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.popup_box {
|
||||
padding: 20rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
.curriulum_title_box {
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 34rpx !important;
|
||||
}
|
||||
}
|
||||
.orderModalShow {
|
||||
width: 100%;
|
||||
// max-height: 48vh;
|
||||
// padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.popup_box {
|
||||
padding: 20rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
.curriulum_title_box {
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 34rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user