diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json index 0ea2e79..2a3f832 100644 --- a/epdc-resident-mp-yushan/app.json +++ b/epdc-resident-mp-yushan/app.json @@ -69,7 +69,6 @@ "pages/cancelDetail/cancelDetail", "pages/joinVolunteerOrg/joinVolunteerOrg", "pages/volunteerOrgList/volunteerOrgList", - "pages/activeApply/activeApply", "pages/moreList/moreList" ] }, @@ -82,8 +81,15 @@ "pages/publishEvaluation/publishEvaluation", "pages/remarkOrReply/remarkOrReply", "pages/searchDiscussion/searchDiscussion", - "pages/categoryList/categoryList" - ] + "pages/categoryList/categoryList", + "pages/activeApply/activeApply" + ], + "plugins": { + "esuaEpdcMpPlugin": { + "version": "0.1.1", + "provider": "wxdd8530c5f4926766" + } + } }, { "root": "subpages/mine", @@ -171,12 +177,6 @@ ] } ], - "plugins": { - "esuaEpdcMpPlugin": { - "version": "0.1.1", - "provider": "wxdd8530c5f4926766" - } - }, "preloadRule": { "pages/index/index": { "network": "all", diff --git a/epdc-resident-mp-yushan/pages/heart/heart.js b/epdc-resident-mp-yushan/pages/heart/heart.js index 18f2fba..401a902 100644 --- a/epdc-resident-mp-yushan/pages/heart/heart.js +++ b/epdc-resident-mp-yushan/pages/heart/heart.js @@ -33,7 +33,8 @@ Page({ circular: false, //衔接滑动 interval: 2000, //自动播放间隔时长(ms) duration: 500, //幻灯片切换时长(ms) - currentSwiper: 0 + currentSwiper: 0, + joinOrgState: '', // 是否加入组织 }, onLoad: function(options) { this.getBannerList() @@ -70,6 +71,8 @@ Page({ if (this.data.actId) { this.updateActivityList() } + + this.getVolunteerDetail() }, onPullDownRefresh: function() { this.getBannerList() @@ -213,7 +216,20 @@ Page({ }, toActiveApply () { wx.navigateTo({ - url: `/subpages/heart/pages/activeApply/activeApply` + url: `/subpages/discussion/pages/activeApply/activeApply` }) - } + }, + + // 获取申请详情 + getVolunteerDetail () { + api.getVolunteerDetail().then(res => { + if (res.code == 0 && res.msg == 'success') { + if (res.data) { + this.setData({ + joinOrgState: res.data.state + }) + } + } + }) + }, }) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/heart/heart.wxml b/epdc-resident-mp-yushan/pages/heart/heart.wxml index 2fcd174..ce5c1a2 100644 --- a/epdc-resident-mp-yushan/pages/heart/heart.wxml +++ b/epdc-resident-mp-yushan/pages/heart/heart.wxml @@ -74,7 +74,7 @@ img-url="../../images/heart/renzheng.png" bindmovebtnCallBack="toJoinVolunteerOrg"> { this.getActivityDetail() }) @@ -330,7 +334,7 @@ Page({ let uploadImageList = [] uploadImageList.push({ uploaded: true, - ossUrl: '', + ossUrl: res.data.headPic, imgUrl: res.data.headPic, imageId: ++_this.data.imageId }) @@ -347,7 +351,10 @@ Page({ actContent: res.data.actContent, switchChecked: res.data.volunteerFlag == '0' ? false : true, contacts: res.data.contacts, - tel: res.data.tel + tel: res.data.tel, + uploadImageList: uploadImageList, + stateName: res.data.stateName, + reason: res.data.reason }) } } @@ -426,11 +433,12 @@ Page({ } api.applyActivity(params).then(res => { if (res.code == 0 && res.msg == 'success') { - this.showToast('组织申请已提交') + this.showToast('提交成功') setTimeout(() => { this.setData({ lock: false }) + wx.navigateBack() }, 1000); } else { this.setData({ @@ -453,8 +461,8 @@ Page({ }) }, toApplyList () { - api.getActivityList({pageSize: 10, pageIndex: 1}).then(res => { - console.log(res.data) + wx.navigateTo({ + url: '/subpages/heart/pages/moreList/moreList' }) } }) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.json b/epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.json similarity index 100% rename from epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.json rename to epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.json diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxml b/epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxml similarity index 64% rename from epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxml rename to epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxml index 6f09ef6..f30b585 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxml +++ b/epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxml @@ -1,6 +1,5 @@ - - - + + @@ -95,4 +94,83 @@ + + + + + 活动标题 + + {{title}} + + + + 开始时间 + + {{actStartTime}} + + + + 结束时间 + + {{actEndTime}} + + + + 活动地点 + + {{actAddress}} + + + + + + + + + + + 报名要求 + {{requirement}} + + + + + 活动介绍 + {{actContent}} + + + + + 仅志愿者参加 + + + + 联系人 + + {{contacts}} + + + + 联系电话 + + {{tel}} + + + + + + 审核状态 + + {{stateName}} + + + + 审核意见 + + {{reason}} + + + + + diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxss b/epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxss similarity index 98% rename from epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxss rename to epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxss index e774d54..fc6180b 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxss +++ b/epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxss @@ -23,6 +23,9 @@ font-size: 32rpx; color: #333333; } +.data-form .reason-label { + width: 200rpx; +} .data-form .item-value { width: 490rpx; } diff --git a/epdc-resident-mp-yushan/subpages/discussion/utils/heartApi.js b/epdc-resident-mp-yushan/subpages/discussion/utils/heartApi.js new file mode 100644 index 0000000..2ba9ac9 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/discussion/utils/heartApi.js @@ -0,0 +1,54 @@ +var fly = require('../../../utils/request') +module.exports = { + getVolunteerDetail, + getOrgList, + applyVolunteer, + applyActivity, + getActivityDetail, + getActivityList, +} +// 互帮互助-志愿组织认证详情 +function getVolunteerDetail() { + return fly.get('heart/volunteer/getVolunteerDetail') +} + +// 互帮互助-志愿组织列表 +function getOrgList() { + return fly.get('heart/volunteer/getAppVolunteerOrgList') +} + +// 互帮互助-志愿组织认证 +function applyVolunteer({ + id, + realName, + idCard, + mobile, + volunteerOrgIds, + introduceInfo, +}) { + return fly.post('heart/volunteer/applyVolunteer', { + id, + realName, + idCard, + mobile, + volunteerOrgIds, + introduceInfo, + }) +} + +// 志愿活动-申请(新增修改) +function applyActivity({ id, title, actStartTime, actEndTime, actLatitude, actLongitude, actAddress, headPic, requirement, actContent, volunteerFlag, contacts, tel }) { + return fly.post('heart/volunteer/applyActivity', { + id, title, actStartTime, actEndTime, actLatitude, actLongitude, actAddress, headPic, requirement, actContent, volunteerFlag, contacts, tel + }) +} +// 志愿活动-详情 +function getActivityDetail(id) { + return fly.get('heart/volunteer/getActivityDetail', { + id: id + }) +} +// 志愿活动-活动列表 +function getActivityList(params) { + return fly.get('heart/volunteer/getActivityList', params) +} diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.js b/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.js index edcc8b3..941114d 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.js +++ b/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.js @@ -2,43 +2,7 @@ const api = require('../../utils/heartApi') Page({ data: { - newsLsit: [ - { - id: '1', - title: '小区环境美化正在进行中,各社区居民积极参与', - state: 0, //审核状态:0-审核中,5-未通过,10-待发布,15已发布 - stateName: '审核中', //状态名 - createdTime: '2020.10.09', - }, - { - id: '2', - title: '小区环境美化正在进行中,各社区居民积极参与', - state: 5, //审核状态:0-审核中,5-未通过,10-待发布,15已发布 - stateName: '未通过', //状态名 - createdTime: '2020.10.09', - }, - { - id: '3', - title: '小区环境美化正在进行中,各社区居民积极参与', - state: 10, //审核状态:0-审核中,5-未通过,10-待发布,15已发布 - stateName: '待发布', //状态名 - createdTime: '2020.10.09', - }, - { - id: '4', - title: '小区环境美化正在进行中,各社区居民积极参与', - state: 15, //审核状态:0-审核中,5-未通过,10-待发布,15已发布 - stateName: '已发布', //状态名 - createdTime: '2020.10.09', - }, - { - id: '6', - title: '小区环境美化正在进行中,各社区居民积极参与', - state: 0, //审核状态:0-审核中,5-未通过,10-待发布,15已发布 - stateName: '审核中', //状态名 - createdTime: '2020.10.09', - }, - ], + newsList: [], pageIndex: 1, pageSize: 10, loadMoreVisible: true, @@ -48,10 +12,14 @@ Page({ onLoad: function () { // this.getStudyNewsList() }, + onShow: function () { + this.getStudyNewsList() + }, // 列表点击事件 toDetail(e) { + let type = e.currentTarget.dataset.type wx.navigateTo({ - // url: `/pages/listDetail/listDetail?newsId=${e.detail.id}&pageType=studyTypeList`, + url: `/subpages/discussion/pages/activeApply/activeApply?id=${e.currentTarget.dataset.id}&type=${type}`, }) }, getStudyNewsList() { @@ -61,26 +29,26 @@ Page({ } if (this.data.pageIndex == 1) { this.setData({ - newsLsit: [], + newsList: [], }) } api.getActivityList(params) .then((res) => { - let newsLsit = [] - res.data.forEach((item) => { - newsLsit.push({ - newsImageUrl: item.newsImageUrl, - newsTitle: item.newsTitle, - newsContent: item.richTextContent, - id: item.id, - }) - }) + // let newsList = [] + // res.data.forEach((item) => { + // newsList.push({ + // newsImageUrl: item.newsImageUrl, + // newsTitle: item.newsTitle, + // newsContent: item.richTextContent, + // id: item.id, + // }) + // }) this.setData({ - newsLsit: this.data.newsLsit.concat(newsLsit), + newsList: this.data.newsList.concat(res.data), loadMoreType: res.data.length < this.data.pageSize ? 'none' : 'loading', }) - if (this.data.newsLsit == 0) { + if (this.data.newsList == 0) { this.setData({ isShow: true, loadMoreVisible: false, diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml b/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml index aa32546..8b50b36 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml +++ b/epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml @@ -14,7 +14,7 @@ --> - + {{item.title}} @@ -24,8 +24,8 @@ {{item.createdTime}} - 编辑 - 查看 + 编辑 + 查看 diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.js b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.js index b1a41b5..5e1b6e7 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.js +++ b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.js @@ -21,6 +21,9 @@ Page({ this.setData({ radioList }) + }, + // + onConfirm () { let selectOrgName = [] let selectOrgId = [] this.data.radioList.forEach(item => { @@ -33,6 +36,7 @@ Page({ let volunteerOrgIds = selectOrgId.join() wx.setStorageSync('volunteerOrgNames', volunteerOrgNames) wx.setStorageSync('volunteerOrgIds', volunteerOrgIds) + wx.navigateBack() }, getOrgList () { let ids = this.data.ids diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml index d944c9b..5ba4a19 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml +++ b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml @@ -1,6 +1,6 @@ - + @@ -9,6 +9,13 @@ - + + + + 暂无数据~ + + + + 确定 diff --git a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxss b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxss index e07d972..245ef64 100644 --- a/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxss +++ b/epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxss @@ -30,4 +30,39 @@ width: 100%; height: 1px; background-color: #eee; +} +.footer { + width: 100%; + height: 100rpx; + display: flex; + align-items: center; + justify-content: center; +} +.footer .submit { + width: 500rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + border-radius: 40rpx; + background-color: #ff0000; + color: #fff; +} + +.box{ + width: 100%; + height: auto; + box-sizing: border-box; + text-align: center; + margin-top: 100rpx; +} +.image{ + width: 450rpx; + height: 240rpx; +} +.text{ + width: 100%; + height: auto; + font-size: 28rpx; + color: #BCBCBC; + display: block; } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/utils/activity.js b/epdc-resident-mp-yushan/utils/activity.js index b4dc943..a57a898 100644 --- a/epdc-resident-mp-yushan/utils/activity.js +++ b/epdc-resident-mp-yushan/utils/activity.js @@ -1,7 +1,8 @@ var fly = require('./request.js') module.exports = { getActivityList: getActivityList, - bannerList + bannerList, + getVolunteerDetail } function getActivityList(params) { @@ -12,3 +13,8 @@ function bannerList() { return fly.get('heart/act/banner/list') } +// 互帮互助-志愿组织认证详情 +function getVolunteerDetail() { + return fly.get('heart/volunteer/getVolunteerDetail') +} +