|
@@ -49,7 +49,7 @@
|
|
|
<view class="title" v-else>{{item.Title}}</view>
|
|
|
</view>
|
|
|
<view v-show="loadTimeLine" class="loadTimeLine"></view>
|
|
|
- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
|
|
|
+ <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1&&tabAct_id===99999" />
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
@@ -91,14 +91,14 @@ export default {
|
|
|
totalPage: "",
|
|
|
toggleTabIndex: 0,
|
|
|
titleReport: "",
|
|
|
- timeLine:[],
|
|
|
+ timeLine:[],//时间线数据
|
|
|
mockTimeLine:[
|
|
|
{
|
|
|
date:'不重要',
|
|
|
Content:'<p>hello,world</p><p>hello,world</p><p>hello,world</p>'
|
|
|
},//第一项是为了获取当前手机下,三行是多少相对高度
|
|
|
],
|
|
|
- loadTimeLine:false
|
|
|
+ loadTimeLine:false,//时间线的遮罩
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -132,6 +132,7 @@ export default {
|
|
|
this.tabAct_id = item.CategoryId;
|
|
|
this.pageNum = 1;
|
|
|
this.timeLine=[]
|
|
|
+ this.totalPage=""
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0,
|
|
|
duration: 0,
|
|
@@ -174,8 +175,10 @@ export default {
|
|
|
list = list.map(item=>{
|
|
|
let temp = item
|
|
|
temp.date = item.PublishTime.split(" ")[0]
|
|
|
- temp.isExpand = true
|
|
|
- temp.isShowBtn = true
|
|
|
+ if(item.Content.length){
|
|
|
+ temp.isExpand = true
|
|
|
+ temp.isShowBtn = true
|
|
|
+ }
|
|
|
return temp
|
|
|
})
|
|
|
if(this.page_no===1){
|
|
@@ -190,6 +193,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.timeLine.unshift(this.mockTimeLine[0])
|
|
|
+ //在获取高度前把所有的晨会展开,收起的话无法获取正确高度
|
|
|
+ this.timeLine.forEach(item=>{
|
|
|
+ if(item.Content.length){
|
|
|
+ item.isExpand = true
|
|
|
+ item.isShowBtn = true
|
|
|
+ }
|
|
|
+ })
|
|
|
setTimeout(()=>{
|
|
|
this.getConentsHeight()
|
|
|
},300)
|
|
@@ -242,7 +252,7 @@ export default {
|
|
|
//展开收起晨会内容
|
|
|
handleExpand(item,index){
|
|
|
item.isExpand = !item.isExpand
|
|
|
- this.mockTimeLine.splice(index,1,item)
|
|
|
+ this.timeLine.splice(index,1,item)
|
|
|
},
|
|
|
//获取所有晨会内容的高度并决定是否显示展开收起按钮
|
|
|
getConentsHeight(){
|
|
@@ -253,6 +263,7 @@ export default {
|
|
|
const standardHeight = res[0][0].height
|
|
|
res[0].forEach(item=>{
|
|
|
let temp = this.timeLine[item.dataset.index]
|
|
|
+ //超过这个高度的,需要显示展开/收起按钮
|
|
|
if(item.height>standardHeight){
|
|
|
temp.isExpand = false
|
|
|
temp.isShowBtn = true
|