This commit is contained in:
zhaofang
2022-11-10 14:19:03 +08:00
parent 2aa0baf1eb
commit dae692d7fa

View File

@@ -23,9 +23,8 @@
<view class="my-qa-index" v-for="put in putList.list" :key="put.id" @click="toDetail(put)">
<view class="artical-box-top">
<view style="" class="artical-tit">
<text class="qa-basic qa-solve" v-if="put.isResolve">[已解决]</text>
<text class="qa-basic" v-else >[待解决]</text>
<!-- <text class="qa-basic qa-unSolve">待解决</text> -->
<text class="qa-basic qa-solve" v-if="put.isResolve">已解决</text>
<text class="qa-basic qa-unSolve" v-else >待解决</text>
{{put.title}}
</view>
</view>
@@ -78,8 +77,10 @@
<view class="articl-box-cont">
<view>
<text style="color: #333333;font-weight: 600;font-size: 28upx;">我的回答</text>
<text style="color: #818181;font-size: 28upx;">{{ item.answercontent }}</text>
<text style="color: #818181;font-size: 28upx;">{{displayAll(item)}}</text>
<text style="color: #387DF7;" v-if="item.answercontent.length>60" @click.stop="changeIsAll(item)">
{{item.isAll?'收起':'展开'}}
</text>
</view>
</view>
<view class="articl-box-time">
@@ -128,7 +129,6 @@
export default {
computed: {
...mapGetters(['userInfo']),
},
data() {
return {
@@ -139,9 +139,9 @@
inputValue: '',
uCoinRecord:[],
uinfo: {
uCurrency: 0 ,// 用户累计U币
timestamp:'',
},
uCurrency: 0 ,// 用户累计U币
timestamp:'',
},
putList:{
pageIndex:1,
pageSize:10,
@@ -187,6 +187,19 @@
this.findAnData(true);
},
methods:{
//展示全部
displayAll(item) {
// let content = '';
// content = item.content.replace(/(\n){2,}/,'<br>');
// item.content = content;
if(!item.isAll && item.answercontent && item.answercontent.length > 60) {
return item.answercontent.slice(0, 60) + "...";
}
return item.answercontent;
},
changeIsAll(item) {
item.isAll=!item.isAll;
},
publishReply() {
const $this=this;
let {answerid,content,sysCreateAid,favorites,praises,shares}=this.reply;
@@ -294,6 +307,7 @@
this.answerList.count = res.result.count;
let userIds = [];
res.result.list.forEach(item => {
item.isAll=false;
item.avatar='';
item.name='',
item.orgInfo='';
@@ -504,10 +518,10 @@
color: #454545;
margin-top: 30upx;
// margin: 0upx 10upx;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;-webkit-line-clamp: 2;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-box-orient: vertical;
// display: -webkit-box;-webkit-line-clamp: 2;
word-break:break-all;
}
.articl-box-time {