作者 niufei

11

@@ -59,7 +59,7 @@ Page({ @@ -59,7 +59,7 @@ Page({
59 // 审核用户信息是否通过 59 // 审核用户信息是否通过
60 examine(e){ 60 examine(e){
61 let that = this 61 let that = this
62 - let id = e.currentTarget.dataset.id 62 + let id = that.data.btn_type?2:e.currentTarget.dataset.id
63 let url = 'index/member_center/adminApprove'; 63 let url = 'index/member_center/adminApprove';
64 let head = { 64 let head = {
65 'XX-Token': wx.getStorageSync('token') 65 'XX-Token': wx.getStorageSync('token')
@@ -68,6 +68,9 @@ Page({ @@ -68,6 +68,9 @@ Page({
68 id: that.data.info.id, 68 id: that.data.info.id,
69 status: id 69 status: id
70 } 70 }
  71 + if (that.data.btn_type){
  72 + params.refund_reason = that.data.word
  73 + }
71 app.post(url, params, head).then((res) => { 74 app.post(url, params, head).then((res) => {
72 wx.showToast({ 75 wx.showToast({
73 title: '操作成功', 76 title: '操作成功',
@@ -75,7 +78,8 @@ Page({ @@ -75,7 +78,8 @@ Page({
75 duration: 1000, 78 duration: 1000,
76 success: () => { 79 success: () => {
77 that.setData({ 80 that.setData({
78 - two_type: true 81 + two_type: true ,
  82 + cover_type: false
79 }) 83 })
80 } 84 }
81 }) 85 })
@@ -110,7 +114,8 @@ Page({ @@ -110,7 +114,8 @@ Page({
110 // 改变弹窗状态 114 // 改变弹窗状态
111 change_cover(e) { 115 change_cover(e) {
112 this.setData({ 116 this.setData({
113 - cover_type: !this.data.cover_type 117 + cover_type: !this.data.cover_type,
  118 + btn_type: e.currentTarget.dataset.id?true:false
114 }) 119 })
115 }, 120 },
116 // 添加时间 121 // 添加时间
@@ -352,7 +357,7 @@ Page({ @@ -352,7 +357,7 @@ Page({
352 357
353 358
354 //信息判断过滤 359 //信息判断过滤
355 - submit() { 360 + submit(e) {
356 let that = this 361 let that = this
357 if (!that.data.type_id) { 362 if (!that.data.type_id) {
358 wx.showToast({ 363 wx.showToast({
@@ -389,14 +394,18 @@ Page({ @@ -389,14 +394,18 @@ Page({
389 }) 394 })
390 return 395 return
391 } 396 }
392 - that.push() 397 + that.push(e.detail.formId)
393 }, 398 },
394 //提交 399 //提交
395 - push() { 400 + push(form_id) {
  401 + wx.showLoading({
  402 + title: '提交中',
  403 + })
396 let that = this 404 let that = this
397 - let url = that.data.page_type ?'index/index/editApply ':'index/index/applyJoin' 405 + let url = that.data.page_type ?'index/index/editApply':'index/index/applyJoin'
398 let params = { 406 let params = {
399 id: that.data.id, 407 id: that.data.id,
  408 + form_id: form_id,
400 type: that.data.type_id, 409 type: that.data.type_id,
401 work_content: that.data.check_id, 410 work_content: that.data.check_id,
402 select_time: JSON.stringify(that.data.t_arr), 411 select_time: JSON.stringify(that.data.t_arr),
@@ -407,6 +416,7 @@ Page({ @@ -407,6 +416,7 @@ Page({
407 'XX-Token': wx.getStorageSync('token') 416 'XX-Token': wx.getStorageSync('token')
408 } 417 }
409 app.post(url, params, header).then((res) => { 418 app.post(url, params, header).then((res) => {
  419 + wx.hideLoading()
410 wx.showToast({ 420 wx.showToast({
411 title: '报名成功', 421 title: '报名成功',
412 duration: 1000, 422 duration: 1000,
@@ -421,6 +431,32 @@ Page({ @@ -421,6 +431,32 @@ Page({
421 }) 431 })
422 }) 432 })
423 }, 433 },
  434 +
  435 + //管理员端的信息
  436 + adimin_info(id){
  437 + let url = 'index/member_center/adminGetApplyInfo'
  438 + let params = {
  439 + join_id: id
  440 + }
  441 + let header = {
  442 + 'XX-Token': wx.getStorageSync('token')
  443 + }
  444 + app.post(url, params, header).then((res) => {
  445 + this.setData({
  446 + info: res,
  447 + date_arr: res.time, //活动日期
  448 + type_id: res.work_type ? res.work_type : null,
  449 + type: res.work_type ? this.data.enroll_arr[Number(res.work_type) - 1] : null,
  450 + check_id: res.work_content ? res.work_content : null,
  451 + check: res.work_content ? this.data.check_arr[Number(res.work_content) - 1] : null,
  452 + t_arr: res.select_time ? res.select_time : this.data.t_arr,
  453 + z_arr: res.apply_stay ? res.apply_stay : this.data.z_arr,
  454 + e_arr: res.apply_food ? res.apply_food : this.data.e_arr,
  455 + t_type: res.select_time ? true : false
  456 + })
  457 +
  458 + })
  459 + },
424 /** 460 /**
425 * 生命周期函数--监听页面加载 461 * 生命周期函数--监听页面加载
426 */ 462 */
@@ -436,7 +472,12 @@ Page({ @@ -436,7 +472,12 @@ Page({
436 status: options.status ? options.status : null, 472 status: options.status ? options.status : null,
437 user_id: options.user_id ? options.user_id : null 473 user_id: options.user_id ? options.user_id : null
438 }) 474 })
439 - this.get_info(options.id) 475 + if (options.join_id){
  476 + this.adimin_info(options.join_id)
  477 + } else {
  478 + this.get_info(options.id)
  479 + }
  480 +
440 }, 481 },
441 482
442 /** 483 /**
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 41
42 <view class="info_box" wx:for="{{t_arr}}" wx:key="index"> 42 <view class="info_box" wx:for="{{t_arr}}" wx:key="index">
43 <view class="tilte">选择日期 43 <view class="tilte">选择日期
44 - <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"/> 44 + <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" />
45 </view> 45 </view>
46 <view class="item"> 46 <view class="item">
47 <view class="left"> 47 <view class="left">
@@ -70,8 +70,10 @@ @@ -70,8 +70,10 @@
70 70
71 <view class="info_box" wx:for="{{z_arr}}" wx:key="index"> 71 <view class="info_box" wx:for="{{z_arr}}" wx:key="index">
72 <view class="tilte"> 72 <view class="tilte">
73 - <view> 申请入住<text>*仅限工作人员本人</text></view>  
74 - <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"/> 73 + <view> 申请入住
  74 + <text>*仅限工作人员本人</text>
  75 + </view>
  76 + <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" />
75 </view> 77 </view>
76 <view class="item"> 78 <view class="item">
77 <view class="left"> 79 <view class="left">
@@ -93,7 +95,7 @@ @@ -93,7 +95,7 @@
93 95
94 <view class="info_box" wx:for="{{e_arr}}" wx:key="index"> 96 <view class="info_box" wx:for="{{e_arr}}" wx:key="index">
95 <view class="tilte">申请用餐 97 <view class="tilte">申请用餐
96 - <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"/> 98 + <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" />
97 </view> 99 </view>
98 <view class="item"> 100 <view class="item">
99 <view class="left"> 101 <view class="left">
@@ -119,25 +121,30 @@ @@ -119,25 +121,30 @@
119 </view> 121 </view>
120 <view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1 && !status}}">+添加</view> 122 <view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1 && !status}}">+添加</view>
121 </view> 123 </view>
  124 +<form wx:if="{{!status}}" bindsubmit="submit" report-submit='true' class="submit">
  125 + <button class="submit" form-type="submit" style="margin:0;padding:0;">确认</button>
  126 +</form>
122 127
123 -<view class="submit" bindtap="submit" wx:if="{{!status}}">确认</view>  
124 128
125 <view class="btn_box" wx:else> 129 <view class="btn_box" wx:else>
126 <view class="look_table" catchtap="{{status == 1 || status == 3?'look_word':'look_register'}}">{{status == 1 || status == 3?'查看工作汇报':'查看注册信息'}}</view> 130 <view class="look_table" catchtap="{{status == 1 || status == 3?'look_word':'look_register'}}">{{status == 1 || status == 3?'查看工作汇报':'查看注册信息'}}</view>
127 131
128 <view class="fill_time" catchtap="change_cover" wx:if="{{status == 1 || status == 3}}">输入工时</view> 132 <view class="fill_time" catchtap="change_cover" wx:if="{{status == 1 || status == 3}}">输入工时</view>
129 <view class="two_btn" wx:if="{{status == 0 && !two_type}}"> 133 <view class="two_btn" wx:if="{{status == 0 && !two_type}}">
130 - <view catchtap="examine" data-id="2">不通过</view> 134 + <view catchtap="change_cover" data-id="2">不通过</view>
131 <view catchtap="examine" data-id="1">通过</view> 135 <view catchtap="examine" data-id="1">通过</view>
132 </view> 136 </view>
133 </view> 137 </view>
134 -<view class="line" wx:if="{{!status}}"/> 138 +<view class="line" wx:if="{{!status}}" />
135 139
136 -<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}" style=" bottom: {{input_bottom}}px;"> 140 +<view class="cover_box" catchtouchmove="true" wx:if="{{cover_type}}" style=" bottom: {{input_bottom}}px;">
137 <view class="show_box"> 141 <view class="show_box">
138 - <view class="s_title">请输入工时</view>  
139 - <input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus'/>  
140 - <view class="submit" catchtap="add_time">确认</view> 142 + <view class="s_title">{{btn_type?'请输入未通过理由':'请输入工时'}}</view>
  143 +
  144 + <textarea placeholder="请输入..." class="word_area" value="{{word}}" bindinput="get_word" wx:if="{{btn_type}}" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' />
  145 +
  146 + <input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' wx:else/>
  147 + <view class="submit" catchtap="{{btn_type?'examine':'add_time'}}">确认</view>
141 <image src="/imgs/close.png" class="close" catchtap="change_cover" /> 148 <image src="/imgs/close.png" class="close" catchtap="change_cover" />
142 </view> 149 </view>
143 </view> 150 </view>
@@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
15 //查看更多报名用户信息(审核端) 15 //查看更多报名用户信息(审核端)
16 look_more(e){ 16 look_more(e){
17 wx.navigateTo({ 17 wx.navigateTo({
18 - url: '/pages/enroll/enroll?status=' + e.currentTarget.dataset.status + '&id=' + this.data.id + '&user_id=' + e.currentTarget.dataset.user_id 18 + 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
19 }) 19 })
20 }, 20 },
21 // 工作内容(管理员) 21 // 工作内容(管理员)
@@ -213,6 +213,7 @@ Page({ @@ -213,6 +213,7 @@ Page({
213 * 生命周期函数--监听页面加载 213 * 生命周期函数--监听页面加载
214 */ 214 */
215 onLoad: function(options) { 215 onLoad: function(options) {
  216 + console.log(options)
216 let that = this 217 let that = this
217 if (options.scene){ 218 if (options.scene){
218 wx.setNavigationBarTitle({ 219 wx.setNavigationBarTitle({
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 <view class="c_item" wx:for="{{join_info}}" wx:key="index"> 56 <view class="c_item" wx:for="{{join_info}}" wx:key="index">
57 <view class="c_title">{{item.title}}</view> 57 <view class="c_title">{{item.title}}</view>
58 <view class="c_box"> 58 <view class="c_box">
59 - <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"> 59 + <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">
60 <image src="{{zitem.photo}}" mode="aspectFill" /> 60 <image src="{{zitem.photo}}" mode="aspectFill" />
61 <view class="name">{{zitem.name}}</view> 61 <view class="name">{{zitem.name}}</view>
62 <view class="status {{zitem.status>1?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view> 62 <view class="status {{zitem.status>1?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view>
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 <view class='title activity_title'>活动回顾</view> 66 <view class='title activity_title'>活动回顾</view>
67 67
68 <view class="review_box"> 68 <view class="review_box">
69 - <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"> 69 + <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">
70 <view class="r_left"> 70 <view class="r_left">
71 <view class="r_title">{{item.activity_name}}</view> 71 <view class="r_title">{{item.activity_name}}</view>
72 <view class="r_info"> 72 <view class="r_info">
@@ -142,6 +142,7 @@ @@ -142,6 +142,7 @@
142 } 142 }
143 143
144 .new_title { 144 .new_title {
  145 + height: 76rpx;
145 overflow: hidden; 146 overflow: hidden;
146 text-overflow: ellipsis; 147 text-overflow: ellipsis;
147 display: -webkit-box; 148 display: -webkit-box;
1 -// pages/result/result.js  
2 -const app=getApp(); 1 +const app = getApp();
3 Page({ 2 Page({
4 3
5 - /**  
6 - * 页面的初始数据  
7 - */  
8 - data: {  
9 - datalist:''  
10 - },  
11 - getdatalist(){  
12 - let that=this;  
13 - let url ='index/member_center/status';  
14 - let head={  
15 - 'XX-Token':wx.getStorageSync('token')  
16 - }  
17 - app.post(url, {}, head).then((res)=>{  
18 - that.setData({  
19 - datalist:res  
20 - })  
21 - }).catch((err)=>{  
22 -  
23 - })  
24 -  
25 - },  
26 - goindex(){  
27 - wx.switchTab({  
28 - url: '/pages/index/index'  
29 - })  
30 - },  
31 -  
32 - /**  
33 - * 生命周期函数--监听页面加载  
34 - */  
35 - onLoad: function (options) {  
36 -  
37 - },  
38 -  
39 - /**  
40 - * 生命周期函数--监听页面初次渲染完成  
41 - */  
42 - onReady: function () {  
43 -  
44 - },  
45 -  
46 - /**  
47 - * 生命周期函数--监听页面显示  
48 - */  
49 - onShow: function () {  
50 - let that=this;  
51 - that.getdatalist();  
52 -  
53 - },  
54 -  
55 - /**  
56 - * 生命周期函数--监听页面隐藏  
57 - */  
58 - onHide: function () {  
59 -  
60 - },  
61 -  
62 - /**  
63 - * 生命周期函数--监听页面卸载  
64 - */  
65 - onUnload: function () {  
66 -  
67 - },  
68 -  
69 - /**  
70 - * 页面相关事件处理函数--监听用户下拉动作  
71 - */  
72 - onPullDownRefresh: function () {  
73 -  
74 - },  
75 -  
76 - /**  
77 - * 页面上拉触底事件的处理函数  
78 - */  
79 - onReachBottom: function () {  
80 -  
81 - },  
82 -  
83 - /**  
84 - * 用户点击右上角分享  
85 - */  
86 - onShareAppMessage: function () {  
87 -  
88 - } 4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + datalist: ''
  9 + },
  10 + getdatalist() {
  11 + let that = this;
  12 + let url = 'index/member_center/status';
  13 + let head = {
  14 + 'XX-Token': wx.getStorageSync('token')
  15 + }
  16 + app.post(url, {}, head).then((res) => {
  17 + that.setData({
  18 + datalist: res
  19 + })
  20 + }).catch((err) => {
  21 +
  22 + })
  23 +
  24 + },
  25 + goindex() {
  26 + wx.switchTab({
  27 + url: '/pages/index/index'
  28 + })
  29 + },
  30 +
  31 + /**
  32 + * 生命周期函数--监听页面加载
  33 + */
  34 + onLoad: function(options) {
  35 +
  36 + },
  37 +
  38 + /**
  39 + * 生命周期函数--监听页面初次渲染完成
  40 + */
  41 + onReady: function() {
  42 +
  43 + },
  44 +
  45 + /**
  46 + * 生命周期函数--监听页面显示
  47 + */
  48 + onShow: function() {
  49 + let that = this;
  50 + that.getdatalist();
  51 +
  52 + },
  53 +
  54 + /**
  55 + * 生命周期函数--监听页面隐藏
  56 + */
  57 + onHide: function() {
  58 +
  59 + },
  60 +
  61 + /**
  62 + * 生命周期函数--监听页面卸载
  63 + */
  64 + onUnload: function() {
  65 +
  66 + },
  67 +
  68 + /**
  69 + * 页面相关事件处理函数--监听用户下拉动作
  70 + */
  71 + onPullDownRefresh: function() {
  72 +
  73 + },
  74 +
  75 + /**
  76 + * 页面上拉触底事件的处理函数
  77 + */
  78 + onReachBottom: function() {
  79 +
  80 + },
  81 +
  82 + /**
  83 + * 用户点击右上角分享
  84 + */
  85 + onShareAppMessage: function() {
  86 +
  87 + }
89 }) 88 })
1 -<!--pages/result/result.wxml--> 1 +
2 <view wx:if='{{datalist==""}}'> 2 <view wx:if='{{datalist==""}}'>
3 <view class='resultimg'> 3 <view class='resultimg'>
4 <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image> 4 <image src='https://volunteer.cnpu.org/imgs/dengdaishenhe@2x.png'></image>