作者 王智

bug修改·

... ... @@ -63,10 +63,18 @@ App({
} else if (res.data.code == '40000') {
if (url == '/index/second/checkTranStatus') {
wx.showModal({
title: '提示',
content: '请先申请成为志愿者',
showCancel: false,
})
} else
if (url == '/index/second/commitAnswer') {
resolve(res.data);
} else {
} else {
wx.showModal({
title: '提示',
content: res.data.msg,
... ... @@ -77,9 +85,6 @@ App({
})
}
} else if (res.data.code == '40005') {
wx.showModal({
title: '提示',
... ...
... ... @@ -2,8 +2,8 @@ const app = getApp();
Page({
data: {
list: [],
array: [],
list: [],//列表
array: [],//地址
index: 1
},
onLoad: function (options) {
... ... @@ -21,14 +21,15 @@ Page({
onShow: function () {
let that = this;
that.getList();
that.get_city();
that.getList();
},
// 选择
bindPickerChange: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
let that = this;
this.setData({
index: e.detail.value
})
... ... @@ -44,11 +45,10 @@ Page({
'XX-Token': wx.getStorageSync('token')
}
let params = {
city: '天津市'
city: that.data.array[that.data.index]
}
console.log(params)
app.post(url, params, head).then((res) => {
// console.log(res)
console.log(res)
that.setData({
list: res
})
... ...
... ... @@ -11,8 +11,8 @@
<view class='new_box'>
<view class='new_cell' data-id="{{list.id}}" bindtap="getDetail">
<view class='new_cellmain'>
<view class='new_cell' data-id="{{list.id}}" bindtap="getDetail" >
<view class='new_cellmain' >
<view class='new_img'>
<image src='{{list.pic}}' mode="aspectFill" />
<view class="new_num">
... ...
... ... @@ -76,7 +76,7 @@ page {
.new_num {
padding: 0 16rpx;
width: 100%;
/* width: 100%; */
height: 46rpx;
color: #ffffff;
position: absolute;
... ... @@ -88,7 +88,7 @@ page {
}
.new_num view {
width: 100rpx;
width: 200rpx;
}
... ...
... ... @@ -75,6 +75,7 @@ Page({
front_card: '', //身份证正面照
reverse_card: '', //身份证反面照
id: '', //用户id,
status:''//状态
},
onShow: function () {
... ... @@ -698,6 +699,7 @@ Page({
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, head).then((res) => {
console.log(res)
let provincearr = that.data.provincearr;
let cityarr = that.data.cityarr;
let countryarr = that.data.countryarr;
... ... @@ -745,7 +747,8 @@ Page({
sex: res.sex,
unit: res.unit,
urgency_phone: res.urgency_phone,
type: res.type
type: res.type,
status:res.status
})
}).catch((err) => {
... ...
... ... @@ -11,7 +11,8 @@
<view class='apply_item'>
<view>姓名</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}' disabled="{{page_type}}"></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}'
disabled="{{page_type}}"></input>
</view>
</view>
<picker bindchange="bindsex" range="{{arraysex}}" disabled="{{page_type}}">
... ... @@ -62,67 +63,78 @@
<view class='apply_item'>
<view>工作单位</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}" maxlength="20"></input>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}'
disabled="{{page_type}}" maxlength="20"></input>
</view>
</view>
<view class='apply_item'>
<view>固定电话(选填)</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setfixed_phone' value='{{fixed_phone}}'></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setfixed_phone'
value='{{fixed_phone}}'></input>
</view>
</view>
<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}}' disabled="{{page_type}}" maxlength="11"></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}'
disabled="{{page_type}}" maxlength="11"></input>
</view>
</view>
<view class='apply_item'>
<view>电子邮箱</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></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}}' disabled="{{page_type}}"></input>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}'
disabled="{{page_type}}"></input>
</view>
</view>
... ... @@ -150,7 +162,8 @@
<view>开始时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_start_time?"color333":""}}'>{{record[apply_nav].record_start_time?record[apply_nav].record_start_time:'请选择'}}</view>
<view class='apply_itemtxt {{record[apply_nav].record_start_time?"color333":""}}'>
{{record[apply_nav].record_start_time?record[apply_nav].record_start_time:'请选择'}}</view>
</view>
</view>
</picker>
... ... @@ -159,32 +172,37 @@
<view>结束时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_end_time?"color333":""}}'>{{record[apply_nav].record_end_time?record[apply_nav].record_end_time:'请选择'}}</view>
<view class='apply_itemtxt {{record[apply_nav].record_end_time?"color333":""}}'>
{{record[apply_nav].record_end_time?record[apply_nav].record_end_time:'请选择'}}</view>
</view>
</view>
</picker>
<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' disabled="{{page_type}}"></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' disabled="{{page_type}}"></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' disabled="{{page_type}}"></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' disabled="{{page_type}}"></input>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}'
bindinput='setrecordphone' disabled="{{page_type}}"></input>
</view>
</view>
</view>
... ... @@ -197,7 +215,8 @@
</view>
<view>上传身份证正面</view>
</view>
<image src='{{front_card?front_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_fanmian_bg@2x.png"}}' mode="aspectFill"></image>
<image src='{{front_card?front_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_fanmian_bg@2x.png"}}'
mode="aspectFill"></image>
</view>
<view class='apply_idimg' bindtap="{{page_type?'':'uploadImages'}}" data-tem='3'>
<view class='apply_idimgmain' wx:if='{{!reverse_card}}'>
... ... @@ -206,7 +225,8 @@
</view>
<view>上传身份证反面</view>
</view>
<image src='{{reverse_card?reverse_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_zhengmian_bg@2x.png"}}'></image>
<image src='{{reverse_card?reverse_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_zhengmian_bg@2x.png"}}'>
</image>
</view>
</view>
<view class='apply_bottomtitle' wx:if="{{!page_type}}">志愿者申请书
... ... @@ -214,18 +234,27 @@
<view class='apply_bottom' wx:if="{{!page_type}}">
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view wx:if="{{status==1}}">
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" style="">提交</button>
</form>
</view>
<view wx:if="{{status==2}}">
<form wx:if="{{!page_type}}" report-submit='true' class="apply_btn">
<button class="a_btn gray" form-type="submit" style="">提交</button>
</form>
</view>
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" style="">提交</button>
</form>
<!-- 服务区域 -->
<view class='apply_vold' wx:if='{{showapply}}'>
<view class='pickerview'>
<picker-view indicator-style="height: 40px;" class='pickerview_top' value="{{confirmvalarr}}" bindchange="bindChange">
<picker-view indicator-style="height: 40px;" class='pickerview_top' value="{{confirmvalarr}}"
bindchange="bindChange">
<view class='iconfont icon-guanbi1' catchtap='setshowapply_no'></view>
<picker-view-column>
<view wx:for="{{provincearr}}" wx:key style="line-height: 40px" class='column_view'>{{ item.province_name}}</view>
<view wx:for="{{provincearr}}" wx:key style="line-height: 40px" class='column_view'>{{ item.province_name}}
</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{cityarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.city_name}}</view>
... ...
... ... @@ -217,7 +217,10 @@
justify-content: center;
border-radius: 8rpx;
}
.gray{
background: #eeeeee;
}
.color333 {
color: #333;
}
... ...
... ... @@ -111,10 +111,10 @@ Page({
},
//他人主页
getother(e) {
var id =e.currentTarget.id
var id = e.currentTarget.id
console.log(e)
wx.navigateTo({
url: '/pages/more_other/more_other?id='+id,
url: '/pages/more_other/more_other?id=' + id,
})
},
... ...
... ... @@ -15,7 +15,8 @@ page {
/* 菜单 */
.home_menu {
width: 608rpx;
margin: 40rpx auto;
margin: 0rpx auto;
margin-top: 40rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
... ...
... ... @@ -49,7 +49,7 @@
<view class='apply_item'>
<view>地区</view>
<view class='apply_item_list'>
{{list.address}}
{{list.userInfo.area}}
</view>
</view>
... ... @@ -62,8 +62,8 @@
<view class="myactive_wrap" wx:for="{{list.userJoin}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
<image src="/imgs/shijian-19.png"></image>
{{ item.start_time_text}}至 {{item.end_time_text}}
</view>
<view class="myactive_list">
... ... @@ -71,27 +71,29 @@
<view class="myactive_name">
<view>{{item.activity_name}}</view>
<view class="myactive_gps">
<image src="/imgs/didian-14.png"></image> 获得5小时工时
<image src="/imgs/didian-14.png"></image> {{item.province_name}}
</view>
</view>
</view>
</view>
</view>
<view wx:else>
<view class="myactive_wrap" wx:for="{{list.team}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
</view>
<view class="myactive_list">
<image src="{{item.pic}}"></image>
<view class="myactive_name">
<view>{{item.name}}</view>
<view class="myactive_gps">
<image src="/imgs/didian-14.png"></image> 获得5小时工时
</view>
<view class="myteamBox" wx:for="{{list.team}}" >
<view class="teamtop">
<image src="/imgs/ac14.png"></image>
<view class="teamAddress">{{item.city}}</view>
<image src="/imgs/ac15.png"></image>
<view>{{item.people_num}}人</view>
</view>
<view class="teambottom">
<image src="{{item.pic}}"></image>
<view class="teamright">
<view class="teamName">{{item.name}}</view>
<view class="teamTime">
<view>团队时长:{{item.work_total_time}}小时</view>
<view>我的时长:{{item.my_time}}小时</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -98,7 +98,7 @@ page {
margin: 0 auto;
}
/* 团队 */
/*活动 */
.myactive_wrap {
margin: 32rpx 24rpx;
padding: 32rpx 24rpx;
... ... @@ -145,3 +145,68 @@ page {
height: 28rpx;
}
/* 团队 */
/* pages/myteam/myteam.wxss */
page {
background-color: rgb(240, 240, 240);
}
.myteamBox {
margin: 24rpx 32rpx;
padding: 32rpx 24rpx;
/* height: 266rpx; */
background-color: #ffffff;
border-radius: 7px;
font-size: 28rpx;
}
.teamtop {
display: flex;
align-items: center;
color: #FF976A;
}
.teamtop image {
width: 40rpx;
height: 40rpx;
}
.teamAddress {
margin-right: 44rpx;
}
.teambottom {
display: flex;
margin-top: 24rpx;
}
.teambottom image {
width: 182rpx;
height: 132rpx;
border-radius: 7px;
margin-right: 24rpx;
}
.teamright {
width: 434rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.teamName {
font-size: 28rpx;
font-weight: 600;
color: #323233;
text-align: justify;
}
.teamTime {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #7D7E80;
}
\ No newline at end of file
... ...
... ... @@ -24,12 +24,10 @@ Page({
})
},
// 我的个人信息
getmy(e) {
getmy() {
var id =e.currentTarget.dataset.id
console.log(id)
wx.navigateTo({
url: '/pages/mydetail/mydetail?id='+id,
url: '/pages/mydetail/mydetail',
})
... ... @@ -64,9 +62,37 @@ Page({
},
// 志愿回馈
getfeedback() {
wx.navigateTo({
url: '/pages/myfeedback/myfeedback',
let that = this;
let url = '/index/second/checkTranStatus';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
console.log(res)
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
})
} else {
wx.navigateTo({
url: '/pages/myfeedback/myfeedback',
})
}
}).catch((err) => {
})
},
// 成为志愿者
... ...
... ... @@ -2,12 +2,12 @@
<image class="my_headimg" src='/imgs/card.png'></image>
<view class='my_headitem' >
<view class="my_headitemtop">
<view class='my_headitemimg' bindtap="getmy" data-id="{{datalist.id}}">
<view class='my_headitemimg' bindtap="getmy" >
<image src="{{datalist.avatar?datalist.avatar:'/imgs/icon_59.png'}}"></image>
</view>
<view class="my_headitemname">
<view class='word'>{{datalist.user_nickname}}</view>
<view class="word1">{{datalist.status}}(待学习)<image src="/imgs/more_gray.png"></image>
<view class="word1">{{datalist.status}}<image src="/imgs/more_gray.png"></image>
</view>
<view class='star_box'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
... ...
... ... @@ -76,6 +76,7 @@ page {
.word1 image {
width: 12rpx;
height: 20rpx;
margin-left: 9rpx;
}
.my_activebox {
... ...
... ... @@ -4,19 +4,17 @@ Page({
data: {
list: '',
id:''
},
getlist(e) {
let that = this;
let url = 'index/member_center/edit';
let url = 'index/member_center/index';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url, params, head).then((res) => {
app.post(url, '', head).then((res) => {
console.log(res)
that.setData({
... ... @@ -41,10 +39,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
id: options.id
})
// console.log(options)
// this.setData({
// id: options.id
// })
},
/**
... ...
... ... @@ -2,7 +2,7 @@
<view class='apply_item'>
<view>头像</view>
<view class='apply_item_list'>
<image src="{{list.photo}}"></image>
<image src="{{list.avatar}}"></image>
</view>
</view>
<view class="line">
... ... @@ -12,7 +12,7 @@
<view class='apply_item'>
<view>姓名</view>
<view class='apply_item_list'>
{{list.name}}
{{list.user_nickname}}
</view>
</view>
<view class="line">
... ... @@ -48,7 +48,7 @@
<view class='apply_item'>
<view>地区</view>
<view class='apply_item_list'>
{{list.addr}}
{{list.area}}
</view>
</view>
... ...
... ... @@ -45,7 +45,7 @@ Page({
console.log(e)
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/Volunteer_detail/Volunteer_detail?id='+id,
url: '/pages/Volunteer_detail/Volunteer_detail?id=' + id,
})
},
... ...
<!--pages/mytrain/mytrain.wxml-->
<view class="mytrain">
<image src="/imgs/mytrain.png"></image>
<view class='my_headitem'>
... ... @@ -8,9 +7,8 @@
</view>
<view class="my_headitemname">
<view class='word'>{{datalist.user_nickname}}</view>
<view class="word1">志愿者(待学习)<image src="/imgs/more_gray.png"></image>
<view class="word1">{{datalist.status}}<image src="/imgs/more_gray.png"></image>
</view>
<!-- <view class='word'>工时: {{datalist.work_time}}h</view> -->
<view class='star_box'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
</image>
... ... @@ -25,7 +23,7 @@
</view>
</view>
<view class="mystudytime">
<view class="time"> 50小时</view>
<view class="time">{{datalist.work_time}}小时</view>
<view class="mytime">
<image src="/imgs/clock.png"></image>
我的学时
... ...
... ... @@ -74,6 +74,7 @@ page {
}
.mystudytime {
text-align: center;
margin-left: 86rpx;
}
... ...