正在显示
9 个修改的文件
包含
57 行增加
和
28 行删除
zhiyuanzhe/imgs/icon_59.png
0 → 100644
4.6 KB
@@ -10,22 +10,22 @@ Page({ | @@ -10,22 +10,22 @@ Page({ | ||
10 | datalist: [], | 10 | datalist: [], |
11 | pageNum: 10, | 11 | pageNum: 10, |
12 | cover_type: false, | 12 | cover_type: false, |
13 | - input_bottom:0 | 13 | + input_bottom: 0 |
14 | }, | 14 | }, |
15 | // 获取到焦点 | 15 | // 获取到焦点 |
16 | - focus: function (e) { | 16 | + focus: function(e) { |
17 | this.setData({ | 17 | this.setData({ |
18 | input_bottom: 100 | 18 | input_bottom: 100 |
19 | }) | 19 | }) |
20 | }, | 20 | }, |
21 | 21 | ||
22 | // 失去焦点 | 22 | // 失去焦点 |
23 | - no_focus: function (e) { | 23 | + no_focus: function(e) { |
24 | this.setData({ | 24 | this.setData({ |
25 | input_bottom: 0 | 25 | input_bottom: 0 |
26 | }) | 26 | }) |
27 | }, | 27 | }, |
28 | -// 输入信息 | 28 | + // 输入信息 |
29 | get_word(e) { | 29 | get_word(e) { |
30 | this.setData({ | 30 | this.setData({ |
31 | word: e.detail.value | 31 | word: e.detail.value |
@@ -33,7 +33,7 @@ Page({ | @@ -33,7 +33,7 @@ Page({ | ||
33 | }, | 33 | }, |
34 | // 改变弹窗状态 | 34 | // 改变弹窗状态 |
35 | change_cover(e) { | 35 | change_cover(e) { |
36 | - if (e.currentTarget.dataset.id){ | 36 | + if (e.currentTarget.dataset.id) { |
37 | this.setData({ | 37 | this.setData({ |
38 | index: e.currentTarget.dataset.index, | 38 | index: e.currentTarget.dataset.index, |
39 | id: e.currentTarget.dataset.id | 39 | id: e.currentTarget.dataset.id |
@@ -81,8 +81,8 @@ Page({ | @@ -81,8 +81,8 @@ Page({ | ||
81 | 81 | ||
82 | }, | 82 | }, |
83 | 83 | ||
84 | -// 添加时间 | ||
85 | - add_time(){ | 84 | + // 添加时间 |
85 | + add_time() { | ||
86 | let that = this | 86 | let that = this |
87 | if (!that.data.word) { | 87 | if (!that.data.word) { |
88 | wx.showToast({ | 88 | wx.showToast({ |
@@ -112,15 +112,15 @@ Page({ | @@ -112,15 +112,15 @@ Page({ | ||
112 | }) | 112 | }) |
113 | } | 113 | } |
114 | }) | 114 | }) |
115 | - }).catch((err) => { }) | 115 | + }).catch((err) => {}) |
116 | }, | 116 | }, |
117 | //通过 | 117 | //通过 |
118 | pass(e) { | 118 | pass(e) { |
119 | - this.update_status(e.currentTarget.dataset.id,e.currentTarget.dataset.index, 2) | 119 | + this.update_status(e.currentTarget.dataset.id, e.currentTarget.dataset.index, 2) |
120 | }, | 120 | }, |
121 | //驳回 | 121 | //驳回 |
122 | reject() { | 122 | reject() { |
123 | - if(!this.data.word){ | 123 | + if (!this.data.word) { |
124 | wx.showToast({ | 124 | wx.showToast({ |
125 | title: '请填写不通过原因', | 125 | title: '请填写不通过原因', |
126 | icon: 'none', | 126 | icon: 'none', |
@@ -128,10 +128,10 @@ Page({ | @@ -128,10 +128,10 @@ Page({ | ||
128 | }) | 128 | }) |
129 | return | 129 | return |
130 | } | 130 | } |
131 | - this.update_status(this.data.id,this.data.index, 3) | 131 | + this.update_status(this.data.id, this.data.index, 3) |
132 | }, | 132 | }, |
133 | // 通过,不通过接口 | 133 | // 通过,不通过接口 |
134 | - update_status(id,index, status) { | 134 | + update_status(id, index, status) { |
135 | let that = this | 135 | let that = this |
136 | let datalist = that.data.datalist | 136 | let datalist = that.data.datalist |
137 | let url = 'index/member_center/update_status'; | 137 | let url = 'index/member_center/update_status'; |
@@ -142,7 +142,7 @@ Page({ | @@ -142,7 +142,7 @@ Page({ | ||
142 | id: id, | 142 | id: id, |
143 | status: status | 143 | status: status |
144 | } | 144 | } |
145 | - if(status == 3){ | 145 | + if (status == 3) { |
146 | params.refund_reason = that.data.word | 146 | params.refund_reason = that.data.word |
147 | } | 147 | } |
148 | app.post(url, params, head).then((res) => { | 148 | app.post(url, params, head).then((res) => { |
@@ -165,9 +165,14 @@ Page({ | @@ -165,9 +165,14 @@ Page({ | ||
165 | * 生命周期函数--监听页面加载 | 165 | * 生命周期函数--监听页面加载 |
166 | */ | 166 | */ |
167 | onLoad: function(options) { | 167 | onLoad: function(options) { |
168 | + console.log(options) | ||
169 | + wx.setNavigationBarTitle({ | ||
170 | + title: options.type == 2 ? '志愿者工时管理' : '志愿者审核', | ||
171 | + }) | ||
168 | this.setData({ | 172 | this.setData({ |
169 | type: options.type | 173 | type: options.type |
170 | }) | 174 | }) |
175 | + | ||
171 | this.getdatalist() | 176 | this.getdatalist() |
172 | 177 | ||
173 | }, | 178 | }, |
@@ -24,6 +24,7 @@ | @@ -24,6 +24,7 @@ | ||
24 | <view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view> | 24 | <view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view> |
25 | <navigator class='foot' wx:if='{{datalist.button_status == 3}}' url="/pages/word_report/word_report?id={{id}}" hover-class="none">工作汇报</navigator> | 25 | <navigator class='foot' wx:if='{{datalist.button_status == 3}}' url="/pages/word_report/word_report?id={{id}}" hover-class="none">工作汇报</navigator> |
26 | <view class='foot' wx:if='{{datalist.button_status == 4 || datalist.button_status == 8}}' style='background: #ccc;color: #fff;'>工作汇报</view> | 26 | <view class='foot' wx:if='{{datalist.button_status == 4 || datalist.button_status == 8}}' style='background: #ccc;color: #fff;'>工作汇报</view> |
27 | + | ||
27 | <view class='foot' wx:if='{{datalist.button_status == 5}}' style='background: #ccc;color: #fff;'>已结束</view> | 28 | <view class='foot' wx:if='{{datalist.button_status == 5}}' style='background: #ccc;color: #fff;'>已结束</view> |
28 | <navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}' hover-class="none">成为志愿者</navigator> | 29 | <navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}' hover-class="none">成为志愿者</navigator> |
29 | 30 | ||
@@ -31,11 +32,11 @@ | @@ -31,11 +32,11 @@ | ||
31 | <view class="btn_box" wx:if="{{status == 1}}"> | 32 | <view class="btn_box" wx:if="{{status == 1}}"> |
32 | <navigator class="btn-item" style="background: url('https://volunteer.cnpu.org/static/images/index.png') no-repeat center;background-size: cover;" url="/pages/index/index" open-type="switchTab">首页</navigator> | 33 | <navigator class="btn-item" style="background: url('https://volunteer.cnpu.org/static/images/index.png') no-repeat center;background-size: cover;" url="/pages/index/index" open-type="switchTab">首页</navigator> |
33 | 34 | ||
34 | - <block wx:if="{{datalist.admin !=1}}"> | 35 | + <block wx:if="{{datalist.admin !=1 && datalist.is_join == 1}}"> |
35 | <view class="btn-item" style="background: url('{{datalist.button_status != 4 && datalist.activity_stage == 0?'https://volunteer.cnpu.org/static/images/edit.png':'https://volunteer.cnpu.org/static/images/edit@.png'}}') no-repeat center;background-size: cover;" | 36 | <view class="btn-item" style="background: url('{{datalist.button_status != 4 && datalist.activity_stage == 0?'https://volunteer.cnpu.org/static/images/edit.png':'https://volunteer.cnpu.org/static/images/edit@.png'}}') no-repeat center;background-size: cover;" |
36 | - bindtap="{{datalist.button_status != 4 && datalist.activity_stage == 0 ?'edit_info':''}}" wx:if="{{datalist.button_status == 2||datalist.button_status == 3 ||datalist.button_status == 4 || datalist.button_status==5 || datalist.button_status == 8 && datalist.admin !=1}}">编辑</view> | 37 | + bindtap="{{datalist.button_status != 4 && datalist.activity_stage == 0 ?'edit_info':''}}" wx:if="{{datalist.button_status == 2||datalist.button_status == 3 ||datalist.button_status == 4 || datalist.button_status==5|| datalist.button_status == 8 && datalist.admin !=1}}">编辑</view> |
37 | 38 | ||
38 | - <view class="btn-item" style="background: url('{{datalist.activity_stage == 0?'https://volunteer.cnpu.org/static/images/out.png':'https://volunteer.cnpu.org/static/images/out@.png'}}') no-repeat center;background-size: cover;" wx:if="{{datalist.button_status==8 || datalist.button_status==3 || datalist.button_status==5 && datalist.admin !=1}}" | 39 | + <view class="btn-item" style="background: url('{{datalist.activity_stage == 0?'https://volunteer.cnpu.org/static/images/out.png':'https://volunteer.cnpu.org/static/images/out@.png'}}') no-repeat center;background-size: cover;" wx:if="{{datalist.button_status==8 || datalist.button_status==5 || datalist.button_status==3 && datalist.admin !=1}}" |
39 | bindtap="{{datalist.activity_stage == 0?'change_cover':''}}" data-id="1">退出</view> | 40 | bindtap="{{datalist.activity_stage == 0?'change_cover':''}}" data-id="1">退出</view> |
40 | </block> | 41 | </block> |
41 | 42 | ||
@@ -64,7 +65,7 @@ | @@ -64,7 +65,7 @@ | ||
64 | <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}}" | 65 | <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}}" |
65 | bindtap="look_more"> | 66 | bindtap="look_more"> |
66 | <image src="{{zitem.photo}}" mode="aspectFill" /> | 67 | <image src="{{zitem.photo}}" mode="aspectFill" /> |
67 | - <view class="name">{{zitem.name}}</view> | 68 | + <view class="name">{{zitem.name}}</view> |
68 | <view class="status {{zitem.status>0?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view> | 69 | <view class="status {{zitem.status>0?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view> |
69 | </view> | 70 | </view> |
70 | </view> | 71 | </view> |
@@ -54,10 +54,11 @@ Page({ | @@ -54,10 +54,11 @@ Page({ | ||
54 | //获取城市列表 | 54 | //获取城市列表 |
55 | get_city(){ | 55 | get_city(){ |
56 | let that = this; | 56 | let that = this; |
57 | - let url = '/index/index/cityList'; | 57 | + let url = '/index/index/cityList' |
58 | let head = { | 58 | let head = { |
59 | 'XX-Token': wx.getStorageSync('token') | 59 | 'XX-Token': wx.getStorageSync('token') |
60 | } | 60 | } |
61 | + | ||
61 | app.post(url, {}, head).then((res) => { | 62 | app.post(url, {}, head).then((res) => { |
62 | 63 | ||
63 | that.setData({ | 64 | that.setData({ |
@@ -92,9 +93,13 @@ Page({ | @@ -92,9 +93,13 @@ Page({ | ||
92 | let head = { | 93 | let head = { |
93 | 'XX-Token': wx.getStorageSync('token') | 94 | 'XX-Token': wx.getStorageSync('token') |
94 | } | 95 | } |
96 | + | ||
95 | let params = { | 97 | let params = { |
96 | city_id: that.data.city_id | 98 | city_id: that.data.city_id |
97 | } | 99 | } |
100 | + if (that.data.end_type) { | ||
101 | + params.end = 1 | ||
102 | + } | ||
98 | app.post(url, params, head).then((res) => { | 103 | app.post(url, params, head).then((res) => { |
99 | 104 | ||
100 | that.setData({ | 105 | that.setData({ |
@@ -115,6 +120,9 @@ Page({ | @@ -115,6 +120,9 @@ Page({ | ||
115 | let params = { | 120 | let params = { |
116 | type: that.data.type | 121 | type: that.data.type |
117 | } | 122 | } |
123 | + if (that.data.end_type) { | ||
124 | + params.end = 1 | ||
125 | + } | ||
118 | app.post(url, params, head).then((res) => { | 126 | app.post(url, params, head).then((res) => { |
119 | 127 | ||
120 | that.setData({ | 128 | that.setData({ |
@@ -132,6 +140,11 @@ Page({ | @@ -132,6 +140,11 @@ Page({ | ||
132 | */ | 140 | */ |
133 | onLoad: function (options) { | 141 | onLoad: function (options) { |
134 | let that = this | 142 | let that = this |
143 | + if (options.end_type){ | ||
144 | + that.setData({ | ||
145 | + end_type: 1 | ||
146 | + }) | ||
147 | + } | ||
135 | that.get_city() | 148 | that.get_city() |
136 | that.get_class() | 149 | that.get_class() |
137 | that.city_active() | 150 | that.city_active() |
@@ -35,8 +35,7 @@ | @@ -35,8 +35,7 @@ | ||
35 | </view> | 35 | </view> |
36 | <view class='vold_line'></view> | 36 | <view class='vold_line'></view> |
37 | 37 | ||
38 | -<view class='index_newbox'> | ||
39 | - | 38 | +<view class='index_newbox' wx:if="{{activity.length>0}}"> |
40 | <view class='index_volunteertitle'> | 39 | <view class='index_volunteertitle'> |
41 | <view class='title'>活动快讯</view> | 40 | <view class='title'>活动快讯</view> |
42 | <navigator url='/pages/index/active/active' hover-class="none">更多</navigator> | 41 | <navigator url='/pages/index/active/active' hover-class="none">更多</navigator> |
@@ -52,7 +51,7 @@ | @@ -52,7 +51,7 @@ | ||
52 | <view class='new_title'>{{item.activity_name}}</view> | 51 | <view class='new_title'>{{item.activity_name}}</view> |
53 | <view class='title_box'> | 52 | <view class='title_box'> |
54 | <view class='wz_box'> | 53 | <view class='wz_box'> |
55 | - <text>{{item.time}}</text> | 54 | + <text>{{item.start_time}}</text> |
56 | </view> | 55 | </view> |
57 | <view class='word'>{{item.province_name}}</view> | 56 | <view class='word'>{{item.province_name}}</view> |
58 | </view> | 57 | </view> |
@@ -63,8 +62,10 @@ | @@ -63,8 +62,10 @@ | ||
63 | </view> | 62 | </view> |
64 | 63 | ||
65 | <view class='index_newbox' wx:if="{{news.length>0}}"> | 64 | <view class='index_newbox' wx:if="{{news.length>0}}"> |
66 | - <view class='title activity_title'>活动回顾</view> | ||
67 | - | 65 | + <view class='index_volunteertitle'> |
66 | + <view class='title'>活动回顾</view> | ||
67 | + <navigator url='/pages/index/active/active?end_type=1' hover-class="none">更多</navigator> | ||
68 | + </view> | ||
68 | <view class="review_box"> | 69 | <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' hover-class="none"> | 70 | <navigator class="r_item" wx:for='{{news}}' wx:key="index" url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> |
70 | <view class="r_left"> | 71 | <view class="r_left"> |
@@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
2 | <image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image> | 2 | <image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image> |
3 | <view class='my_headitem'> | 3 | <view class='my_headitem'> |
4 | <view class='my_headitemimg'> | 4 | <view class='my_headitemimg'> |
5 | - <view class="avator"> | 5 | + <!-- <view class="avator"> |
6 | <open-data type="userAvatarUrl" class="avator" /> | 6 | <open-data type="userAvatarUrl" class="avator" /> |
7 | - </view> | ||
8 | - <!-- <image src='{{datalist.avatar}}'></image> //废弃的微信头像 --> | 7 | + </view> --> |
8 | + <image src="{{datalist.avatar?datalist.avatar:'/imgs/icon_59.png'}}"></image> | ||
9 | </view> | 9 | </view> |
10 | <view class='word'>{{datalist.user_nickname}}</view> | 10 | <view class='word'>{{datalist.user_nickname}}</view> |
11 | <view class='word'>已完成的工时: {{datalist.work_time}}h</view> | 11 | <view class='word'>已完成的工时: {{datalist.work_time}}h</view> |
@@ -8,6 +8,15 @@ Page({ | @@ -8,6 +8,15 @@ Page({ | ||
8 | imgarr: [], | 8 | imgarr: [], |
9 | myimgurl: [] | 9 | myimgurl: [] |
10 | }, | 10 | }, |
11 | + //放大图片 | ||
12 | + look_img(e){ | ||
13 | + let index = Number(e.currentTarget.dataset.index) | ||
14 | + let imgarr = this.data.imgarr | ||
15 | + wx.previewImage({ | ||
16 | + urls: imgarr, | ||
17 | + current: this.data.imgarr[index] | ||
18 | + }) | ||
19 | + }, | ||
11 | //图片删除 | 20 | //图片删除 |
12 | del_img(e) { | 21 | del_img(e) { |
13 | let that = this | 22 | let that = this |
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | <view class="title">图片上传</view> | 29 | <view class="title">图片上传</view> |
30 | <view class="img_arr"> | 30 | <view class="img_arr"> |
31 | <view class="img_item" wx:for="{{imgarr}}" wx:key="index"> | 31 | <view class="img_item" wx:for="{{imgarr}}" wx:key="index"> |
32 | - <image src="{{item}}" mode="aspectFill" class="show_img" /> | 32 | + <image src="{{item}}" mode="aspectFill" class="show_img" catchtap="look_img" data-index="{{index}}"/> |
33 | <image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}" wx:if="{{!user_id}}"/> | 33 | <image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}" wx:if="{{!user_id}}"/> |
34 | </view> | 34 | </view> |
35 | <image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" wx:if="{{!user_id}}"/> | 35 | <image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" wx:if="{{!user_id}}"/> |
-
请 注册 或 登录 后发表评论