mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 19:36:47 +08:00
提交
This commit is contained in:
@@ -23,9 +23,8 @@
|
|||||||
<view class="my-qa-index" v-for="put in putList.list" :key="put.id" @click="toDetail(put)">
|
<view class="my-qa-index" v-for="put in putList.list" :key="put.id" @click="toDetail(put)">
|
||||||
<view class="artical-box-top">
|
<view class="artical-box-top">
|
||||||
<view style="" class="artical-tit">
|
<view style="" class="artical-tit">
|
||||||
<text class="qa-basic qa-solve" v-if="put.isResolve">[已解决]</text>
|
<text class="qa-basic qa-solve" v-if="put.isResolve">【已解决】</text>
|
||||||
<text class="qa-basic" v-else >[待解决]</text>
|
<text class="qa-basic qa-unSolve" v-else >【待解决】</text>
|
||||||
<!-- <text class="qa-basic qa-unSolve">【待解决】</text> -->
|
|
||||||
{{put.title}}
|
{{put.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -78,8 +77,10 @@
|
|||||||
<view class="articl-box-cont">
|
<view class="articl-box-cont">
|
||||||
<view>
|
<view>
|
||||||
<text style="color: #333333;font-weight: 600;font-size: 28upx;">我的回答:</text>
|
<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>
|
</view>
|
||||||
<view class="articl-box-time">
|
<view class="articl-box-time">
|
||||||
@@ -128,7 +129,6 @@
|
|||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -139,9 +139,9 @@
|
|||||||
inputValue: '',
|
inputValue: '',
|
||||||
uCoinRecord:[],
|
uCoinRecord:[],
|
||||||
uinfo: {
|
uinfo: {
|
||||||
uCurrency: 0 ,// 用户累计U币
|
uCurrency: 0 ,// 用户累计U币
|
||||||
timestamp:'',
|
timestamp:'',
|
||||||
},
|
},
|
||||||
putList:{
|
putList:{
|
||||||
pageIndex:1,
|
pageIndex:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
@@ -187,6 +187,19 @@
|
|||||||
this.findAnData(true);
|
this.findAnData(true);
|
||||||
},
|
},
|
||||||
methods:{
|
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() {
|
publishReply() {
|
||||||
const $this=this;
|
const $this=this;
|
||||||
let {answerid,content,sysCreateAid,favorites,praises,shares}=this.reply;
|
let {answerid,content,sysCreateAid,favorites,praises,shares}=this.reply;
|
||||||
@@ -294,6 +307,7 @@
|
|||||||
this.answerList.count = res.result.count;
|
this.answerList.count = res.result.count;
|
||||||
let userIds = [];
|
let userIds = [];
|
||||||
res.result.list.forEach(item => {
|
res.result.list.forEach(item => {
|
||||||
|
item.isAll=false;
|
||||||
item.avatar='';
|
item.avatar='';
|
||||||
item.name='',
|
item.name='',
|
||||||
item.orgInfo='';
|
item.orgInfo='';
|
||||||
@@ -504,10 +518,10 @@
|
|||||||
color: #454545;
|
color: #454545;
|
||||||
margin-top: 30upx;
|
margin-top: 30upx;
|
||||||
// margin: 0upx 10upx;
|
// margin: 0upx 10upx;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
-webkit-box-orient: vertical;
|
// -webkit-box-orient: vertical;
|
||||||
display: -webkit-box;-webkit-line-clamp: 2;
|
// display: -webkit-box;-webkit-line-clamp: 2;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
}
|
}
|
||||||
.articl-box-time {
|
.articl-box-time {
|
||||||
|
|||||||
Reference in New Issue
Block a user