Browse Source

互帮互助增加志愿者组织认证和活动申请

feature/societyOrg
ZhaoTongYao 4 years ago
parent
commit
60216ef8c4
  1. 18
      epdc-resident-mp-yushan/app.json
  2. 22
      epdc-resident-mp-yushan/pages/heart/heart.js
  3. 2
      epdc-resident-mp-yushan/pages/heart/heart.wxml
  4. 2
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  5. BIN
      epdc-resident-mp-yushan/subpages/discussion/images/applylist.png
  6. BIN
      epdc-resident-mp-yushan/subpages/discussion/images/head-image.png
  7. BIN
      epdc-resident-mp-yushan/subpages/discussion/images/pos.png
  8. 22
      epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.js
  9. 0
      epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.json
  10. 84
      epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxml
  11. 3
      epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxss
  12. 54
      epdc-resident-mp-yushan/subpages/discussion/utils/heartApi.js
  13. 68
      epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.js
  14. 6
      epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml
  15. 4
      epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.js
  16. 11
      epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml
  17. 35
      epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxss
  18. 8
      epdc-resident-mp-yushan/utils/activity.js

18
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",

22
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
})
}
}
})
},
})

2
epdc-resident-mp-yushan/pages/heart/heart.wxml

@ -74,7 +74,7 @@
img-url="../../images/heart/renzheng.png"
bindmovebtnCallBack="toJoinVolunteerOrg"></move-btn>
<move-btn
wx:if="{{true}}"
wx:if="{{joinOrgState == '10'}}"
button-width="142"
button-height="145"
button-top="920"

2
epdc-resident-mp-yushan/pages/toRegister/toRegister.js

@ -24,7 +24,7 @@ Page({
const versionNum = '1.2.12'
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag
let state = res.data ? res.data.scanFlag : '1'
that.setData({
experience: state
})

BIN
epdc-resident-mp-yushan/subpages/discussion/images/applylist.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
epdc-resident-mp-yushan/subpages/discussion/images/head-image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
epdc-resident-mp-yushan/subpages/discussion/images/pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

22
epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.js → epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.js

@ -20,13 +20,16 @@ Page({
actAddress: '', // 地址信息
uploadImageList: [], // 上传图片
imageId: 1, // 图片id计数
// headPic: '', // 活动头图
headPic: '', // 活动头图
requirement: '', // 报名要求
actContent: '', // 活动介绍
// volunteerFlag: '1', // 是否只允许志愿者参加 0否 1是
switchChecked: true, // 仅志愿者开关
contacts: '', // 联系人
tel: '', // 联系电话
stateName: '', // 审核状态
reason: '', // 原因
type: '', // 编辑 还是 查看
},
onLoad: function (options) {
@ -38,7 +41,8 @@ Page({
})
if (options.id) {
this.setData({
id: options.id
id: options.id,
type: options.type
}, () => {
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'
})
}
})

0
epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.json → epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.json

84
epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxml → epdc-resident-mp-yushan/subpages/discussion/pages/activeApply/activeApply.wxml

@ -1,6 +1,5 @@
<!--subpages/heart/pages/joinVolunteerOrg/joinVolunteerOrg.wxml-->
<view class="active-apply">
<view class="apply-list" bindtap="toApplyList">
<view class="active-apply" wx:if="{{type == 'edit' || type == ''}}">
<view class="apply-list" bindtap="toApplyList" wx:if="{{!type}}">
<image src="../../images/applylist.png" />
</view>
<view class="data-form">
@ -95,4 +94,83 @@
</view>
</view>
</view>
<view class="active-apply" wx:elif="{{type == 'look'}}">
<view class="data-form">
<view class="data-form-item">
<view class="item-label">活动标题</view>
<view class="item-value">
{{title}}
</view>
</view>
<view class="data-form-item">
<view class="item-label">开始时间</view>
<view class="item-value">
{{actStartTime}}
</view>
</view>
<view class="data-form-item">
<view class="item-label">结束时间</view>
<view class="item-value">
{{actEndTime}}
</view>
</view>
<view class="data-form-item">
<view class="item-label">活动地点</view>
<view class="item-value">
{{actAddress}}
</view>
</view>
<view class="data-form-item upload-image">
<view class="image-list">
<image src="{{headPic}}" bindtap="onPreview" data-url="{{headPic}}"/>
</view>
</view>
</view>
<view class="data-form">
<view class="textarea-item">
<view class="item-label">报名要求</view>
<view class="textarea">{{requirement}}</view>
</view>
</view>
<view class="data-form">
<view class="textarea-item">
<view class="item-label">活动介绍</view>
<view class="textarea">{{actContent}}</view>
</view>
</view>
<view class="data-form">
<view class="switch-item">
<view class="switch-label">仅志愿者参加</view>
<switch checked="{{switchChecked}}" color="#d81d00" disabled="{{true}}"/>
</view>
<view class="data-form-item">
<view class="item-label">联系人</view>
<view class="item-value">
{{contacts}}
</view>
</view>
<view class="data-form-item">
<view class="item-label">联系电话</view>
<view class="item-value">
{{tel}}
</view>
</view>
</view>
<view class="data-form">
<view class="data-form-item" wx:if="{{stateName}}">
<view class="item-label">审核状态</view>
<view class="item-value">
{{stateName}}
</view>
</view>
<view class="data-form-item" wx:if="{{reason}}">
<view class="item-label">审核意见</view>
<view class="item-value">
{{reason}}
</view>
</view>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />

3
epdc-resident-mp-yushan/subpages/heart/pages/activeApply/activeApply.wxss → 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;
}

54
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)
}

68
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,

6
epdc-resident-mp-yushan/subpages/heart/pages/moreList/moreList.wxml

@ -14,7 +14,7 @@
</view>
</view>
</view> -->
<view class="item-box" wx:for="{{newsLsit}}">
<view class="item-box" wx:for="{{newsList}}" wx:key="index">
<view class="item-title" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
<view class="item-bottom">
<view class="item-bottom-left">
@ -24,8 +24,8 @@
<view class="time">{{item.createdTime}}</view>
</view>
<view class="item-bottom-right">
<view class="edit" wx:if="{{item.state ==0 || item.state ==5}}">编辑</view>
<view class="look" bind:tap='toDetail'>查看</view>
<view class="edit" wx:if="{{item.state ==0 || item.state ==5}}" bindtap="toDetail" data-type="edit" data-id="{{item.id}}">编辑</view>
<view class="look" bind:tap='toDetail' data-type="look" data-id="{{item.id}}">查看</view>
</view>
</view>
</view>

4
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

11
epdc-resident-mp-yushan/subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml

@ -1,6 +1,6 @@
<!--subpages/heart/pages/volunteerOrgList/volunteerOrgList.wxml-->
<view class="org-list">
<view class="radio-group">
<view class="radio-group" wx:if="{{radioList.length > 0}}">
<block wx:for="{{radioList}}" wx:key="index">
<view class="radio-item" bindtap="onChangeRadio" data-item="{{item}}" data-index="{{index}}">
<image class="radio-img" src="../../images/radiochecked.png" wx:if="{{item.selected}}"/>
@ -9,6 +9,13 @@
</view>
<view class="line"></view>
</block>
</view>
</view>
<view class="box" wx:else>
<image src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/07/rBAB71646bOAXiYnAAB-svV4uWY962.png" class="image"/>
<text class="text">暂无数据~</text>
</view>
</view>
<view class="footer">
<view class="submit" bindtap="onConfirm">确定</view>
</view>

35
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;
}

8
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')
}

Loading…
Cancel
Save