mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 18:36:47 +08:00
提交
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
</view>
|
||||
<view class="comment-body">
|
||||
<view class="comment-content" style="word-break: break-all;white-space: pre-wrap;">
|
||||
{{ displayAll(row) }}
|
||||
<text v-html="displayAll(row)"></text>
|
||||
<text style="color: #00aaff; white-space: nowrap;" v-if="row.content.length>minTextLen" @click="changeIsAll(row)">{{row.isAll?' 收起':' 全文'}}</text>
|
||||
</view>
|
||||
<view class="comment-btns">
|
||||
@@ -222,7 +222,6 @@ export default {
|
||||
...mapGetters(['userInfo']),
|
||||
placeholder(){
|
||||
let txt='请写下您的答案(200字以内),可以@提问者哦~';
|
||||
console.log(this.curItem.clevel,'this.curItem.clevel');
|
||||
if(this.curItem && this.curItem.id){
|
||||
//if(this.curItem.clevel>1){
|
||||
txt='请写下您的回复(200字以内)';
|
||||
@@ -381,6 +380,9 @@ export default {
|
||||
}
|
||||
},
|
||||
displayAll(item) {
|
||||
let content = '';
|
||||
content = item.content.replace(/(\n){2,}/,'<br>');
|
||||
item.content = content;
|
||||
if(!item.isAll && item.content.length > this.minTextLen) {
|
||||
return item.content.slice(0, this.minTextLen) + "...";
|
||||
}
|
||||
@@ -454,7 +456,7 @@ export default {
|
||||
// answercontent=this.answercontent.slice(this.detailData.sysCreateBy.length+1)
|
||||
// }
|
||||
else{
|
||||
answercontent=this.answercontent
|
||||
answercontent=this.answercontent.trim()
|
||||
}
|
||||
apiQa.saveAnswer({
|
||||
qid: this.questionId,
|
||||
@@ -554,7 +556,7 @@ export default {
|
||||
let d={
|
||||
id:this.curItem.id,
|
||||
sysCreateAid:this.curItem.sysCreateAid,
|
||||
content:this.curItem.content
|
||||
content:this.curItem.content.trim()
|
||||
}
|
||||
apiQa.updateAnswer(d).then(rs=>{
|
||||
if(rs.status==200){
|
||||
@@ -597,7 +599,7 @@ export default {
|
||||
let postData={
|
||||
replayAid: this.curItem.sysCreateAid,
|
||||
replayName: this.curItem.sysCreateBy,
|
||||
content: this.answercontent,
|
||||
content: this.answercontent.trim(),
|
||||
parentId: this.curItem.id,
|
||||
commentId: "",
|
||||
clevel: 2
|
||||
|
||||
Reference in New Issue
Block a user