diff --git a/components/DateTimePicker/index.js b/components/DateTimePicker/index.js
index b34d3c8..3400efd 100644
--- a/components/DateTimePicker/index.js
+++ b/components/DateTimePicker/index.js
@@ -5,9 +5,12 @@ var months = [];
var days = [];
var hours = [];
var minutes = [];
-for (var i = date.getFullYear(); i > (date.getFullYear() - 3); i--) {
+for (var i = date.getFullYear(); i < (date.getFullYear() + 2); i++) {
years.push(i + "年");
}
+// for (var i = date.getFullYear(); i > (date.getFullYear() - 3); i--) {
+// years.push(i + "年");
+// }
for (var i = 1; i <= 12; i++) {
months.push(i + "月");
}
diff --git a/project.config.json b/project.config.json
index 3f5ab5b..9831e1c 100644
--- a/project.config.json
+++ b/project.config.json
@@ -43,6 +43,8 @@
"hidedInDevtools": []
},
"scripts": {},
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
"condition": {
"plugin": {
"list": []
@@ -117,12 +119,6 @@
"pathName": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"query": "",
"scene": null
- },
- {
- "name": "subpages/heart/pages/myApplyDetail/myApplyDetail",
- "pathName": "subpages/heart/pages/myApplyDetail/myApplyDetail",
- "query": "",
- "scene": null
}
]
}
diff --git a/subpages/heart/components/notice/notice.js b/subpages/heart/components/notice/notice.js
new file mode 100644
index 0000000..90d0c31
--- /dev/null
+++ b/subpages/heart/components/notice/notice.js
@@ -0,0 +1,65 @@
+Component({
+ data: {
+ visible: false
+ },
+ properties: {
+ dialogVisible: {
+ type: Boolean,
+ value: false,
+ observer: function () {
+ this.setData({
+ visible: !this.data.visible
+ })
+ }
+ },
+ title: {
+ type: String,
+ value: ""
+ },
+ content: {
+ type: Array,
+ value: []
+ },
+ confirmText: {
+ type: String,
+ value: ""
+ },
+ cancelText: {
+ type: String,
+ value: ""
+ }
+ },
+ pageLifetimes: {
+ show () {
+
+ },
+ hide () {
+
+ }
+ },
+ lifetimes: {
+ attached () {
+
+ },
+ detached () {
+
+ }
+ },
+ methods: {
+ close () {
+ this.triggerEvent("close")
+ this.setData({
+ visible: false
+ })
+ },
+ confirm () {
+ this.triggerEvent("confirm")
+ this.setData({
+ visible: false
+ })
+ },
+ catchmove () {
+
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/heart/components/notice/notice.json b/subpages/heart/components/notice/notice.json
new file mode 100644
index 0000000..d3738ed
--- /dev/null
+++ b/subpages/heart/components/notice/notice.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "wux-icon": "../../../../dist/icon/index"
+ }
+}
\ No newline at end of file
diff --git a/subpages/heart/components/notice/notice.wxml b/subpages/heart/components/notice/notice.wxml
new file mode 100644
index 0000000..351156f
--- /dev/null
+++ b/subpages/heart/components/notice/notice.wxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ {{title}}
+
+ {{item}}
+
+
+
+ {{cancelText}}
+ {{confirmText}}
+
+
+
\ No newline at end of file
diff --git a/subpages/heart/components/notice/notice.wxss b/subpages/heart/components/notice/notice.wxss
new file mode 100644
index 0000000..1e34473
--- /dev/null
+++ b/subpages/heart/components/notice/notice.wxss
@@ -0,0 +1,84 @@
+.notice {
+ width: 100%;
+ height: 100vh;
+ position: fixed;
+ z-index: 100;
+ left: 0;
+ top: 0;
+ background: rgba(0,0,0, 0.4);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.notice .box {
+ width: 490rpx;
+ background: #fff;
+ border-radius: 16rpx;
+ overflow: hidden;
+ padding: 0 20rpx;
+ position: relative;
+}
+.notice .box .close {
+ width:100%;
+ height: 60rpx;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+}
+.notice .box .close cover-image {
+ width: 40rpx;
+ height: 40rpx;
+ object-fit: cover;
+}
+.notice .box .title {
+ height: 60rpx;
+ line-height: 60rpx;
+ width: 100%;
+ text-align:center;
+ font-size: 36rpx;
+ color: #333;
+ margin-bottom: 23rpx;
+}
+.notice .box .content {
+ height: auto;
+ width: 100%;
+ padding-bottom: 35rpx;
+}
+.notice .box .content cover-view {
+ font-size: 30rpx;
+ line-height: 50rpx;
+ height: 50rpx;
+ width: 100%;
+ text-align: center;
+ color: #666;
+}
+.notice .box .border {
+ width: 100%;
+ height: 0;
+ border: 0.5rpx solid #eaeaea;
+ border-bottom: 1rpx solid transparent;
+ position: absolute;
+ left:0;
+ bottom: 105rpx;
+}
+.notice .box .operation {
+ width: calc(100% - 40rpx);
+ height: 75rpx;
+ padding: 15rpx 0;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ margin-left: 20rpx
+}
+.notice .box .operation cover-view {
+ flex: 1;
+ color: #999;
+ font-size: 36rpx;
+ width: 49%;
+ height: 100%;
+ line-height: 75rpx;
+ text-align:center;
+}
+.notice .box .operation .confirm{
+ color: #04BCA0;
+}
diff --git a/subpages/heart/images/goback.png b/subpages/heart/images/goback.png
new file mode 100644
index 0000000..9d3eb63
Binary files /dev/null and b/subpages/heart/images/goback.png differ
diff --git a/subpages/heart/pages/myApply/myApply.js b/subpages/heart/pages/myApply/myApply.js
index c9e8bcd..536e5e9 100644
--- a/subpages/heart/pages/myApply/myApply.js
+++ b/subpages/heart/pages/myApply/myApply.js
@@ -1,5 +1,6 @@
// subpages/heart/pages/myApply/myApply.js
const api = require("../../../../utils/api")
+import { getTimestamp } from "../../../../utils/common"
Page({
@@ -14,9 +15,10 @@ Page({
actAddress: '',
actStartTime: '', //起始时间
actEndTime: '', //结束时间
- actPeopleNum: 0,
+ actPeopleNum: '',
actContacts: '',
- actTel: ''
+ actTel: '',
+ dialogVisible: false, //提示框
},
curCode: '', //区分是start还是end
},
@@ -94,7 +96,7 @@ Page({
},
onInputPeopleNum (e) {
this.setData({
- 'dataForm.actPeopleNum': parseInt(e.detail.value)
+ 'dataForm.actPeopleNum': e.detail.value
})
},
onInputContacts (e) {
@@ -121,6 +123,10 @@ Page({
showPicker: false,
'dataForm.actStartTime': e.detail.time
})
+
+ if (this.data.dataForm.actStartTime < getTimestamp()) {
+ this.showToast("开始时间应该大于当前时间")
+ }
} else if (this.data.curCode == 'end') {
this.setData({
showPicker: false,
@@ -128,11 +134,7 @@ Page({
})
if (this.data.dataForm.actStartTime > this.data.dataForm.actEndTime) {
- wx.showToast({
- title: '结束时间应该大于起始时间',
- icon: 'none',
- duration: 2000
- })
+ this.showToast('结束时间应该大于起始时间')
}
}
},
@@ -163,14 +165,26 @@ Page({
this.showToast("请填写开始时间")
return false
}
+ if (this.data.dataForm.actStartTime < getTimestamp()) {
+ this.showToast("开始时间应该大于当前时间")
+ return false
+ }
if (!this.data.dataForm.actEndTime) {
this.showToast("请填写结束时间")
return false
}
+ if (this.data.dataForm.actStartTime > this.data.dataForm.actEndTime) {
+ this.showToast('结束时间应该大于起始时间')
+ return false
+ }
if (!this.data.dataForm.actPeopleNum) {
this.showToast("请填写需要人数")
return false
}
+ if (!(parseInt(this.data.dataForm.actPeopleNum) > 0)) {
+ this.showToast("请填写正确的人数")
+ return false
+ }
if (!this.data.dataForm.actContacts) {
this.showToast("请填写联系人")
return false
@@ -179,11 +193,18 @@ Page({
this.showToast("请填写联系人电话")
return false
}
+ this.setData({
+ 'dataForm.actPeopleNum': parseInt(this.data.dataForm.actPeopleNum)
+ })
const para = { ...this.data.dataForm }
console.log('submit apply', para)
- // api.applyAct(para).then(res => {
- // console.log(res.data)
- // })
+ api.applyAct(para).then(res => {
+ if(res.code == '' && res.msg == 'success') {
+ this.setData({
+ dialogVisible: !this.data.dialogVisible
+ })
+ }
+ })
},
//简化提示
@@ -200,4 +221,17 @@ Page({
url: "/subpages/heart/pages/myApplyList/myApplyList"
})
},
+
+ // 关闭弹框
+ closeDialog () {
+ wx.navigateTo({
+ url: "/pages/heartNew/heartNew"
+ })
+ },
+ // 弹框确定按钮
+ confirmDialog () {
+ wx.navigateTo({
+ url: "/pages/heartNew/heartNew"
+ })
+ }
})
\ No newline at end of file
diff --git a/subpages/heart/pages/myApply/myApply.json b/subpages/heart/pages/myApply/myApply.json
index 8f0891b..4a7fc4a 100644
--- a/subpages/heart/pages/myApply/myApply.json
+++ b/subpages/heart/pages/myApply/myApply.json
@@ -1,6 +1,7 @@
{
"navigationBarTitleText": "我要申请",
"usingComponents": {
- "date-time-picker": "../../../../components/DateTimePicker/index"
+ "date-time-picker": "../../../../components/DateTimePicker/index",
+ "notice": "../../components/notice/notice"
}
}
\ No newline at end of file
diff --git a/subpages/heart/pages/myApply/myApply.wxml b/subpages/heart/pages/myApply/myApply.wxml
index 2662524..67279eb 100644
--- a/subpages/heart/pages/myApply/myApply.wxml
+++ b/subpages/heart/pages/myApply/myApply.wxml
@@ -43,6 +43,7 @@
-
+
-
+
+
diff --git a/subpages/heart/pages/myApply/myApply.wxss b/subpages/heart/pages/myApply/myApply.wxss
index 02cb04a..1abe692 100644
--- a/subpages/heart/pages/myApply/myApply.wxss
+++ b/subpages/heart/pages/myApply/myApply.wxss
@@ -1,16 +1,17 @@
/* subpages/heart/pages/myApply/myApply.wxss */
page {
width: 100%;
- height: auto;
overflow-y: auto;
background: #f7f7f7;
}
.apply-list {
-
+ position: relative;
+ overflow: hidden;
}
.apply-list .my-apply-img {
position: absolute;
right: -10rpx;
+ top: 16rpx;
}
.apply-list .my-apply-img image {
width: 208rpx;
@@ -47,11 +48,11 @@ page {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
- color: #999999;
+ color: #666666;
}
.apply-list .apply-item .text-content {
+ font-weight: 400;
height: 88rpx;
- color: #666666;
}
.submit {
width: 592rpx;
diff --git a/subpages/heart/pages/myApplyDetail/myApplyDetail.js b/subpages/heart/pages/myApplyDetail/myApplyDetail.js
index 19fbae6..69d3ff3 100644
--- a/subpages/heart/pages/myApplyDetail/myApplyDetail.js
+++ b/subpages/heart/pages/myApplyDetail/myApplyDetail.js
@@ -8,6 +8,7 @@ Page({
*/
data: {
applyId: '',
+ applyDetails: {}
},
/**
@@ -17,6 +18,7 @@ Page({
this.setData({
applyId: options.id
})
+ this.getApplyDetail()
},
/**
@@ -64,13 +66,16 @@ Page({
/**
* 用户点击右上角分享
*/
- onShareAppMessage: function () {
+ // onShareAppMessage: function () {
- },
+ // },
getApplyDetail () {
- // api.applyActDetail(this.data.applyId).then(res => {
- // console.log(res.data)
- // })
+ api.applyActDetail(this.data.applyId).then(res => {
+ // console.log(res.data)
+ this.setData({
+ applyDetails: res.data
+ })
+ })
},
})
\ No newline at end of file
diff --git a/subpages/heart/pages/myApplyDetail/myApplyDetail.wxml b/subpages/heart/pages/myApplyDetail/myApplyDetail.wxml
index 2458492..d6eea20 100644
--- a/subpages/heart/pages/myApplyDetail/myApplyDetail.wxml
+++ b/subpages/heart/pages/myApplyDetail/myApplyDetail.wxml
@@ -2,45 +2,39 @@
- 志愿服务标题
- 组织环保志愿服务队
+ 活动标题
+ {{applyDetails.actTitle}}
活动内容
- 1.卫生大扫除、清洗护城河、清洗乱涂画和“小广告”、清理卫生死角、捡拾垃圾 (果皮、纸屑)等活动
-
-
- 2.组织志愿者植树、美化绿化小区
-
-
- 3.计划生育志愿服务 组织开展自我教育
+ {{applyDetails.actContent}}
活动地点
- 平阴县锦水街道
+ {{applyDetails.actAddress}}
活动时间
- 2020-10-22 13:30 至 2020-10-24 12:30
+ {{applyDetails.actStartTime}} 至 {{applyDetails.actEndTime}}
活动人数
- 28
+ {{applyDetails.actPeopleNum}}
活动联系人
- 王宇
+ {{applyDetails.actContacts}}
联系人电话
- 18888888888
+ {{applyDetails.actTel}}
审核状态
- 未通过
- 原因:不符合要求
+ {{applyDetails.actStatus}}
+ 原因:{{applyDetails.noPassReason}}
diff --git a/subpages/heart/pages/myApplyDetail/myApplyDetail.wxss b/subpages/heart/pages/myApplyDetail/myApplyDetail.wxss
index 3f0e20c..bfbba63 100644
--- a/subpages/heart/pages/myApplyDetail/myApplyDetail.wxss
+++ b/subpages/heart/pages/myApplyDetail/myApplyDetail.wxss
@@ -6,7 +6,7 @@ page {
background: #f7f7f7;
}
.apply-detail {
-
+ margin-bottom: 60rpx;
}
.apply-detail .apply-item {
width: 100%;
diff --git a/subpages/heart/pages/myApplyList/myApplyList.js b/subpages/heart/pages/myApplyList/myApplyList.js
index 22b853a..0c7f608 100644
--- a/subpages/heart/pages/myApplyList/myApplyList.js
+++ b/subpages/heart/pages/myApplyList/myApplyList.js
@@ -1,4 +1,5 @@
// subpages/heart/pages/myApplyList/myApplyList.js
+const { checkWxUnionId } = require("../../../../utils/api")
const api = require("../../../../utils/api")
Page({
@@ -12,33 +13,14 @@ Page({
nodata: false,
loadMoreType: 'none',
loadMoreVisible: false,
- applylist: [
- {
- "id": "73290",
- "actTitle": "洁美家园行动 组织开展以改善社区环境卫生",
- "createdTime": "2020-10-22 15:20:00",
- "actStatus": "0"
- },
- {
- "id": "73291",
- "actTitle": "组织开展以改善社区环境卫生为主内容的志愿活动,集中整治脏、乱、差现象",
- "createdTime": "2020-10-22 15:20:00",
- "actStatus": "1"
- },
- {
- "id": "73292",
- "actTitle": "便民服务中心志愿者",
- "createdTime": "2020-10-22 15:20:00",
- "actStatus": "2"
- }
- ]
+ applylist: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- // this.getApplyList()
+ this.getApplyList()
},
/**
@@ -128,6 +110,9 @@ Page({
},
//跳转到申请信息详情
toApplyDetail (e) {
- console.log('toApplyDetail', e.currentTarget.dataset.id)
+ console.log('跳转申请详情', e.currentTarget.dataset.id)
+ wx.navigateTo({
+ url: `/subpages/heart/pages/myApplyDetail/myApplyDetail?id=${e.currentTarget.dataset.id}`
+ })
}
})
\ No newline at end of file
diff --git a/subpages/heart/pages/myApplyList/myApplyList.json b/subpages/heart/pages/myApplyList/myApplyList.json
index 45942c1..aa4bbe7 100644
--- a/subpages/heart/pages/myApplyList/myApplyList.json
+++ b/subpages/heart/pages/myApplyList/myApplyList.json
@@ -1,4 +1,7 @@
{
"navigationBarTitleText": "申请记录",
- "usingComponents": {}
+ "usingComponents": {
+ "load-more": "/components/loadMore/loadMore",
+ "no-data": "/components/nodata/nodata"
+ }
}
\ No newline at end of file
diff --git a/subpages/heart/pages/myApplyList/myApplyList.wxss b/subpages/heart/pages/myApplyList/myApplyList.wxss
index 05d1248..7d01ef5 100644
--- a/subpages/heart/pages/myApplyList/myApplyList.wxss
+++ b/subpages/heart/pages/myApplyList/myApplyList.wxss
@@ -57,17 +57,24 @@ page {
border-radius: 1px;
margin: 28rpx 0rpx;
}
+.apply-list .apply-item .item-time {
+ font-size: 30rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #666666;
+}
.apply-list .apply-item .item-state {
margin: 26rpx 0rpx 28rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
+ color: #666666;
}
.apply-list .apply-item .item-state .state-0 {
color: #FB9F00;
}
.apply-list .apply-item .item-state .state-1 {
- color: #666666;
+ color: #28C896;
}
.apply-list .apply-item .item-state .state-2 {
color: #D80000;
diff --git a/subpages/heart/pages/volunteer/volunteer.js b/subpages/heart/pages/volunteer/volunteer.js
index 0726aeb..b976176 100644
--- a/subpages/heart/pages/volunteer/volunteer.js
+++ b/subpages/heart/pages/volunteer/volunteer.js
@@ -8,6 +8,9 @@ Page({
* 页面的初始数据 全部为必填项
*/
data: {
+ statusHeight: 0, // 自定义头部状态栏高度
+ navigationHeight: 0, // 自定义头部导航栏高度
+ getImgUrl: '', //后台配置背景
realName: "", //真实姓名
mobile: "", //手机号
identityNo: "", //身份证号码
@@ -37,12 +40,23 @@ Page({
disabled:false
},
onLoad: function () {
+ this.setData({
+ statusHeight: app.globalData.deviceInfo.statusHeight,
+ navigationHeight: app.globalData.deviceInfo.navigationHeight
+ })
+ this.getImgUrl()
this.getPrepareComplete().then(() => {
this.getGridList()
})
this.checkWxUnionId()
this.getWxCode()
},
+ //返回上一级
+ goback () {
+ wx.navigateBack({
+ delta: 1
+ })
+ },
bindRealNameInput (e) {
this.setData({
realName: e.detail.value
@@ -97,6 +111,15 @@ Page({
volunteerSignature: e.detail.value
})
},
+ // 获取配置图片
+ getImgUrl:function (){//0:咨询热线
+ let that = this
+ api.getImgUrl("4").then(function (res) {
+ that.setData({
+ getImgUrl: res.data[0]
+ })
+ })
+ },
// 查看用户是否完善个人信息
checkWxUnionId () {
api.checkWxUnionId().then(res => {
diff --git a/subpages/heart/pages/volunteer/volunteer.json b/subpages/heart/pages/volunteer/volunteer.json
index c001ecc..61cd0be 100644
--- a/subpages/heart/pages/volunteer/volunteer.json
+++ b/subpages/heart/pages/volunteer/volunteer.json
@@ -1,5 +1,6 @@
{
"navigationBarTitleText": "志愿者认证",
+ "navigationStyle": "custom",
"usingComponents": {
"wux-dialog": "../../../../dist/dialog/index",
"coverview-dialog": "../../components/coverViewDialog/coverViewDialog",
diff --git a/subpages/heart/pages/volunteer/volunteer.wxml b/subpages/heart/pages/volunteer/volunteer.wxml
index 96dc13d..26fd3e6 100644
--- a/subpages/heart/pages/volunteer/volunteer.wxml
+++ b/subpages/heart/pages/volunteer/volunteer.wxml
@@ -1,13 +1,25 @@
-
+
+
-
+
-