|
|
@ -18,6 +18,10 @@ Page({ |
|
|
|
dialogContent: "", |
|
|
|
dialogConfirmText: "", |
|
|
|
dialogCancelText: "", |
|
|
|
content: '', |
|
|
|
shortContent: '', |
|
|
|
isShowAll: true, // 是否显示全部内容
|
|
|
|
isShowButton: false, // 是否显示 展开-收起 按钮
|
|
|
|
}, |
|
|
|
onLoad: function (options) { |
|
|
|
this.setData({ |
|
|
@ -30,19 +34,31 @@ Page({ |
|
|
|
}) |
|
|
|
this.getAppTeamDetail() |
|
|
|
} |
|
|
|
let params = { |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 10, |
|
|
|
timestamp: getTimestamp(), |
|
|
|
actType: 0, |
|
|
|
qkdat: true, |
|
|
|
selectedTab: 'tab0', |
|
|
|
teamId: this.data.teamId |
|
|
|
if (this.data.selectTab == 'tab1') { |
|
|
|
this.setData({ |
|
|
|
list: [], |
|
|
|
}) |
|
|
|
this.getTeamVolunteerList() |
|
|
|
} else { |
|
|
|
let params = { |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 10, |
|
|
|
timestamp: getTimestamp(), |
|
|
|
actType: 0, |
|
|
|
qkdat: true, |
|
|
|
selectedTab: 'tab0', |
|
|
|
teamId: this.data.teamId |
|
|
|
} |
|
|
|
this.selectComponent("#state-0").getActivityList(params) |
|
|
|
} |
|
|
|
this.selectComponent("#state-0").getActivityList(params) |
|
|
|
}, |
|
|
|
onShow: function () { |
|
|
|
|
|
|
|
}, |
|
|
|
onUnload: function () { |
|
|
|
this.setData({ |
|
|
|
isShowAll: false |
|
|
|
}) |
|
|
|
}, |
|
|
|
onReachBottom: function () { |
|
|
|
this.setData({ |
|
|
@ -125,7 +141,7 @@ Page({ |
|
|
|
pageIndex: 1 |
|
|
|
}) |
|
|
|
|
|
|
|
if (e.currentTarget.dataset.tab == "tab1") { |
|
|
|
if (e.currentTarget.dataset.tab == "tab2") { |
|
|
|
this.setData({ |
|
|
|
list: [], |
|
|
|
nodata: false |
|
|
@ -164,11 +180,29 @@ Page({ |
|
|
|
// 团队详情
|
|
|
|
getAppTeamDetail () { |
|
|
|
api.getAppTeamDetail({ id: this.data.teamId }).then(res => { |
|
|
|
let html = res.data.content.replace(/<\/?.+?>/g, '').replace(/[ ]/g, '') |
|
|
|
this.setData({ |
|
|
|
teamDetail: res.data |
|
|
|
teamDetail: res.data, |
|
|
|
content: html |
|
|
|
}, () => { |
|
|
|
let query = wx.createSelectorQuery().in(this) |
|
|
|
query.select('.top-text-desc').boundingClientRect() |
|
|
|
query.exec(res => { |
|
|
|
// console.log(res[0].height)
|
|
|
|
this.setData({ |
|
|
|
isShowButton: res[0].height > 70, |
|
|
|
shortContent: res[0].height > 70 ? this.data.content.substring(0, 62) : this.data.content, |
|
|
|
isShowAll: !this.data.isShowAll |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
showAll () { |
|
|
|
this.setData({ |
|
|
|
isShowAll: !this.data.isShowAll |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 团队成员列表
|
|
|
|
|
|
|
|
// 获取团队列表
|
|
|
|