作者 王智

bug

... ... @@ -2,7 +2,7 @@ const app = getApp();
Page({
data: {
list: [],//列表
list: '',//列表
array: [],//地址
index: 1
},
... ... @@ -23,7 +23,7 @@ Page({
let that = this;
that.get_city();
// that.getList();
// that.getList();
},
... ...
... ... @@ -11,25 +11,24 @@
<view class='new_box'>
<view class='new_cell' data-id="{{list.id}}" bindtap="getDetail" >
<view class='new_cellmain' >
<view class='new_cell' wx:for="{{list}}" data-id="{{item.id}}" bindtap="getDetail">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{list.pic}}' mode="aspectFill" />
<image src='{{item.pic}}' mode="aspectFill" />
<view class="new_num">
<view> {{list.work_total_time}}小时</view>
<view>{{list.people_num}}人</view>
<view> {{item.work_total_time}}小时</view>
<view>{{item.people_num}}人</view>
</view>
</view>
<view class='new_title'>{{list.name}}</view>
<view class='new_title'>{{item.name}}</view>
<view class='title_box'>
<view class='wz_box'>
<text>{{list.create_time}}</text>
<text>{{item.create_time}}</text>
</view>
<view class='word'>{{list.city}}</view>
<view class='word'>{{item.city}}</view>
</view>
</view>
</view>
<!-- <view class='empty' >暂无数据,请去添加</view> -->
</view>
\ No newline at end of file
... ...
... ... @@ -138,4 +138,13 @@ page {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.empty {
width: 100%;
font-size: 32rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: #97a0a8;
text-align: center;
margin-top: 50rpx;
}
\ No newline at end of file
... ...
... ... @@ -37,25 +37,30 @@ Page({
},
submit(e) {
let that = this;
// //验证手机号
// var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
// if (that.data.wechat == '') {
// wx.showToast({
// title: '请输入微信号!',
// icon: 'none'
// })
// } else if (!AuglyTest_phone.test(that.data.move_phone)) {
// wx.showToast({
// title: '请输入正确的电话号码!',
// icon: 'none'
// })
// } else if (that.data.join_reason == '') {
// wx.showToast({
// title: '请填写加入理由!',
// icon: 'none'
// })
// }
//验证手机号
var AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/;
if (that.data.wechat == '') {
wx.showToast({
title: '请输入微信号!',
icon: 'none'
})
return
} else if (!AuglyTest_phone.test(that.data.move_phone)) {
wx.showToast({
title: '请输入正确的电话号码!',
icon: 'none'
})
return
}else if(that.data.join_reason==''){
wx.showToast({
title: '请输入加入理由',
icon: 'none'
})
return
}
let url = '/index/second/applyTeam';
let head = {
... ...
... ... @@ -75,7 +75,7 @@ Page({
front_card: '', //身份证正面照
reverse_card: '', //身份证反面照
id: '', //用户id,
status:''//状态
status: '' //状态
},
onShow: function () {
... ... @@ -108,7 +108,7 @@ Page({
})
},
// 姓名
// 姓名
setname(e) {
this.setData({
name: e.detail.value
... ... @@ -536,7 +536,7 @@ Page({
//匹配身份证
var AuglyTest_ID = /\d{15}|\d{18}/;
//验证手机号
var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
var AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/;
//验证腾讯QQ号
var AuglyTest_QQ = /^[1-9]*[1-9][0-9]*$/;
//匹配国内电话号码
... ... @@ -647,16 +647,16 @@ Page({
photo: that.data.photo
}
wx.showModal({
title: '请仔细核对信息,确认无误!',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
confirmText:'确认提交',
cancelText:'我再想想',
success(res) {
if (res.confirm) {
let url = 'index/member_center/submit_form';
wx.showModal({
title: '请仔细核对信息,确认无误!',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
confirmText: '确认提交',
cancelText: '我再想想',
success(res) {
if (res.confirm) {
let url = 'index/member_center/submit_form';
app.post(url, params, head).then((res) => {
app.post(url, params, head).then((res) => {
wx.showToast({
title: '提交成功,等待审核',
... ... @@ -675,12 +675,12 @@ Page({
}).catch((err) => {})
} else if (res.cancel) {
} else if (res.cancel) {
console.log('用户点击取消')
}
console.log('用户点击取消')
}
})
}
})
} else {
... ... @@ -692,10 +692,20 @@ Page({
})
}
},
getpop() {
wx.showModal({
title: '提示',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
showCancel: false, //是否显示取消按钮
})
},
getdatalist() {
let that = this;
let url = '/index/member_center/edit';
let params = {
... ... @@ -754,11 +764,14 @@ Page({
unit: res.unit,
urgency_phone: res.urgency_phone,
type: res.type,
status:res.status
status: res.status
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -241,7 +241,7 @@
</view>
<view wx:if="{{status==2}}">
<form wx:if="{{!page_type}}" report-submit='true' class="apply_btn">
<form wx:if="{{!page_type}}" bindtap="getpop" report-submit='true' class="apply_btn">
<button class="a_btn gray" form-type="submit" style="">提交</button>
</form>
</view>
... ...
... ... @@ -5,7 +5,8 @@ Page({
data: {
id: '',
list: ''
list: '',
shi:''
},
//
getactive() {
... ... @@ -20,6 +21,14 @@ Page({
}
app.post(url,params, head).then((res) => {
console.log(res)
let shi = res.content
shi = shi.replace(/\<img/gi, '<img style="width:100%;height:auto" ')
that.setData({
shi: shi,
list: res
})
that.setData({
list: res
... ...
... ... @@ -4,11 +4,11 @@
<view class="newinfo_list">
<view class="goods_title">{{list.activity_name}}</view>
<view class="goods_name">
<image src="/imgs/zhiyuan1.png"></image> {{list.author==null?'':'list.author'}}
<image src="/imgs/zhiyuan1.png"></image> {{list.author==null?'':list.author}}
<image class="goods_time" src="/imgs/zhiyuan2.png"></image>{{list.create_time}}
</view>
<view class="newinfo_text">
<rich-text nodes="{{list.content}}"></rich-text>
<rich-text nodes="{{shi}}"></rich-text>
</view>
</view>
... ...
<view class="answer_text">
<view class="answer_title">
{{list.title}}
</view>
... ...
... ... @@ -20,7 +20,7 @@ Page({
datalist: res
})
}).catch((err) => {
console.log(err)
})
},
// 我的个人信息
... ... @@ -53,7 +53,7 @@ Page({
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
content: '请先申请成为志愿者'
})
} else {
... ... @@ -77,7 +77,7 @@ Page({
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
content: '请先申请成为志愿者'
})
} else {
... ... @@ -101,7 +101,7 @@ Page({
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
content: '请先申请成为志愿者'
})
} else {
... ... @@ -125,7 +125,7 @@ Page({
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
content: '请先申请成为志愿者'
})
... ... @@ -162,7 +162,7 @@ Page({
if (res.code == 40000) {
wx.showModal({
title: '提示',
content: '请先成为志愿者'
content: '请先申请成为志愿者'
})
... ...
... ... @@ -94,9 +94,10 @@ Page({
},
// 提交报告
getreport() {
getreport(e) {
var id =e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/myactivity/myactivity_report/myactivity_report',
url: '/pages/myactivity/myactivity_report/myactivity_report?id='+id,
})
},
... ...
... ... @@ -15,7 +15,7 @@
<view class="item {{navs==2?'choose':''}}" bindtap="bindtype" data-navs="{{2}}">已完成打卡</view>
</view>
<!-- 待打卡 -->
<view wx:if="{{navs==1}}" >
<view wx:if="{{navs==1}}">
<view class="myactive_wrap" bindtap="getdaka" data-id="{{item.id}}" wx:for="{{list}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
... ... @@ -57,29 +57,31 @@
</view>
<!--待提交报告 -->
<!--待提交报告 -->
<view wx:elif="{{nav==2}}">
<view class="myactive_wrap" wx:for="{{datalist}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.start_time}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
<block wx:if="{{item.start_clock_time}}">
{{ item.start_clock_time==null?'':item.start_clock_time}}-{{item.end_clock_time==null?"":item.end_clock_time}}
</block>
</view>
<view class="myactive_list">
<image src="{{item.thumbnail}}"></image>
<view class="myactive_name">
<view>{{item.activity_name}}</view>
<view class="myactive_gps">
获得5小时工时
获得{{item.work_time==null?"0":item.work_time}}小时工时
</view>
</view>
</view>
<view class="daka dasubmit" bindtap="getreport">提交报告</view>
<view class="daka dasubmit" bindtap="getreport" data-id="{{item.id}}">提交报告</view>
</view>
</view>
<!-- 完成的活动 -->
<!-- 完成的活动 -->
<view wx:elif="{{nav==3}}">
<view class="myactive_wrap" wx:for="{{datalist}}">
<view class="myactive_wrap" wx:for="{{datalist}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.start_time}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
... ...
... ... @@ -12,6 +12,9 @@ Page({
longitude: '',
time: '',
my_address: '',
timeInterval:{},
isshowCIty:''
},
onLoad: function (options) {
... ... @@ -30,7 +33,7 @@ Page({
onShow: function () {
let that = this;
that.getList();
that.getaddredss()
// that.getaddredss()
// 获取经纬度
wx.getLocation({
success: function (res) {
... ... @@ -61,10 +64,13 @@ Page({
})
// 获取时间点
var time = util.formathour(new Date());
this.setData({
time: time
this.data.timeInterval = setInterval(()=>{
var time = util.formathour(new Date());
that.setData({
time: time
})
})
},
... ... @@ -112,8 +118,11 @@ Page({
app.post(url, d, head).then((res) => {
console.log(res)
wx.showToast({
title: '打卡成功',
title: '上岗打卡成功',
})
setTimeout(()=>{
that.getList()
},1200)
}).catch((err) => {
... ... @@ -123,7 +132,7 @@ Page({
// 下岗打卡
getEnd() {
let that = this;
let url = '/index/second/endClock';
let head = {
... ... @@ -131,6 +140,9 @@ Page({
}
let d = {
id: that.data.id,
long: that.data.latitude,
lat: that.data.longitude
}
... ... @@ -138,8 +150,11 @@ Page({
app.post(url, d, head).then((res) => {
console.log(res)
wx.showToast({
title: '打卡成功',
title: '下岗打卡成功',
})
setTimeout(()=>{
that.getList()
},1200)
}).catch((err) => {
... ... @@ -147,26 +162,26 @@ Page({
},
// 获取当前地址
getaddredss() {
// getaddredss() {
let that = this;
let url = '/index/second/clockInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
id: that.data.id
// let that = this;
// let url = '/index/second/clockInfo';
// let head = {
// 'XX-Token': wx.getStorageSync('token')
// }
// let d = {
// id: that.data.id
}
app.post(url, d, head).then((res) => {
that.setData({
adddress: res
})
// }
// app.post(url, d, head).then((res) => {
// that.setData({
// adddress: res
// })
}).catch((err) => {
// }).catch((err) => {
})
},
// })
// },
// 提示
... ... @@ -177,7 +192,7 @@ Page({
},
onHide: function () {
clearInterval(this.data.timeInterval)
},
/**
... ...
... ... @@ -3,55 +3,42 @@ Page({
data: {
id: '',
textareaNum: 0,
name: '',
job: '',
data: '',
time: '',
work_content: '',
date: '',
join_reason: '', //加入理由
},
//姓名
setname(e) {
console.log(e)
this.setData({
name: e.detail.value
})
imageList: []
},
// 工作内容
setmove_job(e) {
console.log(e)
this.setData({
job: e.detail.value
//获取信息
get_info() {
let that = this
let url = 'index/index/workReportInfo'
let params = {
id: that.data.id
}
if (this.data.user_id) {
params.user_id = this.data.user_id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
console.log(res)
this.setData({
name: res.name,
work_content: res.work_content,
date: res.time[0],
})
})
},
// 日期
setmove_data(e) {
console.log(e)
this.setData({
data: e.detail.value
})
},
// 参加时间
setmove_time(e) {
console.log(e)
this.setData({
time: e.detail.value
})
},
//汇报
textareaIn: function (e) {
console.log(e)
this.setData({
textareaNum: e.detail.cursor,
join_reason: e.detail.value
... ... @@ -88,59 +75,66 @@ Page({
// submit(e) {
// let that = this;
// let url = '/index/second/applyTeam';
// let head = {
// 'XX-Token': wx.getStorageSync('token')
// }
// let params = {
// name: that.data.name,
// job: that.data.job,
// data: that.data.data,
// time: that.data.time,
// join_reason: that.data.join_reason
// }
// app.post(url, params, head).then((res) => {
// wx.showModal({
// title: '提示',
// content: '请仔细核对信息,确认无误!',
// confirmText: '确认提交',
// cancelText: '我再想想',
// success(res) {
// if (res.confirm) {
// wx.showToast({
// title: '提交成功,等待审核',
// mask: true,
// icon: 'none',
// // duration: 2000
// })
// setTimeout(function () {
// wx.navigateBack({
// delta: 0,
// })
// }, 1000)
// console.log('用户点击确定')
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
// }).catch(() => {})
// },
// 提交
submit(e) {
let that = this;
if (that.data.imageList == '') {
wx.showToast({
title: '请选择图片',
icon: 'none'
})
return
} else if (that.data.join_reason == '') {
wx.showToast({
title: '请输入汇报内容',
icon: 'none'
})
return
}
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id,
work_report: that.data.join_reason,
work_pic: that.data.imageList
}
wx.showModal({
title: '提示',
content: '请仔细核对信息,确认无误!',
confirmText: '确认提交',
cancelText: '我再想想',
success(res) {
if (res.confirm) {
let url = '/index/index/sginIn';
app.post(url, params, head).then((res) => {
wx.showToast({
title: '提交成功',
mask: true,
icon: 'none',
// duration: 2000
})
setTimeout(function () {
wx.navigateBack({
delta: 0,
})
}, 1000)
console.log('用户点击确定')
}).catch(() => {})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
... ... @@ -149,23 +143,20 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this
that.get_info()
},
... ...
... ... @@ -2,8 +2,7 @@
<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>
{{name}}
</view>
</view>
<view class="line">
... ... @@ -13,8 +12,7 @@
<view class='apply_item'>
<view>工作内容</view>
<view class='apply_item_input'>
<input placeholder='请输入工作内容' placeholder-class='input_p' bindinput='setmove_job' value='{{job}}'
disabled="{{page_type}}"></input>
{{work_content}}
</view>
</view>
<view class="line">
... ... @@ -24,8 +22,7 @@
<view class='apply_item'>
<view>参加日期</view>
<view class='apply_item_input'>
<input placeholder='请输入参加日期' placeholder-class='input_p' bindinput='setmove_data' value='{{data}}'
disabled="{{page_type}}"></input>
{{date.date}}
</view>
</view>
<view class="line">
... ... @@ -35,8 +32,7 @@
<view class='apply_item'>
<view>参加时间</view>
<view class='apply_item_input'>
<input placeholder='请输入参加时间' placeholder-class='input_p' bindinput='setmove_time' value='{{time}}'
disabled="{{page_type}}"></input>
{{date.time}}
</view>
</view>
... ... @@ -44,7 +40,6 @@
<!-- 感想汇报 -->
<view class="doc-listform">
<view>图片上传</view>
<view class="doc-Images">
<view wx:for="{{imageList}}" wx:key="{{item}}" class="doc-ImageList">
<image src="{{item}}">
... ... @@ -54,9 +49,6 @@
</view>
<button bindtap="ChooseImage" class="chooseImage">+</button>
</view>
<view> 感想汇报</view>
<textarea show-confirm-bar="" placeholder="请输入内容,内容最多为500字" maxlength="500" bindinput="textareaIn"
value='{{join_reason}}'>
... ...
... ... @@ -23,7 +23,11 @@
color: #333;
font-size: 28rpx;
}
.apply_item_input image{
width: 12rpx;
height: 20rpx;
}
.apply_item_input input {
width: 100%;
}
... ...
... ... @@ -7,7 +7,7 @@
<view>姓名:{{list.name}}</view>
<view>身份:{{list.status}}</view>
<view>编号:{{list.user_num}}</view>
<view>学时:{{list.work_time==null?'':'list.work_time'}}</view>
<view>学时:{{list.work_time==null?'':list.work_time}}</view>
</view>
<image class="One_inch_photos" src="{{list.avatar}}"></image>
</view>
... ...
... ... @@ -15,15 +15,10 @@ Page({
}
app.post(url, '', head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch(() => {})
},
... ... @@ -31,7 +26,7 @@ Page({
// 我的志愿者资料
getmyData() {
wx.navigateTo({
url: '/pages/apply/apply',
url: '/pages/apply/apply?id=' + this.data.list.id + "&is_submit=" + this.data.list.is_submit,
})
},
... ...
... ... @@ -36,7 +36,7 @@
<view>可用工时</view>
</view>
<view class="my_active">
<view>{{datalist.user.work_time==null?'0':'datalist.user.work_time'}}</view>
<view>{{datalist.user.work_time==null?'0':datalist.user.work_time}}</view>
<view>累计总共工时</view>
</view>
<view class="my_active">
... ...
... ... @@ -30,11 +30,8 @@ Page({
}
app.post(url, '', head).then((res) => {
console.log(res)
this.setData({
list: res
})
})
... ...
... ... @@ -38,6 +38,7 @@ Page({
title: '正在开启',
mask: true
})
console.log(res.token)
wx.setStorageSync('token', res.token)
setTimeout(() => {
wx.hideLoading()
... ...
... ... @@ -316,6 +316,12 @@
"pathName": "pages/myfeedback_lists/myfeedback_lists",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/myactivity/myactivity_report/myactivity_report",
"pathName": "pages/myactivity/myactivity_report/myactivity_report",
"scene": null
}
]
}
... ...