diff --git a/app.json b/app.json index 333bfaf..2486bdc 100644 --- a/app.json +++ b/app.json @@ -67,7 +67,8 @@ "pages/allianceList/allianceList", "pages/volunteerTeam/volunteerTeam", "pages/teamIntroduction/teamIntroduction", - "pages/allianceDetail/allianceDetail" + "pages/allianceDetail/allianceDetail", + "pages/leaderboardDetail/leaderboardDetail" ] }, { diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml index 774d2c4..59fb01c 100644 --- a/pages/heartNew/heartNew.wxml +++ b/pages/heartNew/heartNew.wxml @@ -56,13 +56,13 @@ - + - + diff --git a/subpages/heart/pages/leaderboardDetail/leaderboardDetail.js b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.js new file mode 100644 index 0000000..0b397f3 --- /dev/null +++ b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.js @@ -0,0 +1,29 @@ +Page({ + data: { + noticeObj: '', + noticeObjContent: '' + }, + onLoad: function (options) { + if (options.name) { + wx.setNavigationBarTitle({ + title: options.name + }) + } + this.getVolunteerPioneerDetail() + }, + onUnload () { + wx.removeStorage({ + key: 'pioneerDetail', + success (res) { + console.log(res) + } + }) + }, + // 获取详情 + getVolunteerPioneerDetail() { + let html = wx.getStorageSync('pioneerDetail') + this.setData({ + noticeObjContent: html + }) + } +}) \ No newline at end of file diff --git a/subpages/heart/pages/leaderboardDetail/leaderboardDetail.json b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.json new file mode 100644 index 0000000..25dbf1f --- /dev/null +++ b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "", + "usingComponents": { + "parser": "../../../../components/parser/parser" + } +} \ No newline at end of file diff --git a/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxml b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxml new file mode 100644 index 0000000..f4f67c1 --- /dev/null +++ b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxml @@ -0,0 +1,3 @@ + + + diff --git a/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxss b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxss new file mode 100644 index 0000000..67a8f9a --- /dev/null +++ b/subpages/heart/pages/leaderboardDetail/leaderboardDetail.wxss @@ -0,0 +1,4 @@ +.alliance-detail { + padding: 20rpx; + box-sizing: border-box; +} \ No newline at end of file diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.js b/subpages/heart/pages/leaderboardNew/leaderboardNew.js index 16eca4d..f4a2d7e 100644 --- a/subpages/heart/pages/leaderboardNew/leaderboardNew.js +++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.js @@ -337,12 +337,14 @@ Page({ } }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - }, + // 跳转志愿先锋详情 + toLeaderboardDetail (e) { + wx.removeStorage('pioneerDetail') + wx.setStorageSync('pioneerDetail', e.currentTarget.dataset.html) + wx.navigateTo({ + url: `../leaderboardDetail/leaderboardDetail?name=${e.currentTarget.dataset.name}` + }) + }, //选择排序列 changeTag (e) { diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml index 8b81bd8..f9b5ade 100644 --- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml +++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml @@ -22,19 +22,19 @@ - + {{item.realName}} - {{filter.getHtmlContent(item.content)}} + - + {{item.realName}} - {{filter.getHtmlContent(item.content)}} + diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.js b/subpages/heart/pages/teamIntroduction/teamIntroduction.js index fa92c77..2d41d52 100644 --- a/subpages/heart/pages/teamIntroduction/teamIntroduction.js +++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.js @@ -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 + }) + }, // 团队成员列表 // 获取团队列表 diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml index 7c75af9..973b732 100644 --- a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml +++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxml @@ -10,25 +10,28 @@ - - - - - {{teamDetail.teamName}} - {{filter.getHtmlContent(teamDetail.content)}} - - + + + + + {{teamDetail.teamName}} + {{content}} + {{'<< 收起'}} + + {{shortContent}} + {{'... 展开'}} + - 团队活动 - 团队成员 + 团队成员 + 团队活动 - + diff --git a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss index fac9526..774bb68 100644 --- a/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss +++ b/subpages/heart/pages/teamIntroduction/teamIntroduction.wxss @@ -47,52 +47,47 @@ page { /* 自定义标题栏 end */ .top { width: 100%; -} -.top-bg { - width: 100%; - height: 280rpx; - box-sizing: border-box; - padding-top: 16rpx; + height: 320rpx; position: relative; } -.top-bg .top-bg-img { +.top .show-all { + /* background-image: linear-gradient(135deg, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.6) 75%, rgba(255, 255, 255, 1) 100%); */ + /* background-size: 100% 100%; */ + color: #9abded; +} +.top .top-bg-img { + position: absolute; width: 100%; height: 110%; - position: absolute; - top: 0; - left: 0; + z-index: -1; } -.top-bg .top-text { +.top-text { width: 100%; height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 10; display: flex; flex-direction: column; - align-items: center; - justify-content: center; - padding: 0 30rpx; - box-sizing: border-box; + align-items: flex-start; + justify-content: flex-start; + padding: 0 30rpx 20rpx; } -.top-bg .top-text .top-text-title { +.top-text .top-text-title { + width: 690rpx; font-size: 52rpx; color: #ffffff; - margin-bottom: 48rpx; + margin: 18rpx 0; + height: 136rpx; + display: flex; + align-items: center; + justify-content: center; } -.top-bg .top-text .top-text-desc { +.top-text .top-text-desc { + width: 690rpx; font-size: 30rpx; color: #ffffff; overflow: hidden; - text-overflow: ellipsis; - word-wrap:break-word; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - display: -webkit-box; + line-height: 40rpx; } -.top-bg .top-button { +.top-button { width: 140rpx; height: 60rpx; position: absolute; diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.js b/subpages/heart/pages/volunteerTeam/volunteerTeam.js index 0d995cb..0ad0cda 100644 --- a/subpages/heart/pages/volunteerTeam/volunteerTeam.js +++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.js @@ -14,9 +14,6 @@ Page({ typeCode: '', // 当前类别code }, onLoad: function (options) { - - }, - onShow: function () { this.setData({ pageIndex: 1, volunteerTeamList: [] @@ -37,6 +34,9 @@ Page({ } }) + }, + onShow: function () { + }, onReachBottom: function () { this.setData({