Commit 400e0335 authored by zhangyanni's avatar zhangyanni

提交

parent bc59627b
......@@ -311,7 +311,7 @@
<div class="imageListInfo"
:style="{borderBottomColor:item.contentUrlList?'#e8eaf3':'transparent'}"
v-if="item.contentUrlList">
<div class="thumbs" @click="handleVuePreview($event)" v-if="item.contentUrlList&&item.contentUrlList.length>=2">
<div class="thumbs" v-if="item.contentUrlList&&item.contentUrlList.length>=2">
<vue-preview :slides="item.contentUrlList"></vue-preview>
</div>
<div class="imgOne" v-if="item.contentUrlList&&item.contentUrlList.length==1">
......@@ -506,10 +506,6 @@
},
methods: {
handleVuePreview(e){
console.log(e)
},
handleClickHtml(e, data) {
if (e.toElement.dataset.id) {
var proData = e.target.innerText;
......@@ -777,27 +773,8 @@
api.getTopicDiscussListAxios(params).then((res) => {
if (res.code == 0) {
res.result.records.forEach((item, index) => {
item.isShowAll = item.discussContent.length > 128 ? true : false;
item.resultDiscussContent = item.discussContent;
item.resultDiscussContent = this.publicFun.getTitlewith(item.discussContent, item.projectList);
if (this.hotCommentData.length == 0 && this.topCommentData.length == 0) {
if ((this.page == 1 && index == 2) || this.page == 1 && res.result.records.length <= 2) {
let objVal = {
id: 0,
isShowAll: false,
discussContent: "",
operateVisible: false,
sameTopicList: this.sameTopicList,
discussUrl: ""
};
if (res.result.records.length <= 2) {
res.result.records.splice(res.result.records.length, 0, objVal)
} else {
res.result.records.splice(2, 0, objVal)
}
}
}
item.operateVisible = false;
if (item.discussUrl) {
// item.contentUrlList = item.discussUrl.split(",");
......@@ -817,10 +794,31 @@
})
}
})
var arr = res.result.records;
arr.forEach((item,index)=>{
if (this.hotCommentData.length == 0 && this.topCommentData.length == 0) {
if ((this.page == 1 && index == 2) || this.page == 1 && res.result.records.length <= 2) {
let objVal = {
id: 0,
isShowAll: false,
discussContent: "",
operateVisible: false,
sameTopicList: this.sameTopicList,
discussUrl: ""
};
if (res.result.records.length <= 2) {
arr.splice(res.result.records.length, 0, objVal)
} else {
arr.splice(2, 0, objVal)
}
}
}
})
if (size) {
this.tableData = this.tableData.concat(res.result.records);
this.tableData = this.tableData.concat(arr);
} else {
this.tableData = res.result.records;
this.tableData = arr;
}
this.total = res.result.totalStr;
this.totalPage = res.result.pages;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment