diff --git a/app.json b/app.json index 341c7ae..3aeb624 100644 --- a/app.json +++ b/app.json @@ -128,7 +128,11 @@ "pages/dropByPublish/dropByPublish", "pages/noticeNewDetail/noticeNewDetail", "pages/noticeNewList/noticeNewList", - "pages/scanCodeSignin/scanCodeSignin" + "pages/scanCodeSignin/scanCodeSignin", + "pages/allianceList/allianceList", + "pages/volunteerTeam/volunteerTeam", + "pages/teamIntroduction/teamIntroduction", + "pages/allianceDetail/allianceDetail" ] }, { diff --git a/pages/heartNew/heartNew.js b/pages/heartNew/heartNew.js index 55c64c7..878a3cf 100644 --- a/pages/heartNew/heartNew.js +++ b/pages/heartNew/heartNew.js @@ -539,6 +539,14 @@ Page({ wx.navigateTo({ url: `/subpages/heart/pages/dropByList/dropByList?title=${e.currentTarget.dataset.title}` }) + } else if (e.currentTarget.dataset.code == 'zyzqn_zytd') { + wx.navigateTo({ + url: `/subpages/heart/pages/volunteerTeam/volunteerTeam` + }) + } else if (e.currentTarget.dataset.code == 'zyzqn_gjlm') { + wx.navigateTo({ + url: `/subpages/heart/pages/allianceList/allianceList` + }) } else if (e.currentTarget.dataset.code == 'volunteer_sqfd') { this.myApply() } else if (e.currentTarget.dataset.code == 'shouye') { diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js index 5ad6266..1959cfb 100644 --- a/pages/indexNew/indexNew.js +++ b/pages/indexNew/indexNew.js @@ -85,6 +85,7 @@ Page({ jmjs: {}, sxjs: {}, shouye: {}, + cgmy: {}, tabRightList: [], //拼团购和顺道捎 voterConfigImgUrl: "" // 选民登记 }, @@ -316,6 +317,11 @@ Page({ this.setData({ shouye: this.data.shouye }) + } else if (item.categoryCode == 'mudule_cgmy') { + this.data.cgmy = { ...item } + this.setData({ + cgmy: this.data.cgmy + }) } }) }).catch(err => { @@ -511,6 +517,19 @@ Page({ }) }, //跳转到 页面 + toCgmy () { + //如果是 详情样式,直接跳转详情页面 + if (this.data.cgmy.moduleStyle == '4') { + wx.navigateTo({ + url: `/subpages/oneKeyService/pages/noticeDetail/noticeDetail?pid=${this.data.cgmy.pid}&bannerflag=${this.data.cgmy.bannerFlag}&categorycode=${this.data.cgmy.categoryCode}&modulestyle=${this.data.cgmy.moduleStyle}&categoryname=${this.data.cgmy.categoryName}` + }) + } else { + wx.navigateTo({ + url: `/subpages/oneKeyService/pages/moduleList/moduleList?pid=${this.data.cgmy.id}&bannerflag=${this.data.cgmy.bannerFlag}&categorycode=${this.data.cgmy.categoryCode}&modulestyle=${this.data.cgmy.moduleStyle}&categoryname=${this.data.cgmy.categoryName}` + }) + } + }, + //跳转到 页面 toShouye () { //如果是 详情样式,直接跳转详情页面 if (this.data.shouye.moduleStyle == '4') { diff --git a/pages/indexNew/indexNew.wxml b/pages/indexNew/indexNew.wxml index 86f3631..512c5c7 100644 --- a/pages/indexNew/indexNew.wxml +++ b/pages/indexNew/indexNew.wxml @@ -177,6 +177,7 @@ + diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index 9df5003..2297401 100644 --- a/pages/toRegister/toRegister.js +++ b/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ // } // }) let that = this - const versionNum = "1.7.23" + const versionNum = "1.7.24" api.getScanSwitch(versionNum).then(function (res) { console.log(res.data) let state = res.data ? res.data.scanFlag : '1' diff --git a/subpages/heart/images/join-team.png b/subpages/heart/images/join-team.png new file mode 100644 index 0000000..604f526 Binary files /dev/null and b/subpages/heart/images/join-team.png differ diff --git a/subpages/heart/images/team-top-bar.png b/subpages/heart/images/team-top-bar.png new file mode 100644 index 0000000..38530d3 Binary files /dev/null and b/subpages/heart/images/team-top-bar.png differ diff --git a/subpages/heart/images/team-top-bg.png b/subpages/heart/images/team-top-bg.png new file mode 100644 index 0000000..7c5d2a2 Binary files /dev/null and b/subpages/heart/images/team-top-bg.png differ diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.js b/subpages/heart/pages/allianceDetail/allianceDetail.js new file mode 100644 index 0000000..c62caaa --- /dev/null +++ b/subpages/heart/pages/allianceDetail/allianceDetail.js @@ -0,0 +1,23 @@ +const api = require("../../utils/api") +import util from "../../../../utils/util" +Page({ + data: { + noticeObj: '', + noticeObjContent: '' + }, + onLoad: function (options) { + if (options.id) { + this.getVolunteerUnionDetail(options.id) + } + }, + getVolunteerUnionDetail (id) { + api.getVolunteerUnionDetail({ id }).then(res => { + this.setData({ + noticeObj: res.data, + noticeObjContent: util.formatRichText(res.data.content) + }) + }).catch(err => { + console.log(err) + }) + } +}) \ No newline at end of file diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.json b/subpages/heart/pages/allianceDetail/allianceDetail.json new file mode 100644 index 0000000..1a0bac0 --- /dev/null +++ b/subpages/heart/pages/allianceDetail/allianceDetail.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "详情", + "usingComponents": { + "parser": "../../../../components/parser/parser" + } +} \ No newline at end of file diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.wxml b/subpages/heart/pages/allianceDetail/allianceDetail.wxml new file mode 100644 index 0000000..f4f67c1 --- /dev/null +++ b/subpages/heart/pages/allianceDetail/allianceDetail.wxml @@ -0,0 +1,3 @@ + + + diff --git a/subpages/heart/pages/allianceDetail/allianceDetail.wxss b/subpages/heart/pages/allianceDetail/allianceDetail.wxss new file mode 100644 index 0000000..67a8f9a --- /dev/null +++ b/subpages/heart/pages/allianceDetail/allianceDetail.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/allianceList/allianceList.js b/subpages/heart/pages/allianceList/allianceList.js new file mode 100644 index 0000000..6e3fe56 --- /dev/null +++ b/subpages/heart/pages/allianceList/allianceList.js @@ -0,0 +1,67 @@ +const api = require("../../utils/api") +Page({ + data: { + pageIndex: 1, + pageSize: 10, + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + allianceList: [], // 联盟列表 + }, + onLoad: function (options) { + this.setData({ + pageIndex: 1, + dropbylist: [] + }) + this.getVolunteerUnionList() + }, + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === "loading") { + this.setData({ + pageIndex: this.data.pageIndex + 1 + }) + this.getVolunteerUnionList() + } + }, + // 前往联盟详情 + toAllianceDetail (e) { + let id = e.currentTarget.dataset.id + wx.navigateTo({ + url: `../allianceDetail/allianceDetail?id=${id}` + }) + }, + // + getVolunteerUnionList () { + const para = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize + } + api.getVolunteerUnionList(para).then(res => { + console.log(res) + this.setData({ + allianceList: [...this.data.allianceList,...res.data], + loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', + loadMoreVisible: res.data.length === this.data.pageSize ? false : true, + nodata: false, + }) + if (this.data.allianceList.length == 0) { + this.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + this.setData({ + allianceList: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + }, +}) \ No newline at end of file diff --git a/subpages/heart/pages/allianceList/allianceList.json b/subpages/heart/pages/allianceList/allianceList.json new file mode 100644 index 0000000..4c2bf0a --- /dev/null +++ b/subpages/heart/pages/allianceList/allianceList.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "共建联盟", + "usingComponents": { + "load-more": "/components/loadMore/loadMore", + "no-data": "/components/nodata/nodata" + } +} \ No newline at end of file diff --git a/subpages/heart/pages/allianceList/allianceList.wxml b/subpages/heart/pages/allianceList/allianceList.wxml new file mode 100644 index 0000000..cdf8679 --- /dev/null +++ b/subpages/heart/pages/allianceList/allianceList.wxml @@ -0,0 +1,13 @@ + + + + {{item.unionName}} + + + + + + + + + \ No newline at end of file diff --git a/subpages/heart/pages/allianceList/allianceList.wxss b/subpages/heart/pages/allianceList/allianceList.wxss new file mode 100644 index 0000000..95c4eab --- /dev/null +++ b/subpages/heart/pages/allianceList/allianceList.wxss @@ -0,0 +1,37 @@ +page { + background-color: #f7f7f7; +} +.alliance-list { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: #fff; + margin-top: 20rpx; +} +.alliance-list .alliance-item { + width: 690rpx; + height: 110rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.alliance-list .alliance-item .alliance-title { + width: 650rpx; + font-size: 34rpx; + color: #333333; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +.alliance-list .alliance-item .alliance-icon { + width: 22rpx; + height: 22rpx; +} +.alliance-list .list-line { + width: 690rpx; + height: 1px; + background-color: #eeeeee; + border-radius: 1px; + opacity: 0.5; +} \ No newline at end of file diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.js b/subpages/heart/pages/leaderboardNew/leaderboardNew.js index 5587bf6..56efd5c 100755 --- a/subpages/heart/pages/leaderboardNew/leaderboardNew.js +++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.js @@ -62,7 +62,8 @@ Page({ id: '3', label: '公益积分记录' } - ] + ], + pioneerList: [] }, // tab 切换 onTabChange (e) { @@ -71,12 +72,18 @@ Page({ pageNo: 1 }) - if (e.currentTarget.dataset.tab == "tab2") { + if (e.currentTarget.dataset.tab == "tab3") { this.setData({ jilu: false, signedList: [] }) this.getSignedList() + } else if (e.currentTarget.dataset.tab == 'tab2') { + this.setData({ + jilu: true, + pioneerList: [] + }) + this.getVolunteerPioneerList() } else { this.setData({ jilu: true, @@ -156,12 +163,32 @@ Page({ }) }, + // 获取志愿先锋 列表 + getVolunteerPioneerList() { + let params = { + pageIndex: this.data.pageNo, + pageSize: this.data.pageSize + } + api.getVolunteerPioneerList(params).then(res => { + this.setData({ + pioneerList: [ ...this.data.pioneerList, ...res.data ], + loadMoreType: res.data.length === 10 ? "loading" : "none", + preloadVisible: false + }) + }).catch(() => { + this.setData({ + pioneerList: [], + loadMoreType: "none", + preloadVisible: false + }) + }) + }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - if(this.data.selectTab == "tab2"){ + if(this.data.selectTab == "tab3"){ this.pulldownRefresh() } if (!app.globalData.previewImage) { @@ -222,10 +249,12 @@ Page({ this.setData({ pageNo: this.data.pageNo + 1 }) - if(this.data.selectTab == "tab2"){ + if(this.data.selectTab == "tab3") { this.getSignedList() - } else { + } else if(this.data.selectTab == 'tab1') { this.loadLoveRanking() + } else if(this.data.selectTab == 'tab2') { + this.getVolunteerPioneerList() } } }, diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml index fa4d3a1..c68d6bb 100755 --- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml +++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml @@ -1,3 +1,4 @@ + - + {{tagList[tagIndex].tagName}} @@ -100,13 +99,28 @@ 选择部门 - {{deptList[deptIndex].deptName}} + --> + 格言 @@ -118,7 +132,21 @@ - + + + + + 已加入团队 + + + + + + {{item}} + + + + diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.js b/subpages/heart/pages/volunteerTeam/volunteerTeam.js new file mode 100644 index 0000000..d7fc74c --- /dev/null +++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.js @@ -0,0 +1,142 @@ +const api = require('../../utils/api') +const typePageSize = 99 +const typePageIndex = 1 +Page({ + data: { + pageIndex: 1, + pageSize: 10, + nodata: false, + loadMoreType: 'none', + loadMoreVisible: false, + selectBarLeft: 0, + teamCategoryList: [], + volunteerTeamList: [], + typeCode: '', // 当前类别code + }, + onLoad: function (options) { + + }, + onShow: function () { + this.setData({ + pageIndex: 1, + volunteerTeamList: [] + }) + const _this = this + const query = wx.createSelectorQuery().in(this) + this.getTeamTypeList().then(getType => { + if (getType) { + query.select('#item1').boundingClientRect() + query.exec(function(res){ + _this.setData({ + selectBarLeft: res[0].width/2 + }) + console.log(_this.data.selectBarLeft) + }) + this.getAppTeamListByType() + } else { + + } + }) + }, + onReachBottom: function () { + this.setData({ + loadMoreVisible: true + }) + if (this.data.loadMoreType === "loading") { + this.setData({ + pageIndex: this.data.pageIndex + 1 + }) + this.getAppTeamListByType() + } + }, + // 前往团队介绍 + toTeamDetail (e) { + let id = e.currentTarget.dataset.id + wx.navigateTo({ + url: `../teamIntroduction/teamIntroduction?id=${id}` + }) + }, + // 分类导航切换 + onChangeClassifyTab (e) { + let code = e.currentTarget.dataset.code + this.data.teamCategoryList.forEach((item, index) => { + if (index === e.currentTarget.dataset.tab) { + item.select = true + const _this = this + const query = wx.createSelectorQuery().in(this) + query.select(`#item${index + 1}`).boundingClientRect() + query.exec(function(res){ + _this.setData({ + selectBarLeft: res[0].width/2 + }) + console.log(_this.data.selectBarLeft) + }) + } else { + item.select = false + } + }) + this.setData({ + teamCategoryList: this.data.teamCategoryList, + typeCode: code, + pageIndex: 1, + volunteerTeamList: [] + }, () => { + this.getAppTeamListByType() + }) + }, + // 获取团队类别列表 + getTeamTypeList () { + let param = { + pageSize : typePageSize, + pageIndex : typePageIndex, + teamId: '' + } + return new Promise ((resolve, reject) => { + api.getTeamTypeList(param).then(res => { + if (res.code == 0 && res.msg == 'success') { + res.data[0].select = true + this.setData({ + teamCategoryList: res.data, + typeCode: res.data[0].typeCode + }) + resolve(true) + } + reject(false) + }).catch(err => { + reject(false) + }) + }) + }, + // 获取团队列表 + getAppTeamListByType () { + const para = { + pageIndex: this.data.pageIndex, + pageSize: this.data.pageSize, + typeCode: this.data.typeCode + } + api.getAppTeamListByType(para).then(res => { + console.log(res) + this.setData({ + volunteerTeamList: [...this.data.volunteerTeamList,...res.data], + loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', + loadMoreVisible: res.data.length === this.data.pageSize ? false : true, + nodata: false, + }) + if (this.data.volunteerTeamList.length == 0) { + this.setData({ + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + } + }).catch(err => { + this.setData({ + volunteerTeamList: [], + nodata: true, + loadMoreType: 'none', + loadMoreVisible: false, + }) + console.log(err) + }) + } +}) \ No newline at end of file diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.json b/subpages/heart/pages/volunteerTeam/volunteerTeam.json new file mode 100644 index 0000000..9925176 --- /dev/null +++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "志愿团队", + "usingComponents": { + "load-more": "/components/loadMore/loadMore", + "no-data": "/components/nodata/nodata" + } +} \ No newline at end of file diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml new file mode 100644 index 0000000..d3c2102 --- /dev/null +++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxml @@ -0,0 +1,32 @@ + + + + + {{item.typeName}} + + + + + + + + {{item.teamName}} + + + + + + + + + + diff --git a/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss new file mode 100644 index 0000000..41f5df1 --- /dev/null +++ b/subpages/heart/pages/volunteerTeam/volunteerTeam.wxss @@ -0,0 +1,91 @@ +page { + background-color: #f7f7f7; +} +.classify-tab { + width: 100%; + height: 90rpx; + border-bottom: 1rpx solid #eaeaea; + background-color: #fff; + padding: 0rpx 20rpx; + box-sizing: border-box; +} +::-webkit-scrollbar{ + width: 0; + height: 0; + color: transparent; + display:none; +} +.classify-tab .tab-list { + width: auto; + min-width: 100%; + height: 90rpx; + display: flex; +} +.tab-list .item { + height: 90rpx; + color: #ababab; + font-size: 30rpx; + margin: 0 20rpx; + line-height: 90rpx; + flex-shrink: 0; + position: relative; + width: 150rpx; + text-align: center; +} +.tab-list .item.select { + color: #FF4848; + font-size: 32rpx; + font-weight: bold; +} +.tab-list .item:first-child { + margin-left: 0; +} +.tab-list .item:last-child { + margin-right: 0; +} +.classify-tab .tab-list .item .select-bar { + width: 30rpx; + height: 8rpx; + border-radius: 4rpx; + background: #FF4848; + position: absolute; + bottom: 0; + left: 0; +} + +/* list */ + +.volunteer-list { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: #fff; + margin-top: 20rpx; +} +.volunteer-list .volunteer-item { + width: 690rpx; + height: 110rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.volunteer-list .volunteer-item .volunteer-title { + width: 650rpx; + font-size: 34rpx; + color: #333333; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +.volunteer-list .volunteer-item .volunteer-icon { + width: 22rpx; + height: 22rpx; +} +.volunteer-list .list-line { + width: 690rpx; + height: 1px; + background-color: #eeeeee; + border-radius: 1px; + opacity: 0.7; +} \ No newline at end of file diff --git a/subpages/heart/utils/api.js b/subpages/heart/utils/api.js index 6deae27..7d4882b 100644 --- a/subpages/heart/utils/api.js +++ b/subpages/heart/utils/api.js @@ -20,7 +20,14 @@ module.exports = { getGroupBuySignUpList, tradeConfirmation, signUpOrCancel, - getResidentConfig + getResidentConfig, + getVolunteerUnionList, + getVolunteerUnionDetail, + getTeamTypeList, + getAppTeamListByType, + getAppTeamDetail, + getTeamVolunteerList, + joinTeam } //顺道捎-首页列表 @@ -146,4 +153,52 @@ function signUpOrCancel (para) { // 获取居民端配置 function getResidentConfig () { return fly.get("residentConfig/getResidentConfig") +} + +// 共建联盟-列表 +function getVolunteerUnionList ({ pageIndex, pageSize }) { + return fly.get("heart/volunteer/getVolunteerUnionList", { + pageIndex, + pageSize + }) +} +// 共建联盟-详情 +function getVolunteerUnionDetail ({ id }) { + return fly.get("heart/volunteer/getVolunteerUnionDetail", { + id + }) +} +// 志愿团队类别-列表 +function getTeamTypeList ({ pageIndex, pageSize, teamId }) { + return fly.get("heart/volunteer/getTeamTypeList", { + pageIndex, + pageSize, + teamId + }) +} +// 志愿团队-列表 +function getAppTeamListByType ({ pageIndex, pageSize, typeCode }) { + return fly.get("heart/volunteer/getAppTeamListByType", { + pageIndex, + pageSize, + typeCode + }) +} +// 志愿团队-详情 +function getAppTeamDetail ({ id }) { + return fly.get("heart/volunteer/getAppTeamDetail", { + id + }) +} +// 志愿团队-详情-成员列表 +function getTeamVolunteerList ({ pageIndex, pageSize, id }) { + return fly.get("heart/volunteer/getTeamVolunteerList", { + pageIndex, + pageSize, + id + }) +} +// 志愿团队-加入团队 +function joinTeam (para) { + return fly.post("heart/volunteer/joinTeam", para) } \ No newline at end of file diff --git a/utils/activity.js b/utils/activity.js index 61435b6..af699e6 100644 --- a/utils/activity.js +++ b/utils/activity.js @@ -10,7 +10,8 @@ module.exports = { getVolunteerTags, getToken, moduleCategory, - getImgUrlList + getImgUrlList, + getAppTeamActList } function getActivityList (params) { @@ -60,4 +61,9 @@ function moduleCategory(params) { // 获取图片配置列表 优化 function getImgUrlList (params) { return fly.get('imgConfig/getImgUrlList', params) +} + +// 志愿团队-详情-活动列表 +function getAppTeamActList (params) { + return fly.get('heart/volunteer/getAppTeamActList', params) } \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index 48adc26..dfe226f 100755 --- a/utils/api.js +++ b/utils/api.js @@ -88,7 +88,9 @@ module.exports = { getVoterConfigList, submitVote, getVoterDetail, - getVoterConfig + getVoterConfig, + // + getVolunteerPioneerList } function getToken (wxCode) { @@ -707,4 +709,9 @@ function getVoterDetail() { // 选民登记-首页入口 function getVoterConfig() { return fly.get('imgConfig/getImgUrl/10') +} + +// 志愿先锋-列表 +function getVolunteerPioneerList({ pageIndex, pageSize }) { + return fly.get('heart/volunteer/getVolunteerPioneerList', { pageIndex, pageSize }) } \ No newline at end of file diff --git a/utils/filter.wxs b/utils/filter.wxs index 9a3ff94..9b1ff90 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -27,8 +27,11 @@ var formatTime = function (strDate, format = "yyyy-MM-dd hh:mm:ss") { var getTags = function (tags=[]) { return tags.join(' ') } - +var getHtmlContent = function (html) { + return html.replace(getRegExp('<\/?.+?\/?>|[ ]', 'g'), '') +} module.exports = { formatTime: formatTime,//日期格式化 - getTags: getTags + getTags: getTags, + getHtmlContent: getHtmlContent } \ No newline at end of file diff --git a/utils/heartBehavior.js b/utils/heartBehavior.js index 5aa5b7f..f91b354 100644 --- a/utils/heartBehavior.js +++ b/utils/heartBehavior.js @@ -28,12 +28,12 @@ module.exports = Behavior ({ loadBehavior () { console.log('load heartBehavior') Promise.all([this.getModuleList(), this.getImgUrl()]).then( () => { - let newArr = group(this.data.tabList.sort(compare('sort')), 2) - this.setData({ - tabLeftList: newArr[1], - tabRightList: newArr[0] - }) - // 2021.07.09 左右菜单互换位置 + // let newArr = group(this.data.tabList.sort(compare('sort')), 2) + // this.setData({ + // tabLeftList: newArr[1], + // tabRightList: newArr[0] + // }) + // 2021.11.17 取消排序 }) }, // 获取模块信息 @@ -67,7 +67,7 @@ module.exports = Behavior ({ getImgUrl:function (){ return new Promise((resolve, reject) => { let params = { - imageTypes: '0, 5, 8, 9' + imageTypes: '0, 5, 8, 9, 11, 12' } api.getImgUrlList(params).then(res => { res.data.forEach( item => { @@ -76,9 +76,14 @@ module.exports = Behavior ({ getImgUrl: item }) } else if (item.imgType == '5' && (item.imgCode == 'ptg' || item.imgCode == 'sds')) { - this.data.tabList.push(item) + // 2021.11.17 取消排序 + // this.data.tabList.push(item) + // this.setData({ + // tabList: this.data.tabList + // }) + this.data.tabRightList.push(item) this.setData({ - tabList: this.data.tabList + tabRightList: this.data.tabRightList }) } else if (item.imgType == '8') { this.setData({ @@ -90,6 +95,12 @@ module.exports = Behavior ({ // tabList: this.data.tabList applyBtn: item }) + } else if (item.imgType == '11' || item.imgType == '12') { + // 2021.11.17 左侧固定 志愿团队 共建联盟 + this.data.tabLeftList.push(item) + this.setData({ + tabLeftList: this.data.tabLeftList.sort(compare('imgType')) + }) } }) resolve()