作者 niufei

基本对接完成

// pages/admin/admin.js
const app=getApp();
const app = getApp();
Page({
... ... @@ -7,119 +6,213 @@ Page({
* 页面的初始数据
*/
data: {
page:0,
datalist:[],
pageNum:10,
page: 0,
datalist: [],
pageNum: 10,
cover_type: false
},
// 输入信息
get_word(e) {
this.setData({
word: e.detail.value
})
},
getdatalist(){
let that=this;
let head={
'XX-Token':wx.getStorageSync('token')
// 改变弹窗状态
change_cover(e) {
if (e.currentTarget.dataset.index){
this.setData({
index: e.currentTarget.dataset.index,
id: e.currentTarget.dataset.id
})
}
this.setData({
cover_type: !this.data.cover_type
})
},
getdatalist() {
wx.showLoading({
title: '加载中',
})
let that = this
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url ='index/member_center/admin';
let params={
let url = that.data.type > 1 ? 'index/member_center/addTimeList' : 'index/member_center/admin';
let params = {
page: that.data.page,
pageNum: that.data.pageNum
}
app.post(url, params, head).then((res)=>{
let datalist = that.data.datalist;
let datadatalist = datalist.concat(res.volunteer);
app.post(url, params, head).then((res) => {
if (res.volunteer.length == 0) {
that.setData({
datalist: datadatalist,
page_type: true
})
}
if (that.data.page == 0) {
that.setData({
datalist: res.volunteer,
page: res.page
})
}).catch((err)=>{
wx.hideLoading()
} else {
setTimeout(() => {
that.setData({
datalist: that.data.datalist.concat(res.volunteer),
page: res.page
})
wx.hideLoading()
}, 1000)
}
}).catch((err) => {})
},
update_status(e){
let that=this;
let index = e.currentTarget.dataset.index;
let url ='index/member_center/update_status';
},
// 添加时间
add_time(){
let that = this
if (!that.data.word) {
wx.showToast({
title: '请输入工时',
icon: 'none',
duration: 1000
})
return
}
let url = 'index/member_center/addTime';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params={
id: e.currentTarget.id,
status: e.currentTarget.dataset.status
let params = {
user_id: that.data.id,
add_time: that.data.word
}
app.post(url, params,head).then((res)=>{
app.post(url, params, head).then((res) => {
wx.showToast({
title: '更新成功',
title: '操作成功',
icon: 'success',
duration: 2000
duration: 1000,
success: () => {
that.setData({
word: null,
cover_type: false
})
let datalist = that.data.datalist;
datalist[index].status = e.currentTarget.dataset.status;
}
})
}).catch((err) => { })
},
//通过
pass(e) {
this.update_status(e.currentTarget.dataset.id,e.currentTarget.dataset.index, 2)
},
//驳回
reject() {
if(!this.data.word){
wx.showToast({
title: '请填写不通过原因',
icon: 'none',
duration: 1000
})
return
}
this.update_status(this.data.id,this.data.index, 3)
},
// 通过,不通过接口
update_status(id,index, status) {
let that = this
let datalist = that.data.datalist
let url = 'index/member_center/update_status';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: id,
status: status
}
if(status == 3){
params.refund_reason = that.data.word
}
console.log(params)
app.post(url, params, head).then((res) => {
wx.showToast({
title: '操作成功',
icon: 'success',
duration: 1000,
success: () => {
datalist.splice(index, 1)
that.setData({
datalist: datalist
datalist: datalist,
word: null,
cover_type: false
})
}).catch((err)=>{
}
})
}).catch((err) => {})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let windowHeight = wx.getSystemInfoSync().windowHeight;// 屏幕的高度
let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
onLoad: function(options) {
this.setData({
scroll_height: windowHeight * 750 / windowWidth
type: options.type
})
this.getdatalist()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that=this;
that.setData({
page: 0,
datalist: []
})
that.getdatalist();
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
let that = this
if (that.data.page_type) {
wx.showToast({
title: '暂无更多数据',
icon: 'none'
})
return
}
that.getdatalist()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--pages/admin/admin.wxml-->
<scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'>
<block wx:for='{{datalist}}' wx:key>
<view class='adminitem'>
<block wx:for='{{datalist}}' wx:key="index">
<view class='adminitem'>
<navigator class='admin_left' url='/pages/close_apply/close_apply?id={{item.user_id}}' hover-class="none">
<view class='admin_img'>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}' mode="aspectFill"></image>
</view>
<view class='admin_txt'>
<view class='admin_txttitle'>{{item.nane}}</view>
<view>{{item.duty}}</view>
</view>
</navigator>
<view class='admin_rigth'>
<view class='admin_buttom {{item.status=="3"?"admin_active":""}}' id='{{item.id}}' data-idi='{{item.status}}' data-status='3' data-index='{{index}}' bindtap='update_status'>不通过</view>
<view class='admin_buttom {{item.status !="3"?"admin_active":""}}' id='{{item.id}}' data-status='2' data-index='{{index}}' bindtap='update_status'>通过</view>
<view class='admin_rigth' wx:if="{{type == 1}}">
<view class='admin_buttom {{item.status=="3"?"admin_active":""}}' data-id='{{item.id}}' data-idi='{{item.status}}' data-status='3' data-index='{{index}}' bindtap='change_cover'>不通过</view>
<view class='admin_buttom {{item.status !="3"?"admin_active":""}}' data-id='{{item.id}}' data-status='2' data-index='{{index}}' bindtap='pass'>通过</view>
</view>
</view>
<view class='vold_line'></view>
<view class="add_time" wx:if="{{type == 2}}" bindtap='change_cover' data-index='{{index}}' data-id='{{item.user_id}}'>添加工时</view>
</view>
<view class='vold_line'></view>
</block>
</scroll-view>
\ No newline at end of file
<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}">
<view class="show_box">
<view class="s_title">{{type>1?'请输入工时':'请输入未通过理由'}}</view>
<textarea placeholder="请输入..." class="word_area {{type>1?'active':''}}" value="{{word}}" bindinput="get_word" wx:if="{{type==1}}"/>
<input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" wx:if="{{type==2}}"/>
<view class="submit" catchtap="{{type>1?'add_time':'reject'}}">确认</view>
<image src="/imgs/close.png" class="close" catchtap="change_cover"/>
</view>
</view>
\ No newline at end of file
... ...
/* pages/admin/admin.wxss */
.adminitem{
page {
height: 100%;
}
.adminitem {
display: flex;
align-items: center;
justify-content: space-between;
padding:30rpx 32rpx;
padding: 30rpx 32rpx;
}
.admin_left{
width:60%;
.admin_left {
width: 60%;
display: flex;
align-items: center;
}
.admin_img{
.admin_img {
display: flex;
justify-content: center;
align-items: center;
margin: 0 16rpx 0 0;
width:76rpx;
width: 76rpx;
height: 76rpx;
border-radius: 50%;
overflow: hidden;
}
.admin_img image{
.admin_img image {
display: block;
width:100%;
width: 100%;
height: 100%;
}
.admin_txttitle{
color:#333333;
font-size:28rpx;
.admin_txttitle {
color: #333;
font-size: 28rpx;
}
.admin_txt{
color:#999;
font-size:26rpx;
.admin_txt {
color: #999;
font-size: 26rpx;
}
.admin_rigth{
.admin_rigth {
display: flex;
align-items: center;
flex-direction:row-reverse;
width:40%;
flex-direction: row-reverse;
width: 40%;
}
.admin_buttom{
width:120rpx;
.admin_buttom {
width: 120rpx;
height: 60rpx;
border-radius: 30rpx;
margin: 0 0 0 32rpx;
color:#fff;
color: #fff;
font-size: 26rpx;
background: #CCCCCC;
background: #ccc;
display: flex;
align-items: center;
justify-content: center;
}
.admin_active{
background: #2ED671;
.admin_active {
background: #2ed671;
}
.add_time {
width: 142rpx;
height: 60rpx;
border: 1px solid rgba(46, 214, 113, 1);
border-radius: 30rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(46, 214, 113, 1);
}
.cover_box {
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.3);
}
.show_box {
width: 595rpx;
padding: 0 28rpx 54rpx;
box-sizing: border-box;
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
position: relative;
}
.show_box .s_title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
margin: 74rpx auto 38rpx;
text-align: center;
}
.show_box .word_area {
width: 539rpx;
height: 275rpx;
border: 1px solid rgba(229, 229, 229, 1);
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 204, 204, 1);
padding: 30rpx 36rpx;
box-sizing: border-box;
}
.show_box .active{
height: 85rpx !important;
}
.show_box .submit {
width: 495rpx;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
margin: 56rpx auto 0;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.show_box .close {
width: 26rpx;
height: 26rpx;
color: #ccc;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
position: absolute;
right: 29rpx;
top: 31rpx;
}
... ...
const app=getApp();
const app = getApp();
Page({
/**
... ... @@ -7,16 +6,16 @@ Page({
*/
data: {
//
ifempower:true,//是否授权
showapply:false,
provincearr:[],
cityarr:[],
countryarr:[],
confirmvalarr:[0,0,0],
valarr:[0,0,0],
ifempower: true, //是否授权
showapply: false,
provincearr: [],
cityarr: [],
countryarr: [],
confirmvalarr: [0, 0, 0],
valarr: [0, 0, 0],
photo: '',
name: '',
enddata:'',
enddata: '',
arraysex: ['男', '女'],
sex: '',
birthday: '', //生日
... ... @@ -75,7 +74,7 @@ Page({
],
front_card: '', //身份证正面照
reverse_card: '', //身份证反面照
id:'',//用户id,
id: '', //用户id,
},
setname(e) {
this.setData({
... ... @@ -163,18 +162,18 @@ Page({
politics: politicsarr[e.detail.value]
})
},
// bindtypeChange(e) {
// let typearr = this.data.typearr;
// this.setData({
// type: parseInt(e.detail.value) +1
// })
// },
// bindtypeChange(e) {
// let typearr = this.data.typearr;
// this.setData({
// type: parseInt(e.detail.value) +1
// })
// },
start(e) {
let that = this;
let tem = e.currentTarget.dataset.tem;
app.globalData.userInfo = e.detail.userInfo;
wx.login({
success: function (s) {
success: function(s) {
let url = 'wxapp/public/getSessionKey';
if (s.code) {
var code = s.code;
... ... @@ -182,7 +181,7 @@ Page({
code: code
}
app.post(url, param).then((res) => {
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv,tem);
that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, tem);
}).catch((errMsg) => {
})
... ... @@ -190,7 +189,7 @@ Page({
}
});
},
login(openid, session_key, encrypted_data, iv,tem) {
login(openid, session_key, encrypted_data, iv, tem) {
let that = this;
let param = {
openid: openid,
... ... @@ -202,7 +201,7 @@ Page({
app.post(url, param).then((res) => {
wx.setStorageSync('token', res.token);
that.setData({
ifempower:true
ifempower: true
})
that.uploadImage(tem);
}).catch((errMsg) => {
... ... @@ -211,10 +210,10 @@ Page({
},
//选择省市区
getarea(){
let that=this;
let url ='index/area/index';
app.post(url,{}).then((res)=>{
getarea() {
let that = this;
let url = 'index/area/index';
app.post(url, {}).then((res) => {
let country = res.country;
let tem = {
id: 0,
... ... @@ -232,27 +231,27 @@ Page({
countryarr: temcountry,
provincearr: provincearr
})
if (that.data.is_submit==undefined){
if (that.data.is_submit == undefined) {
that.setData({
ifempower:false
ifempower: false
})
}else if (that.data.is_submit=='1'){
} else if (that.data.is_submit == '1') {
that.getdatalist();
}
}).catch((err)=>{
}).catch((err) => {
})
},
//切换省份获取市和区/县
get_city(province_id=0){
let that=this;
let url ='index/area/get_city';
let params={
get_city(province_id = 0) {
let that = this;
let url = 'index/area/get_city';
let params = {
'province_id': province_id
}
app.post(url, params).then((res)=>{
app.post(url, params).then((res) => {
let country = res.country;
let tem = {
id: 0,
... ... @@ -266,24 +265,24 @@ Page({
cityarr: res.city,
countryarr: temcountry
})
}).catch((err)=>{
}).catch((err) => {
})
},
//切换市获取区/县
get_country(city_id=0){
let that=this;
let url ='index/area/get_country';
let params={
get_country(city_id = 0) {
let that = this;
let url = 'index/area/get_country';
let params = {
'city_id': city_id
}
app.post(url, params).then((res) => {
let country = res.country;
let tem={
id:0,
let tem = {
id: 0,
city_id: res.country[0].city_id,
country_id:0,
country_name:' '
country_id: 0,
country_name: ' '
}
country.push(tem);
let temcountry = country.reverse();
... ... @@ -294,13 +293,13 @@ Page({
})
},
bindChange: function (e) {
let that=this;
bindChange: function(e) {
let that = this;
let valarr = that.data.valarr;
let provincearr = that.data.provincearr;
let cityarr = that.data.cityarr;
const val = e.detail.value;
if (valarr[0] != val[0] ){//改变省
if (valarr[0] != val[0]) { //改变省
let i = val[0];
that.get_city(provincearr[i].province_id);
valarr[0] = val[0];
... ... @@ -309,7 +308,7 @@ Page({
that.setData({
valarr: valarr
})
} else if (valarr[1] != val[1]){//改变市
} else if (valarr[1] != val[1]) { //改变市
let j = val[1];
that.get_country(cityarr[j].city_id);
valarr[1] = val[1];
... ... @@ -317,7 +316,7 @@ Page({
that.setData({
valarr: valarr
})
}else {//改变区
} else { //改变区
valarr[2] = val[2];
that.setData({
valarr: valarr
... ... @@ -325,16 +324,16 @@ Page({
}
},
//取消地区选择
setno(){
let that=this;
setno() {
let that = this;
that.setData({
valarr: that.data.confirmvalarr,
showapply: false
})
},
//确定选择区域
setyes(){
let that=this;
setyes() {
let that = this;
let valarr = that.data.valarr;
let i = valarr[0];
let j = valarr[1];
... ... @@ -348,14 +347,14 @@ Page({
city: cityarr[j].city_name,
county: countryarr[k].country_name,
address: provincearr[i].province_name + cityarr[j].city_name + countryarr[k].country_name,
showapply:false
showapply: false
})
},
setshowapply(){
let that=this;
setshowapply() {
let that = this;
that.setData({
showapply:true
showapply: true
})
},
setshowapply_no() {
... ... @@ -364,10 +363,9 @@ Page({
showapply: false
})
},
void_fun(){
},
bindRegionChange(e){
let that=this;
void_fun() {},
bindRegionChange(e) {
let that = this;
this.setData({
region: e.detail.value,
province: e.detail.value[0],
... ... @@ -430,8 +428,8 @@ Page({
record: record
})
},
uploadImages(e){
let that=this;
uploadImages(e) {
let that = this;
let tem = e.currentTarget.dataset.tem;
that.uploadImage(tem);
... ... @@ -488,72 +486,71 @@ Page({
},
submit() {
let that = this;
let err='';
let err = '';
//匹配中国邮政编码
// var AuglyTest_PostalCode = /^[0-9]\\d{5}$/;
//匹配身份证
var AuglyTest_ID = /\d{15}|\d{18}/;
//验证手机号
var AuglyTest_phone =/^1(3|4|5|6|7|8)\d{9}$/;
var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
//验证腾讯QQ号
var AuglyTest_QQ = /^[1-9]*[1-9][0-9]*$/;
//匹配国内电话号码
var AuglyTest_tel = /(\d{3}-|\d{4}-)?(\d{8}|\d{7})?/;
//email地址
var AuglyTest_email = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (that.data.photo==''){
if (that.data.photo == '') {
err = '请上传您的头像!'
} else if (that.data.name==''){
err='请输入您的姓名!'
} else if (that.data.sex==''){
} else if (that.data.name == '') {
err = '请输入您的姓名!'
} else if (that.data.sex == '') {
err = '请选择您的姓别!';
} else if (that.data.birthday==''){
} else if (that.data.birthday == '') {
err = '请选择您的出生日期!';
} else if (that.data.nation==''){
} else if (that.data.nation == '') {
err = '请选择您的民族!';
} else if (that.data.education==''){
} else if (that.data.education == '') {
err = '请选择您的学历!';
} else if (that.data.politics==''){
} else if (that.data.politics == '') {
err = '请选择您的政治面貌!';
} else if (that.data.unit==''){
err='请填写您的工作单位!';
} else if (that.data.duty==''){
} else if (that.data.unit == '') {
err = '请填写您的工作单位!';
} else if (that.data.duty == '') {
err = '请填写您的职务!';
} else if (that.data.addr==''){
err ='请填写您的通讯地址!';
} else if (that.data.postcode==''){
} else if (that.data.addr == '') {
err = '请填写您的通讯地址!';
} else if (that.data.postcode == '') {
err = '请填写您的邮编!';
} else if (that.data.school==''){
err ='请输入就读/毕业院校!';
} else if (that.data.card_number==''){
} else if (that.data.school == '') {
err = '请输入就读/毕业院校!';
} else if (that.data.card_number == '') {
err = '请输入您的身份证号!';
} else if (!AuglyTest_ID.test(that.data.card_number)){
} else if (!AuglyTest_ID.test(that.data.card_number)) {
err = '请输入正确的身份证号!';
}else if (that.data.move_phone==''){
} else if (that.data.move_phone == '') {
err = '请输入您的移动电话!';
} else if (!AuglyTest_phone.test(that.data.move_phone)){
} else if (!AuglyTest_phone.test(that.data.move_phone)) {
err = '请输入正确的移动电话!';
}else if (that.data.email==''){
} else if (that.data.email == '') {
err = '请输入您的电子邮箱!';
} else if (!AuglyTest_email.test(that.data.email)){
} else if (!AuglyTest_email.test(that.data.email)) {
err = '请输入正确的电子邮箱!';
}else if (that.data.urgency_phone==''){
} else if (that.data.urgency_phone == '') {
err = '请输入紧急联系人及电话!';
} else if (that.data.qq==''){
} else if (that.data.qq == '') {
err = '请输入您的QQ!';
} else if (!AuglyTest_QQ.test(that.data.qq)){
} else if (!AuglyTest_QQ.test(that.data.qq)) {
err = '请输入正确的QQ号!';
}
else if (that.data.address==''){
} else if (that.data.address == '') {
err = '请选择您的服务区域';
} else if(that.data.type==''){
} else if (that.data.type == '') {
err = '请选择您的志愿类别!';
} else if (that.data.front_card==''){
} else if (that.data.front_card == '') {
err = '请上传身份证正面!';
} else if (that.data.reverse_card==''){
} else if (that.data.reverse_card == '') {
err = '请上传身份证反面!';
}
if(err==''){
if (err == '') {
let record = that.data.record;
let record_start_time = [];
let record_end_time = [];
... ... @@ -613,14 +610,13 @@ Page({
duration: 2000
})
setTimeout(function(){
setTimeout(function() {
wx.switchTab({
url: '/pages/my/my'
})
},1000)
}).catch((err) => {
})
}else{
}, 1000)
}).catch((err) => {})
} else {
wx.showToast({
title: err,
icon: 'none',
... ... @@ -628,23 +624,23 @@ Page({
})
}
},
getdatalist(){
let that=this;
let url ='/index/member_center/edit';
let params={
'id':that.data.id
getdatalist() {
let that = this;
let url = '/index/member_center/edit';
let params = {
'id': that.data.id
};
let head={
'XX-Token':wx.getStorageSync('token')
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, head).then((res)=>{
app.post(url, params, head).then((res) => {
let provincearr = that.data.provincearr;
let cityarr = that.data.cityarr;
let countryarr = that.data.countryarr;
let val=[0,0,0];
for (let i=0; i<provincearr.length;i++ ){
if (provincearr[i].province_name == res.province){
val[0]=i;
let val = [0, 0, 0];
for (let i = 0; i < provincearr.length; i++) {
if (provincearr[i].province_name == res.province) {
val[0] = i;
}
}
for (let i = 0; i < cityarr.length; i++) {
... ... @@ -675,7 +671,7 @@ Page({
nation: res.nation,
photo: res.photo,
politics: res.politics,
postcode:res.postcode,
postcode: res.postcode,
province: res.province,
qq: res.qq,
record: res.record,
... ... @@ -686,7 +682,7 @@ Page({
urgency_phone: res.urgency_phone,
type: res.type
})
}).catch((err)=>{
}).catch((err) => {
})
},
... ... @@ -694,10 +690,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that=this;
let that = this;
that.setData({
is_submit: options.is_submit,
id: options.id
id: options.id,
page_type: options.type ? options.type : null
})
let now = new Date();
let time = now.getFullYear() + "-" + ((now.getMonth() + 1) < 10 ? "0" : "") + (now.getMonth() + 1) + "-" + (now.getDate() < 10 ? "0" : "") + now.getDate();
... ...
<view class='avator_box'>
<view class='avator_box' wx:if="{{!page_type}}">
<view class='upimg' bindtap='{{ifempower?"uploadImages":""}}' data-tem='1'>
<button open-type='getUserInfo' bindgetuserinfo='start' class='inofbtn' if='{{!ifempower}}' data-tem='1'></button>
<image src='{{photo}}' wx:if='{{photo}}'></image>
<image src='{{photo}}' wx:if='{{photo}}' mode="aspectFill"></image>
<view class='iconfont icon-xiangji' wx:if='{{!photo}}'></view>
</view>
... ... @@ -14,10 +14,10 @@
<view class='apply_item'>
<view>姓名</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}' disabled="{{page_type}}"></input>
</view>
</view>
<picker bindchange="bindsex" range="{{arraysex}}">
<picker bindchange="bindsex" range="{{arraysex}}" disabled="{{page_type}}">
<view class='apply_item'>
<view>姓别</view>
<view class='apply_item_input'>
... ... @@ -26,7 +26,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindbirthdayChange" end='{{enddata}}'>
<picker mode='date' bindchange="bindbirthdayChange" end='{{enddata}}' disabled="{{page_type}}">
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
... ... @@ -35,7 +35,7 @@
</view>
</view>
</picker>
<picker range='{{nationarr}}' bindchange="bindnationChange">
<picker range='{{nationarr}}' bindchange="bindnationChange" disabled="{{page_type}}">
<view class='apply_item'>
<view>民族</view>
<view class='apply_item_input'>
... ... @@ -44,7 +44,7 @@
</view>
</view>
</picker>
<picker range='{{educationarr}}' bindchange="bindeducationChange">
<picker range='{{educationarr}}' bindchange="bindeducationChange" disabled="{{page_type}}">
<view class='apply_item'>
<view>学历</view>
<view class='apply_item_input'>
... ... @@ -53,7 +53,7 @@
</view>
</view>
</picker>
<picker range='{{politicsarr}}' bindchange="bindpoliticsChange">
<picker range='{{politicsarr}}' bindchange="bindpoliticsChange" disabled="{{page_type}}">
<view class='apply_item'>
<view>政治面貌</view>
<view class='apply_item_input'>
... ... @@ -65,37 +65,37 @@
<view class='apply_item'>
<view>工作单位</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setduty' value='{{duty}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setduty' value='{{duty}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>通讯地址</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setaddr' value='{{addr}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setaddr' value='{{addr}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>邮编</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setpostcode' value='{{postcode}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setpostcode' value='{{postcode}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>就读/毕业院校</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setschool' value='{{school}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setschool' value='{{school}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>身份证号</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}' disabled="{{page_type}}"></input>
</view>
</view>
<!-- <view class='apply_item'>
... ... @@ -107,29 +107,29 @@
<view class='apply_item'>
<view>移动电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}'></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>电子邮箱</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}'></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item big_item'>
<view>紧急联系人及电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='seturgency_phone' value='{{urgency_phone}}'></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='seturgency_phone' value='{{urgency_phone}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>QQ号码</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}'></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item' bindtap='setshowapply'>
<view class='apply_item' bindtap="{{page_type?'':'setshowapply'}}">
<view>服务区域</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
... ... @@ -156,7 +156,7 @@
<view class='apply_cell {{apply_nav==2?"apply_active":""}}' data-apply_nav='2' bindtap='setapply_nav'>个人履历3</view>
</view>
<view class='navbox'>
<picker mode='date' bindchange="bindstartChange">
<picker mode='date' bindchange="bindstartChange" disabled="{{page_type}}">
<view class='apply_item'>
<view>开始时间</view>
<view class='apply_item_input'>
... ... @@ -165,7 +165,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindendChange">
<picker mode='date' bindchange="bindendChange" disabled="{{page_type}}">
<view class='apply_item'>
<view>结束时间</view>
<view class='apply_item_input'>
... ... @@ -177,31 +177,31 @@
<view class='apply_item'>
<view>单位名称</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_unit}}' bindinput='setrecordunit'></input>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_unit}}' bindinput='setrecordunit' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_duty}}' bindinput='setrecordduty'></input>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_duty}}' bindinput='setrecordduty' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>证明人</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_name}}' bindinput='setrecordname'></input>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_name}}' bindinput='setrecordname' disabled="{{page_type}}"></input>
</view>
</view>
<view class='apply_item'>
<view>证明人电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}' bindinput='setrecordphone'></input>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}' bindinput='setrecordphone' disabled="{{page_type}}"></input>
</view>
</view>
</view>
<view class='apply_title'>上传身份证照片</view>
<view class='apply_idbox'>
<view class='apply_idimg' bindtap='uploadImages' data-tem='2'>
<view class='apply_idimg' bindtap="{{page_type?'':'uploadImages'}}" data-tem='2'>
<view class='apply_idimgmain' wx:if='{{!front_card}}'>
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
... ... @@ -210,7 +210,7 @@
</view>
<image src='{{front_card?front_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_fanmian_bg@2x.png"}}'></image>
</view>
<view class='apply_idimg' bindtap='uploadImages' data-tem='3'>
<view class='apply_idimg' bindtap="{{page_type?'':'uploadImages'}}" data-tem='3'>
<view class='apply_idimgmain' wx:if='{{!reverse_card}}'>
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
... ... @@ -220,12 +220,12 @@
<image src='{{reverse_card?reverse_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_zhengmian_bg@2x.png"}}'></image>
</view>
</view>
<view class='apply_bottomtitle'>志愿者申请书
<view class='apply_bottomtitle' wx:if="{{!page_type}}">志愿者申请书
</view>
<view class='apply_bottom'>
<view class='apply_bottom' wx:if="{{!page_type}}">
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view class='apply_btn' bindtap='submit'>
<view class='apply_btn' bindtap='submit' wx:if="{{!page_type}}">
提交
</view>
... ... @@ -245,7 +245,7 @@
<view wx:for="{{countryarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.country_name}}</view>
</picker-view-column>
</picker-view>
<view class='apply_vold_btn'>
<view class='apply_vold_btn' wx:if="{{!page_type}}">
<view class='applybtn' catchtap='setno'>取消</view>
<view class='applybtn yes_applybtn' catchtap='setyes'>确定</view>
</view>
... ...
... ... @@ -46,8 +46,98 @@ Page({
t_type: false,
z_type: false,
e_type: false,
cover_type: false
},
// 审核用户信息是否通过
examine(e){
let that = this
let id = e.currentTarget.dataset.id
let url = 'index/member_center/adminApprove';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.info.id,
status: id
}
app.post(url, params, head).then((res) => {
wx.showToast({
title: '操作成功',
icon: 'success',
duration: 1000,
success: () => {
that.setData({
two_type: true
})
}
})
}).catch((err) => { })
},
//查看工作汇报
look_word(){
if (this.data.info.is_complete !=1){
wx.showToast({
title: '该用户还未提交工作汇报',
icon: 'none'
})
return
}
wx.navigateTo({
url: '/pages/word_report/word_report?id=' + this.data.id + '&user_id=' + this.data.user_id,
})
},
//查看注册信息
look_register(){
wx.navigateTo({
url: '/pages/apply/apply?id=' + this.data.user_id + '&is_submit=' + 1 + '&type=1',
})
},
// 输入信息
get_word(e) {
this.setData({
word: e.detail.value
})
},
// 改变弹窗状态
change_cover(e) {
this.setData({
cover_type: !this.data.cover_type
})
},
// 添加时间
add_time() {
let that = this
if (!that.data.word) {
wx.showToast({
title: '请输入工时',
icon: 'none',
duration: 1000
})
return
}
let url = 'index/member_center/addTime';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
user_id: that.data.user_id,
add_time: that.data.word
}
app.post(url, params, head).then((res) => {
wx.showToast({
title: '操作成功',
icon: 'success',
duration: 1000,
success: () => {
that.setData({
word: null,
cover_type: false
})
}
})
}).catch((err) => { })
},
// 选择参加日期,入住日期,用餐日期
change_date(e) {
let that = this
... ... @@ -297,7 +387,8 @@ Page({
t_type: true,
z_type: true,
e_type: true,
page_type: options.type
page_type: options.type,
user_id: options.user_id ? options.user_id:null
})
}
this.setData({
... ...
... ... @@ -19,7 +19,7 @@
<view class="left">
<image src="/imgs/must.png" /> 工作类型
</view>
<picker range="{{enroll_arr}}" value="{{type}}" bindchange="change_enroll">
<picker range="{{enroll_arr}}" value="{{type}}" bindchange="change_enroll" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{type?type:'请选择'}}</text>
<image src="/imgs/right.png" />
... ... @@ -30,7 +30,7 @@
<view class="left">
<image src="/imgs/must.png" /> 工作内容
</view>
<picker range="{{check_arr}}" value="{{check_item}}" bindchange="change_check">
<picker range="{{check_arr}}" value="{{check_item}}" bindchange="change_check" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right" bindtap="show_cover">
<text>{{check?check:'请选择'}}</text>
<image src="/imgs/right.png" />
... ... @@ -45,7 +45,7 @@
<view class="left">
<image src="/imgs/must.png" /> 参加日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="1">
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="1" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<image src="/imgs/right.png" />
... ... @@ -56,14 +56,14 @@
<view class="left">
<image src="/imgs/must.png" /> 参加时间
</view>
<picker mode="selector" value="{{item.time}}" bindchange="change_time" range="{{time_arr}}" data-index="{{index}}">
<picker mode="selector" value="{{item.time}}" bindchange="change_time" range="{{time_arr}}" data-index="{{index}}" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{item.time?item.time:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="add" bindtap="add_item" data-id="1" wx:if="{{index == t_arr.length -1}}">+添加</view>
<view class="add" bindtap="add_item" data-id="1" wx:if="{{index == t_arr.length -1 && page_type!=0 && page_type!=1}}">+添加</view>
</view>
<view class="info_box" wx:for="{{z_arr}}" wx:key="index">
... ... @@ -74,7 +74,7 @@
<view class="left">
<image src="/imgs/must.png" /> 入住日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="2">
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="2" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<image src="/imgs/right.png" />
... ... @@ -83,9 +83,9 @@
</view>
<view class="item">
<text>入住人身份证号码</text>
<input placeholder="请输入" bindinput="get_card" value="{{item.idcard}}" maxlength="18" data-index="{{index}}"/>
<input placeholder="请输入" bindinput="get_card" value="{{item.idcard}}" maxlength="18" data-index="{{index}}" disabled="{{page_type == 0 || page_type == 1}}" />
</view>
<view class="add" bindtap="add_item" data-id="2" wx:if="{{index == z_arr.length -1}}">+添加</view>
<view class="add" bindtap="add_item" data-id="2" wx:if="{{index == z_arr.length -1 && page_type!=0 && page_type!=1}}">+添加</view>
</view>
<view class="info_box" wx:for="{{e_arr}}" wx:key="index">
... ... @@ -94,7 +94,7 @@
<view class="left">
<image src="/imgs/must.png" /> 用餐日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="3">
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="3" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<image src="/imgs/right.png" />
... ... @@ -103,16 +103,36 @@
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png"/> 用餐时间
<image src="/imgs/must.png" /> 用餐时间
</view>
<picker mode="selector" value="{{item.time}}" bindchange="eat_time" range="{{eat_arr}}" data-index="{{index}}">
<picker mode="selector" value="{{item.time}}" bindchange="eat_time" range="{{eat_arr}}" data-index="{{index}}" disabled="{{page_type == 0 || page_type == 1}}">
<view class="right">
<text>{{item.time?item.time:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1}}">+添加</view>
<view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1 && page_type!=0 && page_type!=1}}">+添加</view>
</view>
<view class="submit" bindtap="submit">确认</view>
\ No newline at end of file
<view class="submit" bindtap="submit" wx:if="{{page_type!=0 && page_type!=1}}">确认</view>
<view class="btn_box" wx:else>
<view class="look_table" catchtap="{{page_type == 1?'look_word':'look_register'}}">{{page_type == 1?'查看工作汇报':'查看注册信息'}}</view>
<view class="fill_time" catchtap="change_cover" wx:if="{{page_type == 1}}">输入工时</view>
<view class="two_btn" wx:if="{{page_type == 0 && !two_type}}">
<view catchtap="examine" data-id="2">不通过</view>
<view catchtap="examine" data-id="1">通过</view>
</view>
</view>
<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}">
<view class="show_box">
<view class="s_title">请输入工时</view>
<input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number"/>
<view class="submit" catchtap="add_time">确认</view>
<image src="/imgs/close.png" class="close" catchtap="change_cover" />
</view>
</view>
\ No newline at end of file
... ...
page {
height: 100%;
padding-bottom: 78rpx;
box-sizing: border-box;
}
... ... @@ -9,9 +10,11 @@ page {
border-bottom: 16rpx solid #f5f6f8;
box-sizing: border-box;
}
.info_box:last-child{
.info_box:last-child {
border-bottom: none !important;
}
.item {
width: 100%;
height: 100rpx;
... ... @@ -25,13 +28,15 @@ page {
border-bottom: 2rpx solid #e6e6e6;
box-sizing: border-box;
}
.item input{
.item input {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
text-align: right;
}
.item:last-child {
border: none;
}
... ... @@ -92,62 +97,121 @@ page {
align-items: center;
}
/* .cover_box {
.submit {
width: 686rpx;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
margin: 90rpx auto 0;
}
.cover_box {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
position: fixed;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.3);
}
.content_box {
.show_box {
width: 595rpx;
padding: 0 28rpx 54rpx;
box-sizing: border-box;
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
padding: 50rpx 32rpx;
box-sizing: border-box;
position: relative;
}
.content_box .w_title {
.show_box .s_title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
margin: 74rpx auto 38rpx;
text-align: center;
margin-top: 24rpx;
}
.w_content {
.show_box .word_area {
width: 539rpx;
height: 275rpx;
border: 1px solid rgba(229, 229, 229, 1);
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 204, 204, 1);
padding: 30rpx 36rpx;
box-sizing: border-box;
}
.show_box .active {
height: 85rpx !important;
}
.show_box .submit {
width: 495rpx;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
margin: 56rpx auto 0;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.show_box .close {
width: 26rpx;
height: 26rpx;
color: #ccc;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
position: absolute;
right: 29rpx;
top: 31rpx;
}
.btn_box {
width: 100%;
margin-top: 50rpx;
margin-top: 226rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
justify-content: center;
}
.w_item {
font-size: 26rpx;
.look_table {
width: 322rpx;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 44rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
padding: 18rpx 22rpx;
border-radius: 10rpx;
margin-bottom: 30rpx;
margin-right: 18rpx;
border: 1px solid #ccc;
}
.w_item:nth-child(2n){
margin-right: 0;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.submit {
.fill_time {
width: 100%;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
... ... @@ -155,19 +219,19 @@ page {
display: flex;
justify-content: center;
align-items: center;
margin-top: 34rpx;
margin-top: 119rpx;
}
.active{
border-color: rgba(65, 205, 121, 1);
color: rgba(255, 255, 255, 1);
background: rgba(65, 205, 121, 1);
} */
.submit {
width: 686rpx;
.two_btn {
width: 100%;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
display: flex;
justify-content: space-between;
}
.two_btn view {
width: 50%;
height: 100%;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
... ... @@ -175,5 +239,11 @@ page {
display: flex;
justify-content: center;
align-items: center;
margin: 90rpx auto 0;
margin-top: 119rpx;
}
.two_btn view:first-child{
background: #CCCCCC;
}
.two_btn view:last-child{
background: #41CD79;
}
\ No newline at end of file
... ...
... ... @@ -12,6 +12,31 @@ Page({
status: '',
cover_type: false
},
//查看更多报名用户信息(审核端)
look_more(e){
wx.navigateTo({
url: '/pages/enroll/enroll?type=' + e.currentTarget.dataset.type + '&id=' + this.data.id + '&user_id=' + e.currentTarget.dataset.user_id
})
},
// 工作内容(管理员)
join_info() {
let that = this;
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url = 'index/member_center/getJoinPerson';
let params = {
id: that.data.id
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
join_info: res
})
}).catch((err) => {
})
},
//保存海报到本地
save_poster(){
wx.downloadFile({
... ... @@ -67,7 +92,7 @@ Page({
// 编辑报名信息
edit_info() {
wx.navigateTo({
url: '/pages/enroll/enroll?id=' + this.data.id + '&type=1'
url: '/pages/enroll/enroll?id=' + this.data.id + '&type=3'
})
},
get_poster() {
... ... @@ -122,6 +147,7 @@ Page({
})
if (that.data.status == '1'){
that.get_poster()
that.join_info()
}
wxParse.wxParse('content', 'html', res.content, that, 5);
}).catch((err) => {
... ... @@ -133,7 +159,7 @@ Page({
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url = '/index/index/news_info';
let url = 'index/index/news_info';
let params = {
id: that.data.id
}
... ...
... ... @@ -8,7 +8,7 @@
<import src="../../wxParse/wxParse.wxml" />
<template is='wxParse' data='{{wxParseData:content.nodes}}' />
</view>
<view class='memberbox' wx:if='{{datalist.join.length>0 && type != 1}}'>
<view class='memberbox' wx:if='{{datalist.join.length>0 && type != 1 && datalist.admin !=1}}'>
<view class='title'>已成功报名人员</view>
<view class='member' wx:for='{{datalist.join}}' wx:key='index'>
<view class="top">
... ... @@ -19,12 +19,11 @@
</view>
</view>
</view>
<view wx:if="{{type!= 1}}">
<view wx:if="{{type!= 1 && datalist.admin !=1}}">
<navigator class='foot' url="/pages/enroll/enroll?id={{id}}" wx:if='{{datalist.button_status == 1}}' hover-class="none">报名</navigator>
<view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view>
<navigator class='foot' wx:if='{{datalist.button_status == 3}}' url="/pages/word_report/word_report?id={{id}}" hover-class="none">签到工作汇报</navigator>
<!-- <navigator class='foot' bindtap='sign' url="/pages/word_report/word_report?id={{id}}" hover-class="none">签到工作汇报</navigator> -->
<view class='foot' wx:if='{{datalist.button_status == 4}}' style='background: #ccc;color: #fff;'>已签到工作汇报</view>
<navigator class='foot' wx:if='{{datalist.button_status == 3}}' url="/pages/word_report/word_report?id={{id}}" hover-class="none">工作汇报</navigator>
<view class='foot' wx:if='{{datalist.button_status == 4}}' style='background: #ccc;color: #fff;'>工作汇报</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}' style='background: #ccc;color: #fff;'>已结束</view>
<navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}'>成为志愿者</navigator>
... ... @@ -32,8 +31,8 @@
<view class="btn_box">
<navigator class="btn-item" style="background: url('/imgs/index.png') no-repeat center;background-size: cover;" url="/pages/index/index" open-type="switchTab">首页</navigator>
<view class="btn-item" style="background: url('{{datalist.button_status == 2?'/imgs/edit.png':'/imgs/edit@.png'}}') no-repeat center;background-size: cover;" bindtap="{{datalist.button_status == 2?'edit_info':''}}" wx:if="{{1<datalist.button_status<6}}">编辑</view>
<view class="btn-item" style="background: url('{{datalist.button_status == 5?'/imgs/out@.png':'/imgs/out.png'}}') no-repeat center;background-size: cover;" wx:if="{{2<datalist.button_status<6}}" bindtap="change_cover" data-id="1">退出</view>
<view class="btn-item" style="background: url('{{datalist.button_status == 2?'/imgs/edit.png':'/imgs/edit@.png'}}') no-repeat center;background-size: cover;" bindtap="{{datalist.button_status == 2?'edit_info':''}}" wx:if="{{1<datalist.button_status<6 && datalist.admin !=1}}">编辑</view>
<view class="btn-item" style="background: url('{{datalist.button_status == 5?'/imgs/out@.png':'/imgs/out.png'}}') no-repeat center;background-size: cover;" wx:if="{{2<datalist.button_status<6 && datalist.admin !=1}}" bindtap="change_cover" data-id="1">退出</view>
<view class="btn-item" style="background: url('/imgs/share.png') no-repeat center;background-size: cover;" bindtap="change_cover" data-id="2">分享</view>
</view>
... ... @@ -52,3 +51,71 @@
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.camera.length>0}}">
<view class="c_title">摄影(设备自带</view>
<view class="c_box">
<view class="i_info {{join_info.camera.length>3 && index<join_info.camera.length-2?'line':''}}" wx:for="{{join_info.camera}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.photo.length>0}}">
<view class="c_title">摄像(设备自带</view>
<view class="c_box">
<view class="i_info {{join_info.photo.length>3 && index<join_info.photo.length-2?'line':''}}" wx:for="{{join_info.photo}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.motorcade.length>0}}">
<view class="c_title">爱心车队</view>
<view class="c_box">
<view class="i_info {{join_info.motorcade.length>3 && index<join_info.motorcade.length-2?'line':''}}" wx:for="{{join_info.motorcade}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.question.length>0}}">
<view class="c_title">线上答疑</view>
<view class="c_box">
<view class="i_info {{join_info.question.length>3 && index<join_info.question.length-2?'line':''}}" wx:for="{{join_info.question}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.ill.length>0}}">
<view class="c_title">门诊服务</view>
<view class="c_box">
<view class="i_info {{join_info.ill.length>3 && index<join_info.ill.length-2?'line':''}}" wx:for="{{join_info.ill}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
<view class="c_item" wx:if="{{join_info.ill.service>0}}">
<view class="c_title">现场服务(签到、指引、礼仪等</view>
<view class="c_box">
<view class="i_info {{join_info.service.length>3 && index<join_info.service.length-2?'line':''}}" wx:for="{{join_info.service}}" wx:key="index" data-type="{{item.status =='已通过'?'1':0}}" data-user_id="{{item.user_id}}" bindtap="look_more">
<image src="{{item.photo}}" mode="aspectFill" />
<view class="name">李强</view>
<view class="status" wx:if="{{item.status =='已通过'}}" style="background: #41CD79;">已通过</view>
<view class="status" wx:else style="background: #F84141;">未通过</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -229,3 +229,68 @@ page {
height: 952rpx;
border-radius: 10rpx;
}
.c_item {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
border-bottom: 16rpx solid #f5f6f8;
}
.c_item:last-child {
border-bottom: none;
}
.c_item .c_title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
border-left: 4rpx solid #21ae59;
padding-left: 13rpx;
margin-top: 44rpx;
box-sizing: border-box;
}
.c_box {
width: 100%;
margin-top: 21rpx;
display: flex;
flex-wrap: wrap;
}
.i_info {
width: 33.333%;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 28rpx 48rpx;
box-sizing: border-box;
}
.i_info image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
}
.i_info .name {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
margin: 14rpx 0;
}
.i_info .status {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
padding: 10rpx 14rpx;
}
.line {
border-bottom: 1px solid #e6e6e6;
}
... ...
... ... @@ -21,7 +21,7 @@
<navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{item.thumbnail}}'> </image>
<image src='{{item.thumbnail}}' mode="aspectFill"> </image>
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
... ...
... ... @@ -23,10 +23,10 @@ Page({
})
},
goamdin() {
let that = this;
// 管理员
goamdin(e) {
wx.navigateTo({
url: '/pages/admin/admin'
url: '/pages/admin/admin?type=' + e.currentTarget.dataset.type
})
},
... ...
<!--pages/my/my.wxml-->
<view class='my_head'>
<image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image>
<view class='my_headitem'>
... ... @@ -47,10 +47,18 @@
</view>
<view class='iconfont icon-xiangyou'></view>
</navigator>
<view class='my_item' bindtap='goamdin' wx:if='{{datalist.type=="2"}}'>
<view class='my_item' bindtap='goamdin' wx:if='{{datalist.type=="2"}}' data-type="1">
<view class='my_itemletf'>
<view class='iconfont icon-gongzhang'></view>管理员审核
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
<view class='my_item' bindtap='goamdin' wx:if='{{datalist.type=="2"}}' data-type="2">
<view class='my_itemletf'>
<image src="/imgs/time.png" class="time"/>志愿者工时管理
</view>
<view class='iconfont icon-xiangyou'></view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -80,6 +80,12 @@
left: -10rpx;
top: 0;
}
.my_itemletf .time{
width: 34rpx;
height: 32rpx;
margin-right: 30rpx;
left: 0;
}
.my_itemletf .iconfont {
font-size: 40rpx;
color: #fa8286;
... ...
... ... @@ -4,7 +4,7 @@
<navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{item.thumbnail}}'> </image>
<image src='{{item.thumbnail}}' mode="aspectFill"> </image>
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
... ...
... ... @@ -60,6 +60,9 @@ Page({
let params = {
id: id
}
if (this.data.user_id){
params.user_id = this.data.user_id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
... ... @@ -117,8 +120,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
id: options.id
id: options.id,
user_id: options.user_id ? options.user_id:null
})
this.get_info(options.id)
},
... ...