作者 niufei

111

... ... @@ -10,22 +10,22 @@ Page({
datalist: [],
pageNum: 10,
cover_type: false,
input_bottom:0
input_bottom: 0
},
// 获取到焦点
focus: function (e) {
focus: function(e) {
this.setData({
input_bottom: 100
})
},
// 失去焦点
no_focus: function (e) {
no_focus: function(e) {
this.setData({
input_bottom: 0
})
},
// 输入信息
// 输入信息
get_word(e) {
this.setData({
word: e.detail.value
... ... @@ -33,7 +33,7 @@ Page({
},
// 改变弹窗状态
change_cover(e) {
if (e.currentTarget.dataset.id){
if (e.currentTarget.dataset.id) {
this.setData({
index: e.currentTarget.dataset.index,
id: e.currentTarget.dataset.id
... ... @@ -81,8 +81,8 @@ Page({
},
// 添加时间
add_time(){
// 添加时间
add_time() {
let that = this
if (!that.data.word) {
wx.showToast({
... ... @@ -112,15 +112,15 @@ Page({
})
}
})
}).catch((err) => { })
}).catch((err) => {})
},
//通过
pass(e) {
this.update_status(e.currentTarget.dataset.id,e.currentTarget.dataset.index, 2)
this.update_status(e.currentTarget.dataset.id, e.currentTarget.dataset.index, 2)
},
//驳回
reject() {
if(!this.data.word){
if (!this.data.word) {
wx.showToast({
title: '请填写不通过原因',
icon: 'none',
... ... @@ -128,10 +128,10 @@ Page({
})
return
}
this.update_status(this.data.id,this.data.index, 3)
this.update_status(this.data.id, this.data.index, 3)
},
// 通过,不通过接口
update_status(id,index, status) {
update_status(id, index, status) {
let that = this
let datalist = that.data.datalist
let url = 'index/member_center/update_status';
... ... @@ -142,7 +142,7 @@ Page({
id: id,
status: status
}
if(status == 3){
if (status == 3) {
params.refund_reason = that.data.word
}
app.post(url, params, head).then((res) => {
... ... @@ -165,9 +165,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
wx.setNavigationBarTitle({
title: options.type == 2 ? '志愿者工时管理' : '志愿者审核',
})
this.setData({
type: options.type
})
this.getdatalist()
},
... ...
{
"navigationBarTitleText": "志愿者审核"
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
... ... @@ -24,6 +24,7 @@
<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>
<view class='foot' wx:if='{{datalist.button_status == 4 || datalist.button_status == 8}}' 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}}' hover-class="none">成为志愿者</navigator>
... ... @@ -31,11 +32,11 @@
<view class="btn_box" wx:if="{{status == 1}}">
<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>
<block wx:if="{{datalist.admin !=1}}">
<block wx:if="{{datalist.admin !=1 && datalist.is_join == 1}}">
<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;"
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>
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>
<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}}"
<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}}"
bindtap="{{datalist.activity_stage == 0?'change_cover':''}}" data-id="1">退出</view>
</block>
... ... @@ -64,7 +65,7 @@
<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="name">{{zitem.name}}</view>
<view class="status {{zitem.status>0?(zitem.status == 2?'bgb':'bga'):'bgc'}}">{{zitem.status>0?(zitem.status == 2?'未通过':'已通过'):'待审核'}}</view>
</view>
</view>
... ...
... ... @@ -54,10 +54,11 @@ Page({
//获取城市列表
get_city(){
let that = this;
let url = '/index/index/cityList';
let url = '/index/index/cityList'
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
that.setData({
... ... @@ -92,9 +93,13 @@ Page({
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
city_id: that.data.city_id
}
if (that.data.end_type) {
params.end = 1
}
app.post(url, params, head).then((res) => {
that.setData({
... ... @@ -115,6 +120,9 @@ Page({
let params = {
type: that.data.type
}
if (that.data.end_type) {
params.end = 1
}
app.post(url, params, head).then((res) => {
that.setData({
... ... @@ -132,6 +140,11 @@ Page({
*/
onLoad: function (options) {
let that = this
if (options.end_type){
that.setData({
end_type: 1
})
}
that.get_city()
that.get_class()
that.city_active()
... ...
... ... @@ -35,8 +35,7 @@
</view>
<view class='vold_line'></view>
<view class='index_newbox'>
<view class='index_newbox' wx:if="{{activity.length>0}}">
<view class='index_volunteertitle'>
<view class='title'>活动快讯</view>
<navigator url='/pages/index/active/active' hover-class="none">更多</navigator>
... ... @@ -52,7 +51,7 @@
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
<view class='wz_box'>
<text>{{item.time}}</text>
<text>{{item.start_time}}</text>
</view>
<view class='word'>{{item.province_name}}</view>
</view>
... ... @@ -63,8 +62,10 @@
</view>
<view class='index_newbox' wx:if="{{news.length>0}}">
<view class='title activity_title'>活动回顾</view>
<view class='index_volunteertitle'>
<view class='title'>活动回顾</view>
<navigator url='/pages/index/active/active?end_type=1' hover-class="none">更多</navigator>
</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' hover-class="none">
<view class="r_left">
... ...
... ... @@ -2,10 +2,10 @@
<image src='https://volunteer.cnpu.org/imgs/gerenzhongxin_bg@2x.png'></image>
<view class='my_headitem'>
<view class='my_headitemimg'>
<view class="avator">
<!-- <view class="avator">
<open-data type="userAvatarUrl" class="avator" />
</view>
<!-- <image src='{{datalist.avatar}}'></image> //废弃的微信头像 -->
</view> -->
<image src="{{datalist.avatar?datalist.avatar:'/imgs/icon_59.png'}}"></image>
</view>
<view class='word'>{{datalist.user_nickname}}</view>
<view class='word'>已完成的工时: {{datalist.work_time}}h</view>
... ...
... ... @@ -8,6 +8,15 @@ Page({
imgarr: [],
myimgurl: []
},
//放大图片
look_img(e){
let index = Number(e.currentTarget.dataset.index)
let imgarr = this.data.imgarr
wx.previewImage({
urls: imgarr,
current: this.data.imgarr[index]
})
},
//图片删除
del_img(e) {
let that = this
... ...
... ... @@ -29,7 +29,7 @@
<view class="title">图片上传</view>
<view class="img_arr">
<view class="img_item" wx:for="{{imgarr}}" wx:key="index">
<image src="{{item}}" mode="aspectFill" class="show_img" />
<image src="{{item}}" mode="aspectFill" class="show_img" catchtap="look_img" data-index="{{index}}"/>
<image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}" wx:if="{{!user_id}}"/>
</view>
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" wx:if="{{!user_id}}"/>
... ...