作者 niufei

11

... ... @@ -59,7 +59,7 @@ Page({
// 审核用户信息是否通过
examine(e){
let that = this
let id = e.currentTarget.dataset.id
let id = that.data.btn_type?2:e.currentTarget.dataset.id
let url = 'index/member_center/adminApprove';
let head = {
'XX-Token': wx.getStorageSync('token')
... ... @@ -68,6 +68,9 @@ Page({
id: that.data.info.id,
status: id
}
if (that.data.btn_type){
params.refund_reason = that.data.word
}
app.post(url, params, head).then((res) => {
wx.showToast({
title: '操作成功',
... ... @@ -75,7 +78,8 @@ Page({
duration: 1000,
success: () => {
that.setData({
two_type: true
two_type: true ,
cover_type: false
})
}
})
... ... @@ -110,7 +114,8 @@ Page({
// 改变弹窗状态
change_cover(e) {
this.setData({
cover_type: !this.data.cover_type
cover_type: !this.data.cover_type,
btn_type: e.currentTarget.dataset.id?true:false
})
},
// 添加时间
... ... @@ -352,7 +357,7 @@ Page({
//信息判断过滤
submit() {
submit(e) {
let that = this
if (!that.data.type_id) {
wx.showToast({
... ... @@ -389,14 +394,18 @@ Page({
})
return
}
that.push()
that.push(e.detail.formId)
},
//提交
push() {
push(form_id) {
wx.showLoading({
title: '提交中',
})
let that = this
let url = that.data.page_type ?'index/index/editApply ':'index/index/applyJoin'
let url = that.data.page_type ?'index/index/editApply':'index/index/applyJoin'
let params = {
id: that.data.id,
form_id: form_id,
type: that.data.type_id,
work_content: that.data.check_id,
select_time: JSON.stringify(that.data.t_arr),
... ... @@ -407,6 +416,7 @@ Page({
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
wx.hideLoading()
wx.showToast({
title: '报名成功',
duration: 1000,
... ... @@ -421,6 +431,32 @@ Page({
})
})
},
//管理员端的信息
adimin_info(id){
let url = 'index/member_center/adminGetApplyInfo'
let params = {
join_id: id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
this.setData({
info: res,
date_arr: res.time, //活动日期
type_id: res.work_type ? res.work_type : null,
type: res.work_type ? this.data.enroll_arr[Number(res.work_type) - 1] : null,
check_id: res.work_content ? res.work_content : null,
check: res.work_content ? this.data.check_arr[Number(res.work_content) - 1] : null,
t_arr: res.select_time ? res.select_time : this.data.t_arr,
z_arr: res.apply_stay ? res.apply_stay : this.data.z_arr,
e_arr: res.apply_food ? res.apply_food : this.data.e_arr,
t_type: res.select_time ? true : false
})
})
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -436,7 +472,12 @@ Page({
status: options.status ? options.status : null,
user_id: options.user_id ? options.user_id : null
})
this.get_info(options.id)
if (options.join_id){
this.adimin_info(options.join_id)
} else {
this.get_info(options.id)
}
},
/**
... ...
... ... @@ -41,7 +41,7 @@
<view class="info_box" wx:for="{{t_arr}}" wx:key="index">
<view class="tilte">选择日期
<image class="del" src="/imgs/del.png" wx:if="{{t_arr.length>1 && index == t_arr.length-1}}" data-index="{{index}}" data-status="1" catchtap="del"/>
<image class="del" src="/imgs/del.png" wx:if="{{t_arr.length>1 && index == t_arr.length-1 && !status}}" data-index="{{index}}" data-status="1" catchtap="del" />
</view>
<view class="item">
<view class="left">
... ... @@ -70,8 +70,10 @@
<view class="info_box" wx:for="{{z_arr}}" wx:key="index">
<view class="tilte">
<view> 申请入住<text>*仅限工作人员本人</text></view>
<image class="del" src="/imgs/del.png" wx:if="{{z_arr.length>1 && index == z_arr.length-1}}" data-index="{{index}}" data-status="2" catchtap="del"/>
<view> 申请入住
<text>*仅限工作人员本人</text>
</view>
<image class="del" src="/imgs/del.png" wx:if="{{z_arr.length>1 && index == z_arr.length-1 && !status}}" data-index="{{index}}" data-status="2" catchtap="del" />
</view>
<view class="item">
<view class="left">
... ... @@ -93,7 +95,7 @@
<view class="info_box" wx:for="{{e_arr}}" wx:key="index">
<view class="tilte">申请用餐
<image class="del" src="/imgs/del.png" wx:if="{{e_arr.length>1 && index == e_arr.length-1}}" data-index="{{index}}" data-status="3" catchtap="del"/>
<image class="del" src="/imgs/del.png" wx:if="{{e_arr.length>1 && index == e_arr.length-1 && !status}}" data-index="{{index}}" data-status="3" catchtap="del" />
</view>
<view class="item">
<view class="left">
... ... @@ -119,25 +121,30 @@
</view>
<view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1 && !status}}">+添加</view>
</view>
<form wx:if="{{!status}}" bindsubmit="submit" report-submit='true' class="submit">
<button class="submit" form-type="submit" style="margin:0;padding:0;">确认</button>
</form>
<view class="submit" bindtap="submit" wx:if="{{!status}}">确认</view>
<view class="btn_box" wx:else>
<view class="look_table" catchtap="{{status == 1 || status == 3?'look_word':'look_register'}}">{{status == 1 || status == 3?'查看工作汇报':'查看注册信息'}}</view>
<view class="fill_time" catchtap="change_cover" wx:if="{{status == 1 || status == 3}}">输入工时</view>
<view class="two_btn" wx:if="{{status == 0 && !two_type}}">
<view catchtap="examine" data-id="2">不通过</view>
<view catchtap="change_cover" data-id="2">不通过</view>
<view catchtap="examine" data-id="1">通过</view>
</view>
</view>
<view class="line" wx:if="{{!status}}"/>
<view class="line" wx:if="{{!status}}" />
<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}" style=" bottom: {{input_bottom}}px;">
<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}" style=" bottom: {{input_bottom}}px;">
<view class="show_box">
<view class="s_title">请输入工时</view>
<input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus'/>
<view class="submit" catchtap="add_time">确认</view>
<view class="s_title">{{btn_type?'请输入未通过理由':'请输入工时'}}</view>
<textarea placeholder="请输入..." class="word_area" value="{{word}}" bindinput="get_word" wx:if="{{btn_type}}" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' />
<input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' wx:else/>
<view class="submit" catchtap="{{btn_type?'examine':'add_time'}}">确认</view>
<image src="/imgs/close.png" class="close" catchtap="change_cover" />
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@ Page({
//查看更多报名用户信息(审核端)
look_more(e){
wx.navigateTo({
url: '/pages/enroll/enroll?status=' + e.currentTarget.dataset.status + '&id=' + this.data.id + '&user_id=' + e.currentTarget.dataset.user_id
url: '/pages/enroll/enroll?status=' + e.currentTarget.dataset.status + '&id=' + this.data.id + '&user_id=' + e.currentTarget.dataset.user_id + '&join_id=' + e.currentTarget.dataset.join_id
})
},
// 工作内容(管理员)
... ... @@ -213,6 +213,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
let that = this
if (options.scene){
wx.setNavigationBarTitle({
... ...
... ... @@ -56,7 +56,7 @@
<view class="c_item" wx:for="{{join_info}}" wx:key="index">
<view class="c_title">{{item.title}}</view>
<view class="c_box">
<view class="i_info {{item.arr.length>3 && zindex<item.arr.length-1?'line':''}}" wx:for="{{item.arr}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex" data-status="{{zitem.status}}" data-user_id="{{zitem.user_id}}" bindtap="look_more">
<view class="i_info {{item.arr.length>3 && zindex<item.arr.length-1?'line':''}}" wx:for="{{item.arr}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex" data-status="{{zitem.status}}" data-user_id="{{zitem.user_id}}" data-join_id="{{zitem.id}}" bindtap="look_more">
<image src="{{zitem.photo}}" mode="aspectFill" />
<view class="name">{{zitem.name}}</view>
<view class="status {{zitem.status>1?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view>
... ...
... ... @@ -66,7 +66,7 @@
<view class='title activity_title'>活动回顾</view>
<view class="review_box">
<navigator class="r_item" wx:for='{{news}}' wx:key="index" url='/pages/img_txt/img_txt?id={{item.id}}&status=1&type=1' hover-class="none">
<navigator class="r_item" wx:for='{{news}}' wx:key="index" url='/pages/img_txt/img_txt?id={{item.id}}&status=2&type=1' hover-class="none">
<view class="r_left">
<view class="r_title">{{item.activity_name}}</view>
<view class="r_info">
... ...
... ... @@ -142,6 +142,7 @@
}
.new_title {
height: 76rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
... ...
// pages/result/result.js
const app=getApp();
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
datalist:''
},
getdatalist(){
let that=this;
let url ='index/member_center/status';
let head={
'XX-Token':wx.getStorageSync('token')
}
app.post(url, {}, head).then((res)=>{
that.setData({
datalist:res
})
}).catch((err)=>{
})
},
goindex(){
wx.switchTab({
url: '/pages/index/index'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that=this;
that.getdatalist();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
/**
* 页面的初始数据
*/
data: {
datalist: ''
},
getdatalist() {
let that = this;
let url = 'index/member_center/status';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
that.setData({
datalist: res
})
}).catch((err) => {
})
},
goindex() {
wx.switchTab({
url: '/pages/index/index'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.getdatalist();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--pages/result/result.wxml-->
<view wx:if='{{datalist==""}}'>
<view class='resultimg'>
<image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image>
... ...