作者 root

合并分支 'volun' 到 'master'

Volun



查看合并请求 !1
正在显示 100 个修改的文件 包含 2320 行增加108 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

//app.js
App({
onLaunch: function() {
onLaunch: function () {
//自动更新版本
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function(res) {
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
})
updateManager.onUpdateReady(function() {
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function(res) {
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
... ... @@ -21,7 +21,7 @@ App({
})
updateManager.onUpdateFailed(function() {
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '更新提示',
... ... @@ -31,7 +31,7 @@ App({
})
},
post: function(url, data, headerParams) {
post: function (url, data, headerParams) {
wx.showNavigationBarLoading()
wx.showLoading({
title: '加载中',
... ... @@ -40,7 +40,8 @@ App({
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
let baseUrl = 'https://volunteer.cnpu.org/api/';
let baseUrl = 'http://volunteer.w.bronet.cn/api/';
// let baseUrl = 'https://volunteer.cnpu.org/api/';
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
... ... @@ -51,29 +52,45 @@ App({
data: postData,
method: 'POST',
header: header,
success: function(res) { //返回取得的数据
success: function (res) { //返回取得的数据
if (res.data.code == '20000') {
resolve(res.data.data);
} else if (res.data.code == '10001') { //用户未登录
wx.reLaunch({
url: "/pages/start/start"
})
} 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 {
wx.showModal({
title: '提示',
content: res.data.msg,
showCancel: false,
success: function(res) {
success: function (res) {
}
})
}
} else if (res.data.code == '40005') {
wx.showModal({
title: '提示',
content: res.data.msg,
showCancel: false,
success: function(res) {
success: function (res) {
if (res.confirm) {
wx.reLaunch({
url: '/pages/start/start'
... ... @@ -96,7 +113,7 @@ App({
wx.hideLoading()
wx.hideNavigationBarLoading()
},
fail: function(e) {
fail: function (e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
... ...
... ... @@ -3,7 +3,9 @@
"pages/start/start",
"pages/index/index",
"pages/my/my",
"pages/mydetail/mydetail",
"pages/more/more",
"pages/more_other/more_other",
"pages/admin/admin",
"pages/apply/apply",
"pages/img_txt/img_txt",
... ... @@ -12,26 +14,60 @@
"pages/my/my_active/my_active",
"pages/index/active/active",
"pages/word_report/word_report",
"pages/enroll/enroll"
"pages/enroll/enroll",
"pages/Volunteer_dynamic/Volunteer_dynamic",
"pages/getNewsInfo/getNewsInfo",
"pages/Volunteer_group/Volunteer_group",
"pages/Volunteer_group/active/active",
"pages/Volunteer_detail/Volunteer_detail",
"pages/Online_regulations/Online_regulations",
"pages/getStudycontent/getStudycontent",
"pages/getStudycontent/answer/answer",
"pages/guanlitiaoli/guanlitiaoli",
"pages/guangrongpaihang/guangrongpaihang",
"pages/myactivity/myactivity",
"pages/myactivity/myactivity_active/myactivity_active",
"pages/myactivity/myactivity_report/myactivity_report",
"pages/myteam/myteam",
"pages/mytrain/mytrain",
"pages/myfeedback/myfeedback",
"pages/myfeedback/myfeedback_active/myfeedback_active",
"pages/myfeedback/myfeedback_duihuan/myfeedback_duihuan",
"pages/myfeedback/myfeedback_list/myfeedback_list",
"pages/myfeedback_lists/myfeedback_lists",
"pages/mycertificate/mycertificate",
"pages/myaddress/myaddress",
"pages/myaddcompile/myaddcompile"
],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#21AE59",
"navigationBarTitleText": "志愿者小程序",
"navigationBarTitleText": "白求恩志愿者中心",
"navigationBarTextStyle": "white"
},
"tabBar": {
"color": "#fff",
"selectedColor": "#fff",
"backgroundColor": "#EBEBEB",
"list": [
{
"color":"#999999",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "imgs/shouye_02@2x.png",
"selectedIconPath": "imgs/shouye_01@2x.png"
},
{
"pagePath": "pages/my/my",
"text": "个人中心",
"iconPath": "imgs/wode_01@2x.png",
"selectedIconPath": "imgs/wode_02@2x.png"
}
... ...
... ... @@ -89,3 +89,34 @@
.icon-chakanshenqing:before {
content: "\e6a6";
}
.display {
display: flex;
}
.display1 {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.display2 {
display: flex;
align-items: center;
}
.display3 {
display: flex;
align-items: center;
justify-content: center;
}
.displayB {
display: flex;
align-items: center;
justify-content: space-between;
}
.displayA {
display: flex;
align-items: center;
justify-content: space-around;
}
\ No newline at end of file
... ...
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
onLoad: function (options) {
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getList()
},
// 列表
getList() {
let that = this;
let url = '/index/second/tranOnlineList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, '', head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 前往答题
getStudycontent(e) {
let that = this;
let url = '/index/second/checkTranStatus';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, '', head).then((res) => {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/getStudycontent/getStudycontent?id=' + id,
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "在线培训"
}
\ No newline at end of file
... ...
<!--在线培训-->
<view class="myanswer" bindtap="getStudycontent" wx:for="{{list.data}}" data-id="{{item.id}}">
<image src="{{item.pic}}"></image>
<view class="myanswer_right">
<view class="myanswer_name">
{{item.title}}
</view>
<view class="myanswer_num">
<view>
{{item.num}}道题
</view>
<view class="myanswer_end" wx:if="{{item.user_status==0}}">
前往答题
<image src="/imgs/more_blue1.png"></image>
</view>
<view class="myanswer_end green" wx:if="{{item.user_status==1}}">
完成答题
<image src="/imgs/more1.png"></image>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
page{
background-color:rgb(240, 240, 240);
}
.myanswer {
margin: 24rpx 32rpx;
padding: 24rpx 24rpx;
border-radius: 7px;
background-color: #ffffff;
display: flex;
font-size: 28rpx;
}
.myanswer image {
width: 182rpx;
height: 138rpx;
margin-right: 24rpx;
border-radius: 7px;
}
.myanswer_right {
width: 434rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.myanswer_num {
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #7D7E80;
}
.myanswer_num image {
width: 22rpx;
height: 22rpx;
}
.myanswer_end {
color: #54A7FB;
}
.green{
color:#21AE58
;
}
.myanswer_end image{
margin-left: 5rpx;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id:'',
list:''
},
getLists() {
var id = this.data.id;
console.log(id)
let that = this;
let url = '/index/second/teamInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
id: id
}
app.post(url,d, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
getshengqin(e) {
var id =e.currentTarget.dataset.id
console.log(e)
wx.navigateTo({
url: '/pages/Volunteer_group/active/active?id='+id,
})
},
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onShow: function () {
let that =this;
that.getLists();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "志愿团队详情"
}
\ No newline at end of file
... ...
<view class="goods_title">
<view>{{list.name}}</view>
<view class="goods_list">
<view>
<image src="/imgs/vg_1.png"></image>{{list.work_total_time}}小时
</view>
<view>
<image src="/imgs/vg_2.png"></image>{{list.city}}
</view>
<view>
<image src="/imgs/vg_3.png"></image>{{list.people_num}}人
</view>
</view>
</view>
<view class="goods_introduce">
<view class="goods_line"></view>
<view bindtap="getadd">详情介绍</view>
<view class="goods_line"></view>
</view>
<rich-text nodes="{{list.content}}"></rich-text>
<view class="shengqin">
<button wx:if="{{list.user_status ==0}}">未审核</button>
<button style="background:#cfcfcf;box-shadow:0rpx 18rpx 38rpx 0rpx rgba(179, 179, 179, 0.42);"
wx:if="{{list.user_status ==1}}">审核已通过</button>
<button wx:if="{{list.user_status ==-1}}">审核不通过</button>
<button wx:if="{{list.user_status ==3}}" bindtap="getshengqin" data-id="{{id}}">未申请</button>
</view>
\ No newline at end of file
... ...
page {
background-color: rgb(240, 240, 240);
}
.goods_title {
padding: 0 32rpx;
padding-top: 32rpx;
height: 164rpx;
background-color: #ffffff;
}
.goods_list {
display: flex;
align-items: center;
font-size: 28rpx;
color: #FF976A;
margin-top: 16rpx;
}
.goods_list image {
width: 44rpx;
height: 44rpx;
}
.goods_list>view {
display: flex;
align-items: center;
margin-right: 42rpx;
}
/* */
.goods_introduce {
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #969799;
}
.goods_introduce :nth-child(2) {
margin: 0 32rpx;
}
.goods_line {
width: 200rpx;
height: 2rpx;
background-color: #d2d2d2;
}
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
.gray {
width: 622rpx;
height: 88rpx;
border-radius: 44rpx;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
data: {
navbar: [],
currentTab: 1,
list: [],
},
//切换navbar
navbarTap: function (e) {
console.log(e)
this.setData({
currentTab: e.currentTarget.dataset.id
})
//全局变量
// app.globalData.currentTab = e.currentTarget.dataset.id;
this.getactive();
},
onShow() {
// this.setData({
// currentTab: app.globalData.currentTab
// })
let that = this;
that.getNewsType()
that.getactive();
},
onLoad: function () {
},
// 志愿动态栏目类型
getNewsType() {
let that = this;
let url = '/index/second/getNewsType';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, head).then((res) => {
console.log(res)
that.setData({
navbar: res,
})
}).catch((err) => {
})
},
// 列表
getactive() {
let that = this;
let url = '/index/second/getNewsList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
page: that.data.currentTab
}
console.log(params)
app.post(url, params, head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 列表详情
getNewsInfo(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/getNewsInfo/getNewsInfo?id=' + id,
})
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "志愿动态"
}
\ No newline at end of file
... ...
<!-- -->
<view class="goods_index">
<!-- 导航条开始data-idx="{{index}}" -->
<view class="navbar">
<view wx:for="{{navbar}}" data-id="{{item.id}}" class="item {{currentTab==item.id ? 'active' : ''}}"
wx:key="unique" bindtap="navbarTap">
{{item.name}}
</view>
</view>
<!-- 导航条结束 -->
<!-- 内容 -->
<!-- 活动资讯开始 -->
<view class="display1" wx:if="{{currentTab==1}}" >
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--媒体报道 -->
<view class="display1" wx:elif="{{currentTab==2}}" >
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--通知公告 -->
<view class="display1" wx:elif="{{currentTab==3}}">
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--志愿随笔 -->
<view class="display1" wx:elif="{{currentTab==4}}">
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
page{
background-color: rgb(240, 240, 240);
}
.goods_index {
padding: 20rpx 32rpx;
}
/* 导航条开始 */
.navbar {
/* padding : 10rpx 0; */
display: flex;
justify-content: space-around;
/* background : linear-gradient(136deg,#4e8fff 2%, #55c2fa); */
font-size: 30rpx;
color: #969799;
border-radius: 2px 0px 0px 2px;
}
.navbar .item {
width: 346rpx;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
position: relative;
text-align: center;
/* background-color: #FFC909; */
/* border-radius : 19px; */
}
.navbar .item.active {
color: black;
/* background: linear-gradient(136deg, #4e8fff 2%, #55c2fa); */
}
.navbar .item.active:after {
content: "";
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 80rpx;
height: 6rpx;
background: #21AE58;
margin: 0 auto;
}
/* 导航条结束 */
/* 活动开始 */
.goods_wrap {
width: 334rpx;
margin-top: 24rpx;
padding-bottom:24rpx ;
border-radius: 7px;
background-color: #ffffff;
overflow: hidden;
}
.goods_wrap image {
width: 334rpx;
height: 200rpx;
}
.goods_name {
padding: 0 16rpx;
margin-top: 16rpx;
font-size: 26rpx;
color: #3E3E3F;
}
.goods_time {
padding: 0 16rpx;
margin-top: 16rpx;
font-size: 24rpx;
color: #7D7E80;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
data: {
list: [],//列表
array: [],//地址
index: 1
},
onLoad: function (options) {
wx.getLocation({
altitude: 'true',
success(res) {
console.log(res)
}
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.get_city();
that.getList();
},
// 选择
bindPickerChange: function (e) {
let that = this;
this.setData({
index: e.detail.value
})
that.getList()
},
// 志愿列表
getList() {
let that = this;
let url = '/index/second/teamList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
city: that.data.array[that.data.index]
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 地址获取
get_city() {
let that = this;
let url = '/index/index/cityList'
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
console.log(res)
that.setData({
array: res.city
})
}).catch((err) => {
})
},
// 详情页
getDetail(e) {
let that = this;
let url = '/index/second/checkTranStatus';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, '', head).then((res) => {
var id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/Volunteer_detail/Volunteer_detail?id=' + id,
})
}).catch((err) => {
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "志愿团队"
}
\ No newline at end of file
... ...
<!-- 志愿团队 -->
<view class="group_name" bindtap="chooseLocation">
<image src="/imgs/didian-14.png"></image>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="picker">
{{array[index]}}
<image class="right" src="/imgs/right.png"></image>
</view>
</picker>
</view>
<view class='new_box'>
<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">
<view> {{list.work_total_time}}小时</view>
<view>{{list.people_num}}人</view>
</view>
</view>
<view class='new_title'>{{list.name}}</view>
<view class='title_box'>
<view class='wz_box'>
<text>{{list.create_time}}</text>
</view>
<view class='word'>{{list.city}}</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/Volunteer_group/Volunteer_group.wxss */
page {
background-color: rgb(240, 240, 240);
}
.group_name {
padding: 0 32rpx;
height: 88rpx;
line-height: 88rpx;
font-size: 34rpx;
color: #7D7E80;
background-color: #ffffff;
display: flex;
align-items: center;
}
.group_name image {
width: 36rpx;
height: 36rpx;
margin-right: 16rpx;
}
.group_name .right {
width: 25rpx;
height: 30rpx;
margin-left: 16rpx;
}
/* */
.new_box {
display: flex;
justify-content: space-between;
align-items: center;
color: #999;
padding: 0 32rpx;
margin-bottom: 24rpx;
font-size: 24rpx;
flex-wrap: wrap;
}
.new_cell {
width: 48%;
/* padding: 29rpx 0rpx; */
/* background-color: #ffffff; */
border-radius: 7px;
overflow: hidden;
margin-top: 24rpx;
}
.new_cellmain {
overflow: hidden;
/* width: 336rpx; */
background-color: #ffffff;
}
.new_img {
width: 336rpx;
height: 220rpx;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.new_img image {
width: 100%;
height: 100%;
display: block;
}
.new_num {
padding: 0 16rpx;
/* width: 100%; */
height: 46rpx;
color: #ffffff;
position: absolute;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
}
.new_num view {
width: 200rpx;
}
.new_title {
padding: 0 20rpx;
height: 76rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
margin: 18rpx 0 13rpx 0;
color: #292929;
font-size: 28rpx;
}
.activity_title {
margin: 0 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.title_box {
padding: 0 20rpx;
margin: 18rpx 0 13rpx 0;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
display: flex;
align-items: center;
justify-content: space-between;
}
.wz_box {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title_box .word {
max-width: 200rpx;
color: #FF976A;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
textareaNum: 0,
join_reason: '', //加入理由
id: '',
wechat: '', //微信号
move_phone: '' //手机号
},
// 微信号
setwechat(e) {
console.log(e)
this.setData({
wechat: e.detail.value
})
},
// 手机号码
setmove_phone(e) {
this.setData({
move_phone: e.detail.value
})
},
//加入理由
textareaIn: function (e) {
this.setData({
textareaNum: e.detail.cursor,
join_reason: e.detail.value
})
},
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'
// })
// }
let url = '/index/second/applyTeam';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
wx_id: that.data.wechat,
mobile: that.data.move_phone,
join_reason: that.data.join_reason,
team_id: that.data.id
}
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.switchTab({
url: '/pages/index/index'
})
}, 1000)
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}).catch(() => {})
},
// 提示
click: function (e) {
this.setData({
hiddenName: !this.data.hiddenName
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "申请加入"
}
\ No newline at end of file
... ...
<!--微信号 -->
<view class='apply_item'>
<view>微信号</view>
<view class='apply_item_input'>
<input placeholder='请输入微信号码' placeholder-class='input_p' bindinput='setwechat' value='{{wechat}}'
disabled="{{page_type}}"></input>
</view>
</view>
<view class="line">
<view></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>
</view>
</view>
<!-- 加入理由 -->
<view class="doc-listform">
<view>加入理由</view>
<textarea show-confirm-bar="" placeholder="请填写加入理由" maxlength="100" bindinput="textareaIn" value='{{join_reason}}'>
<view style="position:absolute;bottom:20rpx;right:0rpx;color:gray;"><text style="color:#000;">{{textareaNum}}</text> / 100</view>
</textarea>
</view>
<!-- 提示 -->
<view class="tishi_wrap" hidden="{{hiddenName}}">
<view class="tishi">
<view>
<image src="/imgs/tishi-3@2x.png"></image>
提示
</view>
<image bindtap="click" style="width:20rpx;height:20rpx;" src="/imgs/tishiclear.png"></image>
</view>
<view class="tishi_text">“请填写真实信息”以便于志愿团队管理员与您联系 并邀请您加入该团队志愿者管理服务群聊</view>
</view>
<form class="shengqin" bindsubmit="submit" report-submit='true'>
<button form-type="submit">确认申请</button>
</form>
\ No newline at end of file
... ...
/* @import "../../apply//apply.wxss"; */
page {
background-color: rgb(240, 240, 240);
}
.apply_item {
color: #333;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
/* margin: 0 32rpx; */
/* border-bottom: 1rpx solid #e6e6e6; */
padding: 30rpx 32rpx;
background-color: #ffffff;
}
.apply_item_input {
display: flex;
align-items: center;
flex-direction: row-reverse;
width: 70%;
color: #333;
font-size: 28rpx;
}
.apply_item_input input {
width: 100%;
}
.apply_item_input .iconfont {
color: #ccc;
}
.big_item .apply_item_input {
width: 60%;
}
.apply_item_input input {
text-align: right;
}
.input_p {
color: #ccc;
font-size: 28rpx;
}
.line view {
margin: 0 32rpx;
background-color: #e6e6e6;
height: 1px;
}
.line {
background-color: #ffffff;
}
/* */
.doc-listform {
margin-top: 30rpx;
padding: 0 32rpx;
padding-top: 16rpx;
background-color: #ffffff;
position: relative;
}
textarea {
font-size: 28rpx;
margin-top: 20rpx;
width: auto;
}
/* 提示 */
.tishi_wrap {
padding: 24rpx 36rpx;
margin: 0 32rpx;
margin-top: 40rpx;
border-radius: 8px;
background-color: #ffffff;
}
.tishi {
display: flex;
align-items: center;
justify-content: space-between;
color: #FF4444;
font-size: 32rpx;
}
.tishi image {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
.tishi_text {
margin-top: 16rpx;
font-size: 28rpx;
color: #7D7E80;
}
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
... ... @@ -75,67 +75,141 @@ Page({
front_card: '', //身份证正面照
reverse_card: '', //身份证反面照
id: '', //用户id,
status:''//状态
},
onShow: function () {
var that = this;
// 登记表缓存
that.setData({
name: wx.getStorageSync('name'),
sex: wx.getStorageSync('sex'),
photo: wx.getStorageSync('photo'),
front_card: wx.getStorageSync('front_card'),
reverse_card: wx.getStorageSync('reverse_card'),
birthday: wx.getStorageSync('birthday'),
nation: wx.getStorageSync('nation'),
education: wx.getStorageSync('education'),
politics: wx.getStorageSync('politics'),
unit: wx.getStorageSync('unit'),
duty: wx.getStorageSync('duty'),
addr: wx.getStorageSync('addr'),
postcode: wx.getStorageSync('postcode'),
school: wx.getStorageSync('school'),
card_number: wx.getStorageSync('card_number'),
fixed_phone: wx.getStorageSync('fixed_phone'),
move_phone: wx.getStorageSync('move_phone'),
email: wx.getStorageSync('email'),
urgency_phone: wx.getStorageSync('urgency_phone'),
qq: wx.getStorageSync('qq'),
address: wx.getStorageSync('address'),
})
},
// 姓名
setname(e) {
this.setData({
name: e.detail.value
})
wx.setStorageSync('name', e.detail.value)
},
setunit(e) {
// 性别
bindsex(e) {
this.setData({
unit: e.detail.value
sex: parseInt(e.detail.value) + 1
})
wx.setStorageSync('sex', parseInt(e.detail.value) + 1)
},
setduty(e) {
// 出生日期
bindbirthdayChange(e) {
this.setData({
duty: e.detail.value
birthday: e.detail.value
})
wx.setStorageSync('birthday', e.detail.value)
},
setaddr(e) {
// 民族
bindnationChange(e) {
let nationarr = this.data.nationarr;
this.setData({
addr: e.detail.value
nation: nationarr[e.detail.value]
})
wx.setStorageSync('nation', nationarr[e.detail.value])
},
setpostcode(e) {
// 学历
bindeducationChange(e) {
let educationarr = this.data.educationarr;
this.setData({
postcode: e.detail.value
education: educationarr[e.detail.value]
})
wx.setStorageSync('education', educationarr[e.detail.value])
},
setschool(e) {
// 政治面貌
bindpoliticsChange(e) {
let politicsarr = this.data.politicsarr;
this.setData({
school: e.detail.value
politics: politicsarr[e.detail.value]
})
wx.setStorageSync('politics', politicsarr[e.detail.value])
},
setcard_number(e) {
// 工作单位
setunit(e) {
this.setData({
card_number: e.detail.value
unit: e.detail.value
})
wx.setStorageSync('unit', e.detail.value)
},
setemail(e) {
// 职务
setduty(e) {
this.setData({
email: e.detail.value
duty: e.detail.value
})
wx.setStorageSync('duty', e.detail.value)
},
seturgency_phone(e) {
// 通讯地址
setaddr(e) {
this.setData({
urgency_phone: e.detail.value
addr: e.detail.value
})
wx.setStorageSync('addr', e.detail.value)
},
setqq(e) {
//邮编
setpostcode(e) {
this.setData({
qq: e.detail.value
postcode: e.detail.value
})
wx.setStorageSync('postcode', e.detail.value)
},
bindsex(e) {
// 就读学校
setschool(e) {
this.setData({
sex: parseInt(e.detail.value) + 1
school: e.detail.value
})
wx.setStorageSync('school', e.detail.value)
},
// 身份证号
setcard_number(e) {
this.setData({
card_number: e.detail.value
})
wx.setStorageSync('card_number', e.detail.value)
},
//固定电话
setfixed_phone(e) {
this.setData({
fixed_phone: e.detail.value
})
wx.setStorageSync('fixed_phone', e.detail.value)
},
//移动电话
... ... @@ -143,34 +217,32 @@ Page({
this.setData({
move_phone: e.detail.value
})
wx.setStorageSync('move_phone', e.detail.value)
},
bindbirthdayChange(e) {
this.setData({
birthday: e.detail.value
})
},
bindnationChange(e) {
let nationarr = this.data.nationarr;
// 电子邮箱
setemail(e) {
this.setData({
nation: nationarr[e.detail.value]
email: e.detail.value
})
wx.setStorageSync('email', e.detail.value)
},
bindeducationChange(e) {
let educationarr = this.data.educationarr;
// 紧急联系人
seturgency_phone(e) {
this.setData({
education: educationarr[e.detail.value]
urgency_phone: e.detail.value
})
},
wx.setStorageSync('urgency_phone', e.detail.value)
bindpoliticsChange(e) {
let politicsarr = this.data.politicsarr;
},
// QQ号码
setqq(e) {
this.setData({
politics: politicsarr[e.detail.value]
qq: e.detail.value
})
wx.setStorageSync('qq', e.detail.value)
},
//选择省市区
getarea() {
let that = this;
... ... @@ -256,7 +328,7 @@ Page({
})
},
bindChange: function(e) {
bindChange: function (e) {
let that = this;
let valarr = that.data.valarr;
let provincearr = that.data.provincearr;
... ... @@ -312,6 +384,8 @@ Page({
address: provincearr[i].province_name + cityarr[j].city_name + countryarr[k].country_name,
showapply: false
})
wx.setStorageSync('address', this.data.address)
},
setshowapply() {
... ... @@ -396,6 +470,8 @@ Page({
let tem = e.currentTarget.dataset.tem;
that.uploadImage(tem);
},
//上传头像1为头像,2为省份证正面,3为省份证反面
uploadImage(tem) {
... ... @@ -403,42 +479,47 @@ Page({
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success: function(res) {
success: function (res) {
let tempFilePaths = res.tempFilePaths //总文件
let head = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let url = 'https://volunteer.cnpu.org/api/user/upload/one';
// let url = 'https://volunteer.cnpu.org/api/user/upload/one';
let url = 'http://volunteer.w.bronet.cn/api/user/upload/one';
wx.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: 'file',
header: head,
formData: {},
success: function(res) {
success: function (res) {
let temdata = JSON.parse(res.data);
if (temdata.code == 20000) {
if (tem == '1') {
that.setData({
photo: temdata.data.url
})
wx.setStorageSync('photo', temdata.data.url)
} else if (tem == '2') {
that.setData({
front_card: temdata.data.url
})
wx.setStorageSync('front_card', temdata.data.url)
} else if (tem == '3') {
that.setData({
reverse_card: temdata.data.url
})
wx.setStorageSync('reverse_card', temdata.data.url)
}
}
},
fail: function(res) {},
fail: function (res) {},
complete: () => {}
})
},
fail: function(res) {}
fail: function (res) {}
})
},
setapply_nav(e) {
... ... @@ -490,8 +571,6 @@ Page({
err = '请输入您的身份证号!';
} else if (!AuglyTest_ID.test(that.data.card_number)) {
err = '请输入正确的身份证号!';
} else if (that.data.fixed_phone == '' || !that.data.fixed_phone) {
err = '请输入您的固定电话!';
} else if (that.data.move_phone == '') {
err = '请输入您的移动电话!';
} else if (!AuglyTest_phone.test(that.data.move_phone)) {
... ... @@ -514,6 +593,7 @@ Page({
err = '请上传身份证反面!';
}
if (err == '') {
let record = that.data.record;
let record_start_time = [];
let record_end_time = [];
... ... @@ -567,18 +647,35 @@ Page({
photo: that.data.photo
}
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() {
setTimeout(function () {
wx.switchTab({
url: '/pages/my/my'
})
}, 1000)
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}).catch((err) => {})
} else {
wx.showToast({
... ... @@ -588,7 +685,10 @@ Page({
duration: 2000
})
}
},
getdatalist() {
let that = this;
let url = '/index/member_center/edit';
... ... @@ -599,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;
... ... @@ -646,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) => {
... ... @@ -655,10 +757,11 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
onLoad: function (options) {
console.log(options)
let that = this;
that.setData({
is_submit: options.is_submit ? options.is_submit:null,
is_submit: options.is_submit ? options.is_submit : null,
id: options.id,
page_type: options.type ? options.type : null
})
... ... @@ -673,22 +776,19 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
onHide: function () {
... ... @@ -697,28 +797,28 @@ Page({
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@
<image src='{{photo}}' wx:if='{{photo}}' mode="aspectFill"></image>
<view class='iconfont icon-xiangji' wx:if='{{!photo}}'></view>
</view>
<view class='tips_word'>请选择1:1的图像</view>
<view class='tips_word'>请选择1寸免冠照片</view>
</view>
... ... @@ -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}}">
... ... @@ -23,7 +24,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindbirthdayChange" end='{{enddata}}' disabled="{{page_type}}">
<picker mode='date' bindchange="bindbirthdayChange" value="{{2000-01-01}}" end='{{enddata}}' disabled="{{page_type}}">
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
... ... @@ -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>固定电话(选填)</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>
... ... @@ -138,7 +150,7 @@
<!-- 个人履历 -->
<view class='apply_nav'>
<view class='apply_cell {{apply_nav==0?"apply_active":""}}' data-apply_nav='0' bindtap='setapply_nav'>个人履历1</view>
<view class='apply_cell {{apply_nav==1?"apply_active":""}}' data-apply_nav='1' bindtap='setapply_nav'>个人履历2</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,27 +225,36 @@
</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}}">志愿者申请书
</view>
<view class='apply_bottom' wx:if="{{!page_type}}">
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<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>
</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>
<!-- 服务区域 -->
<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;
}
... ...
// pages/getNewsInfo/getNewsInfo.js
const app = getApp();
Page({
data: {
id: '',
list: ''
},
//
getactive() {
let that = this;
let url = '/index/second/getNewsInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url,params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getactive()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "志愿动态详情"
}
\ No newline at end of file
... ...
<view class="newinfo_banner">
<image src="{{list.thumbnail}}"></image>
</view>
<view class="newinfo_list">
<view class="goods_title">{{list.activity_name}}</view>
<view class="goods_name">
<image src="/imgs/zhiyuan1.png"></image> {{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>
</view>
</view>
\ No newline at end of file
... ...
image {
width: 100%;
height: 400rpx;
}
.newinfo_list {
/* margin-top: -10rpx; */
/* padding: 0 32rpx; */
/* border-top-left-radius: 10px;
border-top-right-radius: 10px; */
margin: 0 32rpx;
}
.goods_title {
margin-top: 32rpx;
/* height: 52rpx; */
font-size: 36rpx;
font-weight: 600;
}
.goods_name {
padding: 24rpx 0;
display: flex;
align-items: center;
font-size: 28rpx;
color: #7d7e80;
}
.goods_name image {
width: 36rpx;
height: 36rpx;
}
.goods_time {
margin-left: 58rpx;
}
.newinfo_text {
text-align: justify;
color: #5D5D5D;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
data: {
id: '',
list: '',
answers:[],
finaAnswer:[],
showAnswer: false
},
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getlist();
},
// 题
getlist() {
let that = this;
let url = '/index/second/getClassQuestion';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
class_id: that.data.id
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res,
tempList:JSON.parse(JSON.stringify(res))
})
}).catch((err) => {
})
},
radioChange(e){
let tempAnswer = e.detail.value.split(',');
this.data.answers[tempAnswer[1]] = tempAnswer[0];
this.data.finaAnswer[tempAnswer[1]]={
key: tempAnswer[0],
answer: tempAnswer[1]
}
this.data.list[tempAnswer[1]].choose = tempAnswer[2]
this.setData({
answers: this.data.answers,
finaAnswer:this.data.finaAnswer,
list:this.data.list
})
},
// 确认
getcomfirm() {
let that = this;
let url = '/index/second/commitAnswer';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
class_id: that.data.id,
}
app.post(url, params, head).then((res) => {
if (res.code == '40000') {
let answer = res
wx.showModal({
title: '提示',
content: '很遗憾你没有获得学时',
confirmText: '重新答题',
cancelText: '查看答案',
success(res) {
if (res.confirm) {
wx.redirectTo({
url: '/pages/getStudycontent/answer/answer?id='+that.data.id,
})
// let tempList = JSON.stringify(that.data.tempList)
// that.setData({
// showAnswer: false,
// // list: JSON.parse(tempList)
// })
console.log('用户点击确定')
} else if (res.cancel) {
// wx.navigateTo({
// url: '/pages/getStudycontent/answer/answer',
// })
that.setData({
showAnswer: true
})
console.log('用户点击取消')
}
}
})
} else {
wx.showModal({
title: '提示',
content: '恭喜',
showCancel: false,
success: function (res) {
}
})
}
}).catch((err) => {
console.log(err)
})
},
onHide: function () {
},
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "答题详情"
}
\ No newline at end of file
... ...
<view class="answer" wx:for="{{list}}" wx:for-index="index">
<view class="answer_left" wx:if="{{item.id<9}}">0{{item.id}}</view>
<view class="answer_left" wx:else>{{item.id}}</view>
<view class="answer_right">
<view class="answer_question">{{item.title}}</view>
<radio-group bindchange="radioChange">
<view class="flexs" wx:for="{{item.options_array}}" wx:for-index="idx" wx:for-item="second">
<view class="answer_answer">
<radio value="{{second+','+index+','+idx}}" checked=''>{{second}}</radio>
<block wx:if="{{showAnswer}}">
{{answer[index]}}
<image src="/imgs/zhengque-5.png" wx:if="{{item.answer==idx}}"></image>
<image src="/imgs/cuowu-3.png" wx:if='{{item.choose==idx}}'></image>
</block>
</view>
</view>
</radio-group>
</view>
</view>
<view class="shengqin">
<button bindtap="getcomfirm">确认</button>
</view>
<!-- 答案 -->
<!-- <view class="answer" wx:for="{{list}}" wx:for-index="index">
<view class="answer_left" wx:if="{{item.id<9}}">0{{item.id}}</view>
<view class="answer_left" wx:else>{{item.id}}</view>
<view class="answer_right">
<view class="answer_question">{{item.title}}</view>
<radio-group bindchange="radioChange">
<view class="flexs" wx:for="{{item.options_array}}" wx:for-index="idx" wx:for-item="second">
<view class="answer_answer">
<radio value="{{second+','+index}}" checked='{{item.choose}}'>{{second}}</radio>
</view>
</view>
</radio-group>
</view>
</view> -->
<view class="shengqin">
<button bindtap="getcomfirm">确认</button>
</view>
\ No newline at end of file
... ...
page {
background-color: rgb(240, 240, 240);
}
.answer {
padding: 32rpx 24rpx;
margin: 34rpx 32rpx;
border-radius: 16rpx;
background-color: #ffffff;
display: flex;
}
.answer_left {
font-size: 48rpx;
color: #C8C9CC;
margin-right: 20rpx;
}
.answer_right {
font-size: 28rpx;
color: #7D7E80;
}
.answer_question {
font-size: 32rpx;
color: #323233;
}
.answer_answer {
margin-top: 36rpx;
display: flex;
align-items: center;
}
.flexs{
display: flex;
flex-direction: column;
}
.flexs image{
width: 28rpx;
height: 28rpx;
margin-left: 22rpx;
}
/*单选框样式修改 */
/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked {
border-color: #099D43;
background: #099D43;
}
/* 未选中的 背景样式 */
checkbox .wx-checkbox-input{
border-color: #999;
border-radius: 50%;/* 圆角 */
height: 28rpx;
width: 28rpx;
}
/* 自定义样式.... */
radio .wx-radio-input {
height: 28rpx;
width: 28rpx;
margin-top: -4rpx;
border-radius: 50%;
border: 2rpx solid #999;
background: transparent;
}
/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked::before {
border-radius: 50%; /* 圆角 */
width: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
height: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
line-height: 28rpx;
text-align: center;
font-size: 28rpx; /* 对勾大小 30rpx */
color: #099D43; /* 对勾颜色 白色 */
background: #ffffff;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
/* */
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id: '',
list: ''
},
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getlist();
},
// 答题
getanswer() {
let that = this
var id = that.data.id
console.log(id)
wx.navigateTo({
url: '/pages/getStudycontent/answer/answer?id='+id,
})
},
// 内容
getlist() {
let that = this;
let url = '/index/second/getClassInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "学习内容"
}
\ No newline at end of file
... ...
<!--pages/getStudycontent/getStudycontent.wxml-->
<view class="answer_text">
<view class="answer_title">
{{list.title}}
</view>
<view class="answer_author">
<image src="/imgs/zhiyuan3.png"></image> {{list.author}}
<image style="margin-left:64rpx" src="/imgs/zhiyuan4.png"></image> {{list.work_time}}
</view>
<rich-text nodes="{{list.content}}"></rich-text>
</view>
<view class="answer" bindtap="getanswer">
<button hover-class="none">去答题</button>
</view>
\ No newline at end of file
... ...
.answer_title {
font-size: 36rpx;
color: black;
}
.answer_author {
display: flex;
align-items: center;
margin: 24rpx 0;
}
.answer_author image {
width: 30rpx;
height: 30rpx;
background: #666666;
margin-right: 8rpx;
}
.answer_text {
padding: 24rpx 32rpx;
font-size: 28rpx;
color: #5D5D5D;
}
.answer {
width: 100%;
height: 122rpx;
position: fixed;
bottom: 0;
box-shadow: 0px -6px 15px 0px rgba(0, 67, 26, 0.06);
display: flex;
align-items: center;
}
button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
font-size: 32rpx;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
border-radius: 22px;
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
//index.js
const app = getApp();
Page({
data: {
nav: 1,
navs: 1,
list: [],
},
//切换
bindNav(e) {
var nav = e.currentTarget.dataset.nav
console.log(nav)
this.setData({
nav
})
this.getaList();
},
bindtype(e) {
var navs = e.currentTarget.dataset.navs
console.log(navs)
this.setData({
navs
})
this.getaList();
},
onShow() {
let that = this;
this.getaList();
},
onLoad: function () {
},
getaList() {
let that = this;
let url = '/index/second/getRank';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
type: that.data.nav,
star: that.data.navs
}
console.log(params)
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
})
\ No newline at end of file
... ...