Merge branch 'master' of https://github.com/wanggeng888/xz_mini
# Conflicts: # project.config.json
This commit is contained in:
commit
f85d1434b8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/project.config.json
|
4
app.js
4
app.js
@ -7,9 +7,9 @@ App({
|
|||||||
newsUrl: 'http://192.168.0.113:8082/news',
|
newsUrl: 'http://192.168.0.113:8082/news',
|
||||||
libraryUrl: 'http://192.168.0.113:8081/library',
|
libraryUrl: 'http://192.168.0.113:8081/library',
|
||||||
venueUrl: 'http://192.168.0.109:8082/venuebooking',
|
venueUrl: 'http://192.168.0.109:8082/venuebooking',
|
||||||
activityUrl: 'http://192.168.0.111:8080/culturalactivity/',
|
activityUrl: 'http://192.168.0.111:8080/culturalactivity',
|
||||||
volunteerUrl: 'http://192.168.0.111:8888/volunteer/',
|
volunteerUrl: 'http://192.168.0.111:8888/volunteer/',
|
||||||
|
liveUrl: 'http://192.168.0.113:8084/live',
|
||||||
restAjax: restAjax,
|
restAjax: restAjax,
|
||||||
dialog: dialog,
|
dialog: dialog,
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
|
7
app.json
7
app.json
@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/center/center",
|
"pages/book/book",
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
|
"pages/broadcast/broadcast",
|
||||||
|
"pages/activityDialog/activityDialog",
|
||||||
|
"pages/teamDetail/teamDetail",
|
||||||
|
"pages/center/center",
|
||||||
"pages/volunteerRegister/volunteerRegister",
|
"pages/volunteerRegister/volunteerRegister",
|
||||||
"pages/volunteer/volunteer",
|
"pages/volunteer/volunteer",
|
||||||
"pages/heritage/heritage",
|
"pages/heritage/heritage",
|
||||||
@ -9,7 +13,6 @@
|
|||||||
"pages/venueDetail/venueDetail",
|
"pages/venueDetail/venueDetail",
|
||||||
"pages/register/register",
|
"pages/register/register",
|
||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/broadcast/broadcast",
|
|
||||||
"pages/newVolunteerActivity/newVolunteerActivity",
|
"pages/newVolunteerActivity/newVolunteerActivity",
|
||||||
"pages/newTeam/newTeam",
|
"pages/newTeam/newTeam",
|
||||||
"pages/volunteerTeam/volunteerTeam",
|
"pages/volunteerTeam/volunteerTeam",
|
||||||
|
BIN
images/delete.png
Normal file
BIN
images/delete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 497 B |
@ -1,12 +1,11 @@
|
|||||||
// pages/activity/activity.js
|
// pages/activity/activity.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
url: 'http://192.168.0.111:8080/culturalactivity/',
|
|
||||||
imgUrl: 'http://192.168.0.111:8080/culturalactivity/route/file/downloadfile/true/',
|
|
||||||
dataList: []
|
dataList: []
|
||||||
},
|
},
|
||||||
goDetail: function (e) {
|
goDetail: function (e) {
|
||||||
@ -20,20 +19,22 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
||||||
url: self.data.url + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease',
|
{}, null, function(code, data) {
|
||||||
success: function(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
for(var item of data.rows) {
|
||||||
for(var item of res.data.rows) {
|
|
||||||
if('' != item.activityImage) {
|
if('' != item.activityImage) {
|
||||||
item.activityImage = self.data.imgUrl + item.activityImage;
|
item.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + item.activityImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
dataList: res.data.rows,
|
dataList: data.rows,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
// pages/activityDetail/activityDetail.js
|
// pages/activityDetail/activityDetail.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
url: 'http://192.168.0.111:8080/culturalactivity/',
|
|
||||||
imgUrl: 'http://192.168.0.111:8080/culturalactivity/route/file/downloadfile/true/',
|
|
||||||
dataMap: {}
|
dataMap: {}
|
||||||
},
|
},
|
||||||
goSign: function () {
|
goSign: function () {
|
||||||
@ -20,16 +19,18 @@ Page({
|
|||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var id = options.id;
|
var id = options.id;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []),
|
||||||
url: self.data.url + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id,
|
{}, null, function(code, data) {
|
||||||
success: function(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
data.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + data.activityImage;
|
||||||
res.data.activityImage = self.data.imgUrl + res.data.activityImage;
|
|
||||||
self.setData({
|
self.setData({
|
||||||
dataMap: res.data
|
dataMap: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
66
pages/activityDialog/activityDialog.js
Normal file
66
pages/activityDialog/activityDialog.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
// pages/activityDialog/activityDialog.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
32
pages/activityDialog/activityDialog.wxml
Normal file
32
pages/activityDialog/activityDialog.wxml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<view class="dialog">
|
||||||
|
<view class="dialog-box">
|
||||||
|
<view class="avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="user-info">
|
||||||
|
<view class="name">姓名</view>
|
||||||
|
<view class="content">哈哈哈哈哈</view>
|
||||||
|
<view class="public-time">
|
||||||
|
<view class="time">2020-02-02 00:00:00</view>
|
||||||
|
<view class="delete">
|
||||||
|
<image src="../../images/delete.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="dialog-box">
|
||||||
|
<view class="avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="user-info">
|
||||||
|
<view class="name">姓名</view>
|
||||||
|
<view class="content">哈哈哈哈哈</view>
|
||||||
|
<view class="public-time">
|
||||||
|
<view class="time">2020-02-02 00:00:00</view>
|
||||||
|
<view class="delete">
|
||||||
|
<image src="../../images/delete.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
42
pages/activityDialog/activityDialog.wxss
Normal file
42
pages/activityDialog/activityDialog.wxss
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
.dialog{
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
.dialog-box{
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.avatar{
|
||||||
|
width: 15%;
|
||||||
|
}
|
||||||
|
.avatar image{
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
}
|
||||||
|
.user-info{
|
||||||
|
width: 83%;
|
||||||
|
border-bottom: 1px solid #DEDEDE;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.name{
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #949494;
|
||||||
|
margin: 15rpx 0;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
.public-time{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.time{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #949494;
|
||||||
|
}
|
||||||
|
.delete, .delete image{
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
75
pages/book/book.js
Normal file
75
pages/book/book.js
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
// pages/book/book.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
checkOrder: false
|
||||||
|
},
|
||||||
|
doCheckOrder: function () {
|
||||||
|
this.setData({
|
||||||
|
checkOrder: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
closeCheckOrder: function () {
|
||||||
|
this.setData({
|
||||||
|
checkOrder: false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
3
pages/book/book.json
Normal file
3
pages/book/book.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
135
pages/book/book.wxml
Normal file
135
pages/book/book.wxml
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<view class="top-select">
|
||||||
|
<view class="select-box active">
|
||||||
|
<image src="../../images/selected-l.png" class="select-l"></image>
|
||||||
|
篮球
|
||||||
|
<image src="../../images/selected-r.png" class="select-r"></image>
|
||||||
|
</view>
|
||||||
|
<view class="select-box">
|
||||||
|
<image src="../../images/selected-l.png" class="select-l"></image>
|
||||||
|
篮球
|
||||||
|
<image src="../../images/selected-r.png" class="select-r"></image>
|
||||||
|
</view>
|
||||||
|
<view class="select-box">
|
||||||
|
<image src="../../images/selected-l.png" class="select-l"></image>
|
||||||
|
篮球
|
||||||
|
<image src="../../images/selected-r.png" class="select-r"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="venue-info">
|
||||||
|
<view class="title">营业时间:</view>
|
||||||
|
<view class="content">暂无信息</view>
|
||||||
|
<view class="title">项目描述:</view>
|
||||||
|
<view class="content">暂无信息</view>
|
||||||
|
<view class="title">场地设置:</view>
|
||||||
|
<view class="content">暂无信息</view>
|
||||||
|
</view>
|
||||||
|
<view class="date">
|
||||||
|
<view class="date-container">
|
||||||
|
<view class="date-box active">2020-01-01</view>
|
||||||
|
<view class="date-box">2020-01-01</view>
|
||||||
|
<view class="date-box">2020-01-01</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="ground">
|
||||||
|
<view class="ground-container">
|
||||||
|
<view class="ground-box active">
|
||||||
|
<image src="../../images/selected-l.png" class="left"></image>
|
||||||
|
场地1
|
||||||
|
<image src="../../images/selected-r.png" class="right"></image>
|
||||||
|
</view>
|
||||||
|
<view class="ground-box">
|
||||||
|
<image src="../../images/selected-l.png" class="left"></image>
|
||||||
|
场地1
|
||||||
|
<image src="../../images/selected-r.png" class="right"></image>
|
||||||
|
</view>
|
||||||
|
<view class="ground-box">
|
||||||
|
<image src="../../images/selected-l.png" class="left"></image>
|
||||||
|
场地1
|
||||||
|
<image src="../../images/selected-r.png" class="right"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="time">
|
||||||
|
<view class="time-box selected">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
<view class="time-box">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
<view class="time-box">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
<view class="time-box">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="phone-code">
|
||||||
|
<view class="row">
|
||||||
|
<view class="row-title">手机号:</view>
|
||||||
|
<view class="row-input">
|
||||||
|
<input placeholder="请输入手机号"></input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view class="row-title">验证码:</view>
|
||||||
|
<view class="row-input">
|
||||||
|
<input placeholder="请输入验证码" class="code-input"></input>
|
||||||
|
<view class="get-code">获取验证码</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="pay-book">
|
||||||
|
<view class="pay" bindtap="doCheckOrder">
|
||||||
|
订单金额:10元
|
||||||
|
</view>
|
||||||
|
<view class="book">
|
||||||
|
预定
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-info" bindtap="closeCheckOrder" wx:if="{{checkOrder}}">
|
||||||
|
<view class="order-container">
|
||||||
|
<view class="order-title">订单信息</view>
|
||||||
|
<view class="order">
|
||||||
|
<view class="order-box">
|
||||||
|
<view class="top">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom-info">
|
||||||
|
<view>场地1</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-box">
|
||||||
|
<view class="top">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom-info">
|
||||||
|
<view>场地1</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-box">
|
||||||
|
<view class="top">
|
||||||
|
<view>2020-01-01</view>
|
||||||
|
<view>12:00-13:00</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom-info">
|
||||||
|
<view>场地1</view>
|
||||||
|
<view>15元</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
221
pages/book/book.wxss
Normal file
221
pages/book/book.wxss
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
.top-select{
|
||||||
|
height:90rpx;
|
||||||
|
background:rgba(255,255,255,1);
|
||||||
|
box-shadow:0px 0px 16rpx 0px rgba(0,0,0,0.1);
|
||||||
|
border-radius:0px 0px 31rpx 31rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.select-box{
|
||||||
|
padding: 0 30rpx;
|
||||||
|
position: relative;
|
||||||
|
font-size: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.select-box image{
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 20rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
display: none;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
}
|
||||||
|
.select-box.active image{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.select-l{
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.select-r{
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.venue-info{
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #949494;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
border-top: 3px solid #DEDEDE;
|
||||||
|
border-bottom: 3px solid #DEDEDE;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.date-container, .ground-container{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
.date-box, .ground-box{
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #949494;
|
||||||
|
}
|
||||||
|
.date-box.active{
|
||||||
|
color: #9F1512;
|
||||||
|
}
|
||||||
|
.ground{
|
||||||
|
margin: 20rpx 0;
|
||||||
|
padding: 0 30rpx 20rpx;
|
||||||
|
border-bottom: 3px solid #DEDEDE;
|
||||||
|
}
|
||||||
|
.ground-box{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.ground-box image{
|
||||||
|
width: 20rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.left{
|
||||||
|
left: 0
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
right: 0
|
||||||
|
}
|
||||||
|
.ground-box.active{
|
||||||
|
color: #9F1512;
|
||||||
|
}
|
||||||
|
.ground-box.active image{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.time{
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.time-box{
|
||||||
|
display: inline-block;
|
||||||
|
width: 32%;
|
||||||
|
margin-right: 2%;
|
||||||
|
background: rgba(159,21,18,.5);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 15rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.time-box:nth-child(3n){
|
||||||
|
margin-right: 0
|
||||||
|
}
|
||||||
|
.time-box.selected{
|
||||||
|
background: #9F1512;
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 15rpx 30rpx;
|
||||||
|
}
|
||||||
|
.phone-code{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.row{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.row-title{
|
||||||
|
width: 20%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
line-height: 55rpx;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
|
.row-input{
|
||||||
|
width: 78%;
|
||||||
|
border-bottom: 1px solid #DEDEDE;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
|
.row-input input{
|
||||||
|
width: 100%;
|
||||||
|
height: 55rpx;
|
||||||
|
}
|
||||||
|
.row-input input.code-input{
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
.get-code{
|
||||||
|
width: 28%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: #9F1512;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.pay-book{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.pay, .book{
|
||||||
|
width: 70%;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #9F1512;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.book{
|
||||||
|
width: 29%;
|
||||||
|
}
|
||||||
|
.order-info{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
}
|
||||||
|
.order-container{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 90rpx;
|
||||||
|
left: 30rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.order-title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #9F1512;
|
||||||
|
}
|
||||||
|
.order{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.order-box{
|
||||||
|
border: 1px solid #9F1512;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
width: 32%;
|
||||||
|
}
|
||||||
|
.top{
|
||||||
|
background: #9F1512;
|
||||||
|
color: #fff;
|
||||||
|
}
|
@ -1,22 +1,57 @@
|
|||||||
// pages/broadcast/broadcast.js
|
// pages/broadcast/broadcast.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
live: {
|
||||||
|
liveUrl: app.liveUrl,
|
||||||
|
liveList: []
|
||||||
|
},
|
||||||
|
currentPage: 1,
|
||||||
|
rows: 10
|
||||||
},
|
},
|
||||||
goDetail: function () {
|
doGetLiveList: function(page) {
|
||||||
|
var self = this;
|
||||||
|
app.dialog.loading('正在加载');
|
||||||
|
app.restAjax.get(app.restAjax.path('{liveUrl}/app/liveplan/listpageliveplanrelease', [self.data.live.liveUrl]), {
|
||||||
|
page: page,
|
||||||
|
rows: self.data.rows
|
||||||
|
}, null, function(code, data) {
|
||||||
|
if(data.rows.length == 0) {
|
||||||
|
app.dialog.msg('暂无数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var liveArray;
|
||||||
|
if(page <= 1) {
|
||||||
|
liveArray = data.rows;
|
||||||
|
} else {
|
||||||
|
liveArray = self.data.live.liveList;
|
||||||
|
liveArray = liveArray.concat(data.rows);
|
||||||
|
}
|
||||||
|
self.setData({
|
||||||
|
currentPage: page,
|
||||||
|
'live.liveList': liveArray
|
||||||
|
})
|
||||||
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
wx.hideLoading();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goDetail: function (event) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../broadcastDetail/broadcastDetail',
|
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
var self = this;
|
||||||
|
self.doGetLiveList(1);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,14 +86,14 @@ Page({
|
|||||||
* 页面相关事件处理函数--监听用户下拉动作
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
*/
|
*/
|
||||||
onPullDownRefresh: function () {
|
onPullDownRefresh: function () {
|
||||||
|
this.doGetLiveList(1);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面上拉触底事件的处理函数
|
* 页面上拉触底事件的处理函数
|
||||||
*/
|
*/
|
||||||
onReachBottom: function () {
|
onReachBottom: function () {
|
||||||
|
this.doGetLiveList(this.data.currentPage + 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {},
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"backgroundTextStyle": "dark"
|
||||||
}
|
}
|
@ -1,20 +1,12 @@
|
|||||||
<view class="broadcast">
|
<view class="broadcast">
|
||||||
<view class="broadcast-box" bindtap="goDetail">
|
<view class="broadcast-box" bindtap="goDetail" data-live-plan-id="{{item.livePlanId}}" wx:for="{{live.liveList}}" wx:for-index="idx" wx:for-item="item" wx:key="liveList">
|
||||||
<view class="broadcast-img">
|
<view class="broadcast-img">
|
||||||
<image src="../../images/center-bg.png"></image>
|
<image src="{{live.liveUrl}}/route/file/downloadfile/true/{{item.livePlanPhoto}}"></image>
|
||||||
|
<view class="broadcast-status">直播中</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="broadcast-info">
|
<view class="broadcast-info">
|
||||||
<view class="name">银保监会印发《关于加快推进意外险改直播标题</view>
|
<view class="name">{{item.livePlanName}}</view>
|
||||||
<view class="time">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
|
<view class="time">{{item.livePlanStart}}至{{item.livePlanEnd}}</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="broadcast-box" bindtap="goDetail">
|
|
||||||
<view class="broadcast-img">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="broadcast-info">
|
|
||||||
<view class="name">银保监会印发《关于加快推进意外险改直播标题</view>
|
|
||||||
<view class="time">2020-02-02 14:00:00至2020-02-03 14:00:00</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
@ -11,6 +11,9 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 310rpx;
|
height: 310rpx;
|
||||||
}
|
}
|
||||||
|
.broadcast-img{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.broadcast-info{
|
.broadcast-info{
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
@ -25,4 +28,14 @@
|
|||||||
color: #242424;
|
color: #242424;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
.broadcast-status{
|
||||||
|
position: absolute;
|
||||||
|
top: 15rpx;
|
||||||
|
right: 15rpx;
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
background: #9F1512;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
var app = getApp();
|
||||||
function getRandomColor() {
|
function getRandomColor() {
|
||||||
const rgb = []
|
const rgb = []
|
||||||
for (let i = 0; i < 3; ++i) {
|
for (let i = 0; i < 3; ++i) {
|
||||||
@ -10,7 +11,9 @@ function getRandomColor() {
|
|||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
src: '',
|
liveUrl: app.liveUrl,
|
||||||
|
liveDetail: {},
|
||||||
|
videoContext: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@ -21,7 +24,23 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onReady() {
|
onReady() {
|
||||||
this.videoContext = wx.createVideoContext('myVideo')
|
// this.videoContext = wx.createVideoContext('myVideo')
|
||||||
|
|
||||||
|
},
|
||||||
|
getLivePlan(livePlanId) {
|
||||||
|
var self = this;
|
||||||
|
app.restAjax.get(app.restAjax.path('{liveUrl}/app/liveplan/getliveplanbyidrelease/{livePlanId}', [self.data.liveUrl, livePlanId]), {}, null, function(code, data) {
|
||||||
|
self.setData({
|
||||||
|
liveDetail: data
|
||||||
|
});
|
||||||
|
self.videoContext = wx.createLivePlayerContext('liveVideo');
|
||||||
|
self.videoContext.play();
|
||||||
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.getLivePlan(option.livePlanId);
|
||||||
},
|
},
|
||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
|
@ -1,35 +1,23 @@
|
|||||||
<view class="broadcast">
|
<view class="broadcast">
|
||||||
<view class="page-section tc">
|
<!-- <view class="page-section tc">
|
||||||
<video
|
<video id="myVideo" src="{{liveDetail.liveDeviceRtmpUrl}}" binderror="videoErrorCallback" danmu-list="{{danmuList}}" enable-danmu show-center-play-btn='{{false}}' show-play-btn="{{true}}" controls autoplay="{{true}}" picture-in-picture-mode="{{['push', 'pop']}}" bindenterpictureinpicture='bindVideoEnterPictureInPicture' bindleavepictureinpicture='bindVideoLeavePictureInPicture'></video>
|
||||||
id="myVideo"
|
</view> -->
|
||||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
<live-player id="liveVideo" src="{{liveDetail.liveDeviceRtmpUrl}}" mode="live" object-fit="contain" style="width: 100%; height: 400rpx;"/>
|
||||||
binderror="videoErrorCallback"
|
|
||||||
danmu-list="{{danmuList}}"
|
|
||||||
enable-danmu
|
|
||||||
show-center-play-btn='{{false}}'
|
|
||||||
show-play-btn="{{true}}"
|
|
||||||
controls
|
|
||||||
autoplay="{{true}}"
|
|
||||||
picture-in-picture-mode="{{['push', 'pop']}}"
|
|
||||||
bindenterpictureinpicture='bindVideoEnterPictureInPicture'
|
|
||||||
bindleavepictureinpicture='bindVideoLeavePictureInPicture'
|
|
||||||
></video>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="broadcast-title">银保监会印发《关于加快推进意外直播标题</view>
|
<view class="broadcast-title">{{liveDetail.livePlanName}}</view>
|
||||||
<view class="broadcast-time">
|
<view class="broadcast-time">
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<image src="../../images/time.png"></image>
|
<image src="../../images/time.png"></image>
|
||||||
<text>开始时间:</text>
|
<text>开始时间:</text>
|
||||||
2020-02-03 14:00:00
|
{{liveDetail.livePlanStart}}
|
||||||
</view>
|
</view>
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<image src="../../images/time.png"></image>
|
<image src="../../images/time.png"></image>
|
||||||
<text>结束时间:</text>
|
<text>结束时间:</text>
|
||||||
2020-02-03 14:00:00
|
{{liveDetail.livePlanEnd}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="broadcast-intro">
|
<view class="broadcast-intro">
|
||||||
<view class="broadcast-intro-title">直播介绍</view>
|
<view class="broadcast-intro-title">介绍</view>
|
||||||
<view class="intro-text">光拉便半运县写员二到院细天县见运命运感知争公着解全得律号深共权发市以家情军少先意单理样好族权达保很具你住红许气已第白知题候其然知王公众我头务族观经市指或七比生。适基历然题和低是局着先重信知议过说心龙素标安放大支入完二种设力果每角解收美约声里历美节办约管运但然新分活们心毛手过共点家或。革解快和特技县应精术被心走小器风育明油备己世国生往支因叫正心在备什新候流广这地。离克的却五北林越用变义按地界你值名证所局的况果被半去量片来参例形极别色部米老近和住例外七强可学变山意断群济。到报还省边速低起分力少族。</view>
|
<view class="intro-text">{{liveDetail.livePlanRecord}}</view>
|
||||||
</view>
|
</view>
|
@ -7,8 +7,19 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
userAvatar: '',
|
userAvatar: '',
|
||||||
token: ''
|
token: '',
|
||||||
|
userInfo: {},
|
||||||
|
usercenterUrl: app.usercenterUrl,
|
||||||
|
sourcePath: '/route/file/downloadfile/true/',
|
||||||
|
randomName: '',
|
||||||
|
showPhone: true,
|
||||||
|
phone: '',
|
||||||
|
code: '',
|
||||||
|
gotCode: false,
|
||||||
|
restTime: 120,
|
||||||
|
timer: ''
|
||||||
},
|
},
|
||||||
|
// 选择头像来源
|
||||||
changeAvatar: function () {
|
changeAvatar: function () {
|
||||||
var self = this
|
var self = this
|
||||||
wx.showActionSheet({
|
wx.showActionSheet({
|
||||||
@ -24,6 +35,7 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 选择图片
|
||||||
chooseAvatar: function (type) {
|
chooseAvatar: function (type) {
|
||||||
var self = this
|
var self = this
|
||||||
wx.chooseImage({
|
wx.chooseImage({
|
||||||
@ -32,14 +44,13 @@ Page({
|
|||||||
sourceType: [type],
|
sourceType: [type],
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
var avatar = res.tempFilePaths[0];
|
var avatar = res.tempFilePaths[0];
|
||||||
console.log(avatar)
|
|
||||||
app.restAjax.file(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
|
app.restAjax.file(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
|
||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
}
|
}
|
||||||
}, function (code, data) {
|
}, function (code, data) {
|
||||||
console.log(data);
|
var id = JSON.parse(data).data
|
||||||
|
self.uploadAvatar(id)
|
||||||
}, function (code, data) {
|
}, function (code, data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
})
|
})
|
||||||
@ -49,6 +60,38 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 上传
|
||||||
|
uploadAvatar: function (avatarId) {
|
||||||
|
var self = this
|
||||||
|
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateuseravatar', [app.usercenterUrl]), {
|
||||||
|
avatar: avatarId
|
||||||
|
}, {
|
||||||
|
headers: {
|
||||||
|
token: self.data.token
|
||||||
|
}
|
||||||
|
}, function (code, data) {
|
||||||
|
wx.setStorageSync('token', data.data);
|
||||||
|
self.getUserInfo()
|
||||||
|
}, function (code, data) {
|
||||||
|
console.log(data)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取用户信息
|
||||||
|
getUserInfo: function () {
|
||||||
|
var self = this
|
||||||
|
app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, {
|
||||||
|
headers: {
|
||||||
|
token: self.data.token
|
||||||
|
}
|
||||||
|
}, function (code, data) {
|
||||||
|
self.setData({
|
||||||
|
userInfo: data
|
||||||
|
})
|
||||||
|
}, function (code, data) {
|
||||||
|
console.log(data)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取token
|
||||||
getToken: function () {
|
getToken: function () {
|
||||||
var self = this
|
var self = this
|
||||||
wx.getStorage({
|
wx.getStorage({
|
||||||
@ -57,6 +100,7 @@ Page({
|
|||||||
self.setData({
|
self.setData({
|
||||||
token: res.data
|
token: res.data
|
||||||
})
|
})
|
||||||
|
self.getUserInfo()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -65,7 +109,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
toMyTeam: function() {
|
toMyTeam: function() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../myVlounteerTeam/myVlounteerTeam',
|
url: '../myVolunteerTeam/myVolunteerTeam',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -76,11 +120,126 @@ Page({
|
|||||||
url: '../myVolunteerActivity/myVolunteerActivity',
|
url: '../myVolunteerActivity/myVolunteerActivity',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 判断用户是否为随机名称
|
||||||
|
isRandomName: function () {
|
||||||
|
var self = this
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'isRandomUsername',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.data == 1) {
|
||||||
|
wx.hideTabBar()
|
||||||
|
self.setData({
|
||||||
|
randomName: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消绑定手机
|
||||||
|
cancelPhone: function () {
|
||||||
|
this.setData({
|
||||||
|
showPhone: false
|
||||||
|
})
|
||||||
|
wx.showTabBar()
|
||||||
|
},
|
||||||
|
// 获取输入的手机号
|
||||||
|
phoneNum: function (res) {
|
||||||
|
this.setData({
|
||||||
|
phone: res.detail.value
|
||||||
|
})
|
||||||
|
console.log(this.data.phone)
|
||||||
|
},
|
||||||
|
// 校验手机号
|
||||||
|
testPhone: function () {
|
||||||
|
var self = this
|
||||||
|
if (self.data.phone) {
|
||||||
|
if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(self.data.phone)) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请输入正确的手机号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
self.getCode()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
wx.showToast({
|
||||||
|
title: '手机号不能为空',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取验证码
|
||||||
|
getCode: function () {
|
||||||
|
var self = this
|
||||||
|
app.restAjax.get(app.restAjax.path('{usercenterUrl}/api/sms/getverificationcode/' + self.data.phone, [app.usercenterUrl]), {}, null,
|
||||||
|
function (code, data) {
|
||||||
|
if (code == 200) {
|
||||||
|
console.log(data)
|
||||||
|
self.setData({
|
||||||
|
gotCode: true
|
||||||
|
})
|
||||||
|
self.data.timer = setInterval(function () {
|
||||||
|
var cur = self.data.restTime - 1
|
||||||
|
console.log(cur)
|
||||||
|
if (cur == 0) {
|
||||||
|
clearInterval(self.data.timer)
|
||||||
|
self.setData({
|
||||||
|
restTime: 120,
|
||||||
|
gotCode: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
self.setData({
|
||||||
|
restTime: cur
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (code, data) {
|
||||||
|
console.log(data)
|
||||||
|
wx.showToast({
|
||||||
|
title: data.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
} )
|
||||||
|
},
|
||||||
|
// 提交绑定手机
|
||||||
|
submitPhone: function () {
|
||||||
|
var self = this
|
||||||
|
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), {
|
||||||
|
phone: self.data.phone,
|
||||||
|
verificationCode: self.data.code
|
||||||
|
}, {
|
||||||
|
headers: {
|
||||||
|
token: self.data.token
|
||||||
|
}
|
||||||
|
}, function (code, data) {
|
||||||
|
console.log(data)
|
||||||
|
wx.setStorageSync('token', data.data);
|
||||||
|
wx.setStorageSync('isRandomUsername', 0)
|
||||||
|
clearInterval(self.data.timer)
|
||||||
|
self.setData({
|
||||||
|
showPhone: false,
|
||||||
|
restTime: 120
|
||||||
|
})
|
||||||
|
self.getUserInfo()
|
||||||
|
}, function (code, data) {
|
||||||
|
console.log(data)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 验证码
|
||||||
|
inputCode: function (e) {
|
||||||
|
this.setData({
|
||||||
|
code: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
this.isRandomName()
|
||||||
this.getToken()
|
this.getToken()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="person">
|
<view class="person">
|
||||||
<view class="user-avatar" bindtap="changeAvatar">
|
<view class="user-avatar" bindtap="changeAvatar" wx:if="{{userInfo.avatar}}">
|
||||||
<image src="{{userAvatar}}"></image>
|
<image src="{{usercenterUrl}}{{sourcePath}}{{userInfo.avatar}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="user-name">杜若无心</view>
|
<view class="user-name">{{userInfo.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="main-title">常用功能</view>
|
<view class="main-title">常用功能</view>
|
||||||
@ -23,13 +23,13 @@
|
|||||||
<image src="../../images/my-collect.png"></image>
|
<image src="../../images/my-collect.png"></image>
|
||||||
<view class="title">我的收藏</view>
|
<view class="title">我的收藏</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main-box">
|
<view class="main-box" bindtap="toMyTeam">
|
||||||
<image src="../../images/share.png"></image>
|
<image src="../../images/share.png"></image>
|
||||||
<view class="title" bindtap="toMyTeam">我的志愿团队</view>
|
<view class="title">我的志愿团队</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main-box">
|
<view class="main-box" bindtap="toMyVolunteerActivity">
|
||||||
<image src="../../images/team.png"></image>
|
<image src="../../images/team.png"></image>
|
||||||
<view class="title" bindtap="toMyVolunteerActivity">我的志愿活动</view>
|
<view class="title">我的志愿活动</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main-box">
|
<view class="main-box">
|
||||||
<image src="../../images/share.png"></image>
|
<image src="../../images/share.png"></image>
|
||||||
@ -41,4 +41,21 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="set-phone" wx:if="{{randomName && showPhone}}">
|
||||||
|
<view class="set-phone-box">
|
||||||
|
<view class="tips">您还没有绑定手机号,请先绑定手机号</view>
|
||||||
|
<view class="phone-input">
|
||||||
|
<input placeholder="请输入手机号" bindinput="phoneNum" class="phone-input"></input>
|
||||||
|
</view>
|
||||||
|
<view class="code-input">
|
||||||
|
<input placeholder="请输入验证码" bindinput="inputCode"></input>
|
||||||
|
<view class="get-code" bindtap="testPhone" wx:if="{{!gotCode}}">获取验证码</view>
|
||||||
|
<view class="got-code" wx:else>{{restTime}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="set-phone-btn-box">
|
||||||
|
<view class="set-phone-btn" bindtap="submitPhone">确认</view>
|
||||||
|
<view class="set-phone-btn" bindtap="cancelPhone">取消</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
@ -63,4 +63,83 @@
|
|||||||
.title{
|
.title{
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #242424;
|
color: #242424;
|
||||||
|
}
|
||||||
|
.set-phone{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, .6);
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
.set-phone-box{
|
||||||
|
width: 96%;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.tips{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.phone-input{
|
||||||
|
margin: 25rpx 0;
|
||||||
|
}
|
||||||
|
.code-input{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 25rpx;
|
||||||
|
}
|
||||||
|
.code-input input{
|
||||||
|
width: 70%;
|
||||||
|
height: 55rpx;
|
||||||
|
border: 1px solid #dedede;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.phone-input input{
|
||||||
|
width: 100%;
|
||||||
|
height: 55rpx;
|
||||||
|
border: 1px solid #dedede;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.get-code, .got-code{
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: rgba(159,21,18,.1);
|
||||||
|
color: #9F1512;
|
||||||
|
width: 28%;
|
||||||
|
line-height: 55rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.got-code{
|
||||||
|
background: #fff;
|
||||||
|
color: #4a4d52;
|
||||||
|
border: 1px solid #eaeaea;
|
||||||
|
}
|
||||||
|
.set-phone-btn-box{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.set-phone-btn{
|
||||||
|
width: 49%;
|
||||||
|
height: 65rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
background: #9F1512;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
@ -16,10 +16,16 @@ Page({
|
|||||||
newsList: []
|
newsList: []
|
||||||
},
|
},
|
||||||
venue: {
|
venue: {
|
||||||
venueUrl: app.venueUrl
|
venueUrl: app.venueUrl,
|
||||||
|
venueList: []
|
||||||
},
|
},
|
||||||
activity: {
|
activity: {
|
||||||
activityUrl: app.activityUrl
|
activityUrl: app.activityUrl,
|
||||||
|
activityList: []
|
||||||
|
},
|
||||||
|
live: {
|
||||||
|
liveUrl: app.liveUrl,
|
||||||
|
liveList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doLogin: function () {
|
doLogin: function () {
|
||||||
@ -60,17 +66,31 @@ Page({
|
|||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doGetVenue: function() {
|
doGetVenueList: function() {
|
||||||
app.restAjax.get(app.restAjax.path('', []), {
|
var self = this;
|
||||||
|
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [self.data.venue.venueUrl]), {
|
||||||
|
page: 1,
|
||||||
|
rows: 3
|
||||||
}, null, function(code, data) {
|
}, null, function(code, data) {
|
||||||
|
self.setData({
|
||||||
|
'venue.venueList': data.rows
|
||||||
|
});
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doGetActivity: function() {
|
doGetActivityList: function() {
|
||||||
|
var self = this;
|
||||||
|
app.restAjax.get(app.restAjax.path('{activityUrl}/app/activitylibrary/listpageactivitylibraryrelease', [self.data.activity.activityUrl]), {
|
||||||
|
page: 1,
|
||||||
|
rows: 3
|
||||||
|
}, null, function(code, data) {
|
||||||
|
self.setData({
|
||||||
|
'activity.activityList': data.rows
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
doGetNewsList: function() {
|
doGetNewsList: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -85,6 +105,19 @@ Page({
|
|||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
doGetLiveList: function() {
|
||||||
|
var self = this;
|
||||||
|
app.restAjax.get(app.restAjax.path('{liveUrl}/app/liveplan/listpageliveplanrelease', [self.data.live.liveUrl]), {
|
||||||
|
page: 1,
|
||||||
|
rows: 4
|
||||||
|
}, null, function(code, data) {
|
||||||
|
self.setData({
|
||||||
|
'live.liveList': data.rows
|
||||||
|
})
|
||||||
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
},
|
||||||
goNewsDetail: function () {
|
goNewsDetail: function () {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../newsDetail/newsDetail',
|
url: '../newsDetail/newsDetail',
|
||||||
@ -133,6 +166,9 @@ Page({
|
|||||||
self.doLogin();
|
self.doLogin();
|
||||||
self.doGetLibrary();
|
self.doGetLibrary();
|
||||||
self.doGetNewsList();
|
self.doGetNewsList();
|
||||||
|
self.doGetLiveList();
|
||||||
|
self.doGetVenueList();
|
||||||
|
self.doGetActivityList();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,20 +36,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-container">
|
<view class="recommend-container">
|
||||||
<view class="recommend-box">
|
<view class="recommend-box" wx:for="{{venue.venueList}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
||||||
<image src="../../images/center-bg.png"></image>
|
<image src="{{venue.venueUrl}}/route/file/downloadfile/true/{{item.venuePanorama}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-box">
|
<view class="recommend-box" wx:for="{{activity.activityList}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
||||||
<image src="../../images/center-bg.png"></image>
|
<image src="{{activity.activityUrl}}/route/file/downloadfile/true/{{item.activityImage}}"></image>
|
||||||
</view>
|
|
||||||
<view class="recommend-box">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="recommend-box">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="recommend-box">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -124,14 +115,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="broadcast-container">
|
<view class="broadcast-container">
|
||||||
<view class="broadcast-box" bindtap="goBroadcastDetail">
|
<view class="broadcast-box" bindtap="goBroadcastDetail" wx:for="{{live.liveList}}" wx:for-index="index" wx:for-item="item" wx:key="liveList">
|
||||||
<image src="../../images/center-bg.png"></image>
|
<image src="{{live.liveUrl}}/route/file/downloadfile/true/{{item.livePlanPhoto}}"></image>
|
||||||
</view>
|
<view class="broadcast-text">文字</view>
|
||||||
<view class="broadcast-box" bindtap="goBroadcastDetail">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="broadcast-box" bindtap="goBroadcastDetail">
|
|
||||||
<image src="../../images/center-bg.png"></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
@ -128,8 +128,22 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 185rpx;
|
height: 185rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.broadcast-box image{
|
.broadcast-box image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
}
|
||||||
|
.broadcast-text{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 5rpx 10rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
color: #fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
// pages/volunteer/volunteer.js
|
// pages/volunteer/volunteer.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
token: '',
|
token: '',
|
||||||
otherTeamMap: {},
|
dataMap: {},
|
||||||
type: '1',
|
type: '1',
|
||||||
teamId: '',
|
teamId: '',
|
||||||
|
|
||||||
@ -31,33 +31,53 @@ Page({
|
|||||||
url: '../newTeam/newTeam',
|
url: '../newTeam/newTeam',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goDetail: function (e) {
|
||||||
|
var id = e.currentTarget.dataset.id;
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../serviceActivityDetail/serviceActivityDetail?id=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
newActivity: function () {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../newVolunteerActivity/newVolunteerActivity',
|
||||||
|
})
|
||||||
|
},
|
||||||
changeTab: function(e) {
|
changeTab: function(e) {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.setData({
|
self.setData({
|
||||||
type: e.currentTarget.dataset.type
|
type: e.currentTarget.dataset.type
|
||||||
})
|
})
|
||||||
if(self.data.type === '1') {
|
if(self.data.type === '1') {
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
// 我发起的活动
|
||||||
|
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||||
}else {
|
}else {
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/myjointeam?myTeam=true');
|
// 我参加的活动
|
||||||
|
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagemyjoinservice');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
otherTeam: function(url) {
|
myActivity: function(url) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(url, []),
|
||||||
url: url,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
},
|
}
|
||||||
success(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
|
for(var item of data.rows) {
|
||||||
|
if('' != item.photo) {
|
||||||
|
var photoArr = item.photo.split(",");
|
||||||
|
item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
otherTeamMap: res.data.rows
|
dataMap: data.rows
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(res)
|
}, function(code, data) {
|
||||||
console.log(self.data.otherTeamMap)
|
app.dialog.msg(data.msg);
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -73,45 +93,42 @@ Page({
|
|||||||
var methodType;
|
var methodType;
|
||||||
var title;
|
var title;
|
||||||
if('1' == self.data.type) {
|
if('1' == self.data.type) {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/saveteammember'
|
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||||
teamMemberVO = {
|
teamMemberVO = {
|
||||||
teamId: e.currentTarget.dataset.teamid
|
teamId: e.currentTarget.dataset.teamid
|
||||||
}
|
}
|
||||||
methodType = 'POST'
|
methodType = app.restAjax.post
|
||||||
title = '申请成功!'
|
title = '申请成功!'
|
||||||
}else {
|
}else {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||||
methodType = 'GET'
|
methodType = app.restAjax.get
|
||||||
title = '退出成功!'
|
title = '退出成功!'
|
||||||
}
|
}
|
||||||
wx.request({
|
|
||||||
url: url,
|
methodType(app.restAjax.path(url, []),
|
||||||
data: teamMemberVO,
|
teamMemberVO, {
|
||||||
method: methodType,
|
headers: {
|
||||||
header: {
|
token: self.data.token
|
||||||
token: self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
success(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
app.dialog.msg(title);
|
||||||
wx.showToast({
|
|
||||||
title: title,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
this.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
<view class="top-tab">
|
<view class="top-tab">
|
||||||
<view class="tab-box {{type==1?'active':''}}" data-type="1" bindtap="changeTab">
|
<view class="tab-box {{type==1?'active':''}}" data-type="1" bindtap="changeTab">
|
||||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||||
未参加
|
我发起
|
||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-box {{type==2?'active':''}}" data-type="2" bindtap="changeTab">
|
<view class="tab-box {{type==2?'active':''}}" data-type="2" bindtap="changeTab">
|
||||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||||
已参加
|
我参加
|
||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="team">
|
<view class="volunteer-activity">
|
||||||
<view class="team-box" wx:for="{{otherTeamMap}}" data-id="{{item.teamId}}">
|
<view class="activity">
|
||||||
<view class="name-join">
|
<view class="activity-box" bindtap="goDetail" data-id="{{item.volunteerServiceId}}" wx:for="{{dataMap}}">
|
||||||
<view class="name">{{item.teamName}}</view>
|
<view class="activity-img">
|
||||||
<view class="join" wx:if="{{item.checkStatus == '' && type == 1}}" data-teamid="{{item.teamId}}" bindtap="joinOrOutTeam">申请加入</view>
|
<image src="{{item.photo}}"></image>
|
||||||
<view class="join" wx:if="{{item.checkStatus == '' && type == 2}}" data-teamid="{{item.teamId}}" bindtap="joinOrOutTeam">退出</view>
|
</view>
|
||||||
<view class="join" wx:if="{{item.checkStatus != '' && item.checkStatus == '0'}}">待审核</view>
|
<view class="activity-info">
|
||||||
<view class="join" wx:if="{{item.checkStatus != '' && item.checkStatus == '1'}}" bindtap="joinOrOutTeam">退出</view>
|
<view class="title">
|
||||||
<view class="join" wx:if="{{item.checkStatus != '' && item.checkStatus == '2'}}">审核驳回</view>
|
<view class="activity-title">{{item.serviceName}}</view>
|
||||||
<view class="join" wx:if="{{item.checkStatus != '' && item.checkStatus == '3'}}">已退出 </view>
|
</view>
|
||||||
|
<view class="date">{{item.startTime}}至{{item.endTime}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="slogan">团队口号:{{item.teamWatchword}}</view>
|
|
||||||
<view class="area">所属区域:{{item.teamCityDictionaryName}} {{item.teamCountyDictionaryName}} {{item.teamAreaDictionaryName}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="new-team">
|
<view class="new-team">
|
||||||
<view class="new-team-btn" bindtap="newTeam">创建新团队</view>
|
<view class="new-team-btn" bindtap="newActivity">发起新活动</view>
|
||||||
</view>
|
</view>
|
@ -91,4 +91,47 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
background: #9F1512;
|
background: #9F1512;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.volunteer-activity{
|
||||||
|
margin-top: 90rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
margin-bottom: 105rpx;
|
||||||
|
}
|
||||||
|
.activity{
|
||||||
|
padding: 20rpx 30rpx 0;
|
||||||
|
}
|
||||||
|
.activity-box{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
box-shadow:0px 0px 17rpx 0px rgba(0,0,0,0.1);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.activity-img{
|
||||||
|
height: 320rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.activity-img image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.activity-info{
|
||||||
|
padding: 15rpx 20rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.activity-title{
|
||||||
|
width: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #242424;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.date{
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #242424;
|
||||||
}
|
}
|
@ -1,11 +1,11 @@
|
|||||||
// pages/volunteer/volunteer.js
|
// pages/volunteer/volunteer.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
token: '',
|
token: '',
|
||||||
otherTeamMap: {},
|
otherTeamMap: {},
|
||||||
type: '1',
|
type: '1',
|
||||||
@ -31,33 +31,23 @@ Page({
|
|||||||
url: '../newTeam/newTeam',
|
url: '../newTeam/newTeam',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTab: function(e) {
|
|
||||||
var self = this;
|
|
||||||
self.setData({
|
|
||||||
type: e.currentTarget.dataset.type
|
|
||||||
})
|
|
||||||
if(self.data.type === '1') {
|
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
|
||||||
}else {
|
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/myjointeam?myTeam=true');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
otherTeam: function(url) {
|
otherTeam: function(url) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(url, []),
|
||||||
url: url,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
},
|
}
|
||||||
success(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
self.setData({
|
self.setData({
|
||||||
otherTeamMap: res.data.rows
|
otherTeamMap: data.rows
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(res)
|
}, function(code, data) {
|
||||||
console.log(self.data.otherTeamMap)
|
app.dialog.msg(data.msg);
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -73,45 +63,42 @@ Page({
|
|||||||
var methodType;
|
var methodType;
|
||||||
var title;
|
var title;
|
||||||
if('1' == self.data.type) {
|
if('1' == self.data.type) {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/saveteammember'
|
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||||
teamMemberVO = {
|
teamMemberVO = {
|
||||||
teamId: e.currentTarget.dataset.teamid
|
teamId: e.currentTarget.dataset.teamid
|
||||||
}
|
}
|
||||||
methodType = 'POST'
|
methodType = app.restAjax.post
|
||||||
title = '申请成功!'
|
title = '申请成功!'
|
||||||
}else {
|
}else {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||||
methodType = 'GET'
|
methodType = app.restAjax.get
|
||||||
title = '退出成功!'
|
title = '退出成功!'
|
||||||
}
|
}
|
||||||
wx.request({
|
|
||||||
url: url,
|
methodType(app.restAjax.path(url, []),
|
||||||
data: teamMemberVO,
|
teamMemberVO, {
|
||||||
method: methodType,
|
headers: {
|
||||||
header: {
|
token: self.data.token
|
||||||
token: self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
success(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
app.dialog.msg(title);
|
||||||
wx.showToast({
|
|
||||||
title: title,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
this.otherTeam(app.volunteerUrl + 'wxminiapp/team/myteamm');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
3
pages/myVolunteerTeam/myVolunteerTeam.json
Normal file
3
pages/myVolunteerTeam/myVolunteerTeam.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -1,15 +1,3 @@
|
|||||||
<view class="top-tab">
|
|
||||||
<view class="tab-box {{type==1?'active':''}}" data-type="1" bindtap="changeTab">
|
|
||||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
|
||||||
未参加
|
|
||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
|
||||||
</view>
|
|
||||||
<view class="tab-box {{type==2?'active':''}}" data-type="2" bindtap="changeTab">
|
|
||||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
|
||||||
已参加
|
|
||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="team">
|
<view class="team">
|
||||||
<view class="team-box" wx:for="{{otherTeamMap}}" data-id="{{item.teamId}}">
|
<view class="team-box" wx:for="{{otherTeamMap}}" data-id="{{item.teamId}}">
|
||||||
<view class="name-join">
|
<view class="name-join">
|
||||||
@ -24,7 +12,4 @@
|
|||||||
<view class="slogan">团队口号:{{item.teamWatchword}}</view>
|
<view class="slogan">团队口号:{{item.teamWatchword}}</view>
|
||||||
<view class="area">所属区域:{{item.teamCityDictionaryName}} {{item.teamCountyDictionaryName}} {{item.teamAreaDictionaryName}}</view>
|
<view class="area">所属区域:{{item.teamCityDictionaryName}} {{item.teamCountyDictionaryName}} {{item.teamAreaDictionaryName}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
<view class="new-team">
|
|
||||||
<view class="new-team-btn" bindtap="newTeam">创建新团队</view>
|
|
||||||
</view>
|
</view>
|
@ -39,9 +39,7 @@
|
|||||||
right: 100rpx;
|
right: 100rpx;
|
||||||
}
|
}
|
||||||
.team{
|
.team{
|
||||||
margin-top: 90rpx;
|
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
margin-bottom: 110rpx;
|
|
||||||
}
|
}
|
||||||
.team-box{
|
.team-box{
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
@ -1,11 +1,11 @@
|
|||||||
// pages/newTeam/newTeam.js
|
// pages/newTeam/newTeam.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
isAgree: false, // 是否同意志愿者注册协议
|
isAgree: false, // 是否同意志愿者注册协议
|
||||||
index: 0,
|
index: 0,
|
||||||
array: ['区域1','区域2','区域3','区域4'],
|
array: ['区域1','区域2','区域3','区域4'],
|
||||||
@ -63,26 +63,24 @@ Page({
|
|||||||
wx.chooseImage({
|
wx.chooseImage({
|
||||||
success (res) {
|
success (res) {
|
||||||
const tempFilePaths = res.tempFilePaths
|
const tempFilePaths = res.tempFilePaths
|
||||||
wx.uploadFile({
|
console.log(tempFilePaths)
|
||||||
url: self.data.baseUrl + 'app/file/uploadimage',
|
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
|
||||||
filePath: tempFilePaths[0],
|
'image', {
|
||||||
name: 'image',
|
headers: {
|
||||||
header: {
|
token: self.data.token
|
||||||
'token': self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
formData: {
|
if('200' == code) {
|
||||||
'image': tempFilePaths[0]
|
var data = data.substr(9, data.length);
|
||||||
},
|
data = data.substr(0, data.length - 2);
|
||||||
success (res){
|
self.setData({
|
||||||
var data = res.data.substr(9, res.data.length);
|
photo: data
|
||||||
data = data.substr(0, data.length - 2);
|
})
|
||||||
self.setData({
|
}
|
||||||
photo: data
|
}, function(code, data) {
|
||||||
})
|
app.dialog.msg(data.msg)
|
||||||
},
|
}, function() {
|
||||||
fail: function(res) {
|
|
||||||
console.log(res)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -186,27 +184,22 @@ Page({
|
|||||||
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
|
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
|
||||||
'',
|
'',
|
||||||
};
|
};
|
||||||
wx.request({
|
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/saveteam', []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/team/saveteam',
|
teamVO, {
|
||||||
method: 'POST',
|
headers: {
|
||||||
header: {
|
'token': self.data.token
|
||||||
'token': self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
data: teamVO,
|
if('200' == code) {
|
||||||
success(res) {
|
app.dialog.msg('注册成功')
|
||||||
if(res.statusCode == 200) {
|
|
||||||
wx.showToast({
|
|
||||||
title: '注册成功!',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}else {
|
|
||||||
console.log('登陆失败!' + res.errMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg)
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -215,16 +208,15 @@ Page({
|
|||||||
getDataFromDict: function(dictId, type) {
|
getDataFromDict: function(dictId, type) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||||
url: self.data.baseUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
'token': self.data.token
|
token: self.data.token
|
||||||
},
|
}
|
||||||
success: function(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
if(res.data || type === 2) {
|
var array = [];
|
||||||
var array = [];
|
for(var item of data) {
|
||||||
for(var item of res.data) {
|
|
||||||
delete item.dictionaryParentId;
|
delete item.dictionaryParentId;
|
||||||
delete item.dictionaryParentName;
|
delete item.dictionaryParentName;
|
||||||
delete item.dictionarySummary;
|
delete item.dictionarySummary;
|
||||||
@ -240,11 +232,13 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
tempObj: res.data
|
tempObj: data
|
||||||
})
|
})
|
||||||
}
|
return resolve();
|
||||||
return resolve();
|
}, function() {
|
||||||
}
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
// pages/newVolunteerActivity/newVolunteerActivity.js
|
// pages/newVolunteerActivity/newVolunteerActivity.js
|
||||||
|
var app = getApp();
|
||||||
var util = require('../../utils/util.js');
|
var util = require('../../utils/util.js');
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -6,7 +7,6 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
token: '',
|
token: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
@ -89,26 +89,23 @@ Page({
|
|||||||
wx.chooseImage({
|
wx.chooseImage({
|
||||||
success (res) {
|
success (res) {
|
||||||
const tempFilePaths = res.tempFilePaths
|
const tempFilePaths = res.tempFilePaths
|
||||||
wx.uploadFile({
|
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
|
||||||
url: self.data.baseUrl + 'app/file/uploadimage',
|
'image', {
|
||||||
filePath: tempFilePaths[0],
|
headers: {
|
||||||
name: 'image',
|
token: self.data.token
|
||||||
header: {
|
}
|
||||||
'token': self.data.token
|
}, function(code, data) {
|
||||||
},
|
if('200' == code) {
|
||||||
formData: {
|
var data = data.substr(9, data.length);
|
||||||
'image': tempFilePaths[0]
|
data = data.substr(0, data.length - 2);
|
||||||
},
|
self.setData({
|
||||||
success (res){
|
photo: data
|
||||||
var data = res.data.substr(9, res.data.length);
|
})
|
||||||
data = data.substr(0, data.length - 2);
|
}
|
||||||
self.setData({
|
}, function(code, data) {
|
||||||
photo: data
|
app.dialog.msg(data.msg)
|
||||||
})
|
}, function() {
|
||||||
},
|
|
||||||
fail: function(res) {
|
|
||||||
console.log(res)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -163,7 +160,6 @@ Page({
|
|||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log(self.data.startDate)
|
|
||||||
var volunteerServiceVO = {
|
var volunteerServiceVO = {
|
||||||
serviceName: self.data.serviceName,
|
serviceName: self.data.serviceName,
|
||||||
serviceContent: self.data.serviceContent,
|
serviceContent: self.data.serviceContent,
|
||||||
@ -179,27 +175,22 @@ Page({
|
|||||||
photo: self.data.photo,
|
photo: self.data.photo,
|
||||||
serviceRequirement: self.data.serviceRequirement
|
serviceRequirement: self.data.serviceRequirement
|
||||||
};
|
};
|
||||||
wx.request({
|
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/savevolunteerservice', []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/volunteerservice/savevolunteerservice',
|
volunteerServiceVO, {
|
||||||
method: 'POST',
|
headers: {
|
||||||
header: {
|
'token': self.data.token
|
||||||
'token': self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
data: volunteerServiceVO,
|
if('200' == code) {
|
||||||
success(res) {
|
app.dialog.msg('活动发布成功!');
|
||||||
if(res.statusCode == 200) {
|
|
||||||
wx.showToast({
|
|
||||||
title: '活动发布成功!',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}else {
|
|
||||||
console.log('登陆失败!' + res.errMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// pages/newsList/newsList.js
|
// pages/newsList/newsList.js
|
||||||
var app = getApp();
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {},
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
|
"backgroundTextStyle": "dark",
|
||||||
"onReachBottomDistance": 50
|
"onReachBottomDistance": 50
|
||||||
}
|
}
|
@ -31,4 +31,19 @@
|
|||||||
width: 30%;
|
width: 30%;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
.transverse-news{
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.news-row-img{
|
||||||
|
width: 30%;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
.news-row-img image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.news-row-info{
|
||||||
|
width: 68%;
|
||||||
}
|
}
|
@ -1,12 +1,11 @@
|
|||||||
// pages/activityDetail/activityDetail.js
|
// pages/activityDetail/activityDetail.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
imgUrl: 'http://192.168.0.111:8888/volunteer/route/file/downloadfile/true/',
|
|
||||||
dataMap: {},
|
dataMap: {},
|
||||||
token: '',
|
token: '',
|
||||||
serviceId: '',
|
serviceId: '',
|
||||||
@ -33,19 +32,22 @@ Page({
|
|||||||
},
|
},
|
||||||
getDetail: function(id) {
|
getDetail: function(id) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/volunteerservice/getvolunteerservicebyid/' + id,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
},
|
}
|
||||||
success: function(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
res.data.photo = self.data.imgUrl + res.data.photo;
|
data.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + data.photo;
|
||||||
self.setData({
|
self.setData({
|
||||||
dataMap: res.data
|
dataMap: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -128,25 +130,22 @@ Page({
|
|||||||
*/
|
*/
|
||||||
sendEnrollRequest: function(serviceMemberVO) {
|
sendEnrollRequest: function(serviceMemberVO) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/servicemember/saveservicemember', []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/servicemember/saveservicemember',
|
serviceMemberVO, {
|
||||||
method: 'POST',
|
headers: {
|
||||||
header: {
|
token: self.data.token
|
||||||
token: self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
data: serviceMemberVO,
|
if('200' == code) {
|
||||||
success(res) {
|
app.dialog.msg('注册成功!');
|
||||||
if(res.statusCode == 200) {
|
|
||||||
wx.showToast({
|
|
||||||
title: '报名成功!',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -156,30 +155,26 @@ Page({
|
|||||||
var self = this;
|
var self = this;
|
||||||
var url;
|
var url;
|
||||||
if(self.data.teamArray.length > 0) {
|
if(self.data.teamArray.length > 0) {
|
||||||
url = self.data.baseUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
||||||
}else {
|
}else {
|
||||||
url = self.data.baseUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
||||||
}
|
}
|
||||||
wx.request({
|
|
||||||
url: url,
|
app.restAjax.get(app.restAjax.path(url, []), {}, {
|
||||||
header: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
},
|
}
|
||||||
success(res) {
|
}, function(code, data) {
|
||||||
if(res.statusCode == 200) {
|
if('200' == code) {
|
||||||
wx.showToast({
|
app.dialog.msg('取消报名成功!');
|
||||||
title: '取消报名成功!',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}, function() {
|
||||||
fail(res) {
|
|
||||||
|
}, function() {
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -187,15 +182,16 @@ Page({
|
|||||||
*/
|
*/
|
||||||
getMyTeam: function() {
|
getMyTeam: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
console.log(self.data.token)
|
||||||
url: self.data.baseUrl + 'wxminiapp/team/myteamm',
|
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/myteamm', []),
|
||||||
header: {
|
{}, {
|
||||||
token: self.data.token
|
headers: {
|
||||||
},
|
token: self.data.token
|
||||||
success(res) {
|
}
|
||||||
if('200' == res.statusCode) {
|
}, function(code, data) {
|
||||||
|
if('200' == code) {
|
||||||
var array = [];
|
var array = [];
|
||||||
for(var item of res.data.rows) {
|
for(var item of data.rows) {
|
||||||
delete item.teamArea;
|
delete item.teamArea;
|
||||||
delete item.teamAreaDictionaryName;
|
delete item.teamAreaDictionaryName;
|
||||||
delete item.teamWatchword;
|
delete item.teamWatchword;
|
||||||
@ -219,10 +215,13 @@ Page({
|
|||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
teamArray: array,
|
teamArray: array,
|
||||||
team: res.data.rows
|
team: data.rows
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
66
pages/teamDetail/teamDetail.js
Normal file
66
pages/teamDetail/teamDetail.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
// pages/teamDetail/teamDetail.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
3
pages/teamDetail/teamDetail.json
Normal file
3
pages/teamDetail/teamDetail.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
68
pages/teamDetail/teamDetail.wxml
Normal file
68
pages/teamDetail/teamDetail.wxml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<view class="team">
|
||||||
|
<view class="team-info">
|
||||||
|
<view class="row">
|
||||||
|
<view class="title">团队名称:</view>
|
||||||
|
<view class="content">团队名称</view>
|
||||||
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view class="title">团队人数:</view>
|
||||||
|
<view class="content">1</view>
|
||||||
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view class="title">所属区域:</view>
|
||||||
|
<view class="content">所属区域</view>
|
||||||
|
</view>
|
||||||
|
<view class="row">
|
||||||
|
<view class="title">团队介绍:</view>
|
||||||
|
<view class="content intro">团队介绍</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="team-member">
|
||||||
|
<view class="member-title">团队成员</view>
|
||||||
|
<view class="member-box">
|
||||||
|
<view class="member-avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="name">名字<text class="post">队长</text></view>
|
||||||
|
<view class="join-time">加入时间:2020-02-02</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="member-box">
|
||||||
|
<view class="member-avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="name">名字<text class="post">队长</text></view>
|
||||||
|
<view class="join-time">加入时间:2020-02-02</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="member-box">
|
||||||
|
<view class="member-avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="name">名字<text class="post">队长</text></view>
|
||||||
|
<view class="join-time">加入时间:2020-02-02</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="team-member">
|
||||||
|
<view class="member-title">申请人员</view>
|
||||||
|
<view class="member-box">
|
||||||
|
<view class="member-avatar">
|
||||||
|
<image src="../../images/avatar.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="member-info">
|
||||||
|
<view class="name apply-member">
|
||||||
|
<view class="name-box">名字</view>
|
||||||
|
<view class="btn">
|
||||||
|
<view class="agree">通过</view>
|
||||||
|
<view class="refuse">拒绝</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="join-time">加入时间:2020-02-02</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
83
pages/teamDetail/teamDetail.wxss
Normal file
83
pages/teamDetail/teamDetail.wxss
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
.team{
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
.team-info{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.row{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
width: 23%;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 65rpx;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
width: 75%;
|
||||||
|
line-height: 65rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-bottom: 1px solid #DEDEDE;
|
||||||
|
}
|
||||||
|
.intro{
|
||||||
|
min-height: 200rpx;
|
||||||
|
}
|
||||||
|
.team-member{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
.member-title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #000;
|
||||||
|
padding-left: 25rpx;
|
||||||
|
border-left: 10rpx solid #9F1512;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.member-box{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
border-bottom: 1px solid #DEDEDE;
|
||||||
|
}
|
||||||
|
.member-avatar{
|
||||||
|
width: 15%;
|
||||||
|
}
|
||||||
|
.member-avatar image{
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
}
|
||||||
|
.member-info{
|
||||||
|
width: 83%;
|
||||||
|
}
|
||||||
|
.name{
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 20rpx 0;
|
||||||
|
}
|
||||||
|
.post{
|
||||||
|
display: inline-block;
|
||||||
|
background: rgba(159,21,18,.1);
|
||||||
|
color: #9F1512;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
.join-time{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #949494;
|
||||||
|
}
|
||||||
|
.apply-member, .btn{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.agree, .refuse{
|
||||||
|
padding: 0 10rpx;
|
||||||
|
background: rgba(159,21,18,.1);
|
||||||
|
color: #9F1512;
|
||||||
|
}
|
||||||
|
.refuse{
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
.name-box{
|
||||||
|
width: 60%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
.fixed-tab{
|
.fixed-tab{
|
||||||
padding: 30rpx 0;
|
padding: 30rpx 0;
|
||||||
|
@ -50,4 +50,7 @@
|
|||||||
<view class="intro-title">场馆简介:</view>
|
<view class="intro-title">场馆简介:</view>
|
||||||
<!-- <view class="intro-content"></view> -->
|
<!-- <view class="intro-content"></view> -->
|
||||||
<rich-text nodes="{{venuesDetail.venueDescription}}"></rich-text>
|
<rich-text nodes="{{venuesDetail.venueDescription}}"></rich-text>
|
||||||
|
</view>
|
||||||
|
<view class="book-btn">
|
||||||
|
<view class="btn">预定</view>
|
||||||
</view>
|
</view>
|
@ -86,6 +86,7 @@
|
|||||||
}
|
}
|
||||||
.venue-intro{
|
.venue-intro{
|
||||||
padding: 0 20rpx 20rpx;
|
padding: 0 20rpx 20rpx;
|
||||||
|
margin-bottom: 110rpx;
|
||||||
}
|
}
|
||||||
.intro-title{
|
.intro-title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@ -95,4 +96,22 @@
|
|||||||
.intro-content{
|
.intro-content{
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
}
|
||||||
|
.book-btn{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 15rpx 30rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
height: 80rpx;
|
||||||
|
background: #9F1512;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
// pages/volunteer/volunteer.js
|
// pages/volunteer/volunteer.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -7,8 +8,6 @@ Page({
|
|||||||
data: {
|
data: {
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
imgUrl: 'http://192.168.0.111:8888/volunteer/route/file/downloadfile/true/',
|
|
||||||
serviceMap: []
|
serviceMap: []
|
||||||
},
|
},
|
||||||
goDetail: function (e) {
|
goDetail: function (e) {
|
||||||
@ -37,22 +36,24 @@ Page({
|
|||||||
*/
|
*/
|
||||||
activityList: function() {
|
activityList: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservicerelease', []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/volunteerservice/listpagevolunteerservicerelease',
|
{}, null, function(code, data) {
|
||||||
success: function(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
|
||||||
// 将活动照片,拼接为可访问地址
|
// 将活动照片,拼接为可访问地址
|
||||||
for(var item of res.data.rows) {
|
for(var item of data.rows) {
|
||||||
if('' != item.photo) {
|
if('' != item.photo) {
|
||||||
var photoArr = item.photo.split(",");
|
var photoArr = item.photo.split(",");
|
||||||
item.photo = self.data.imgUrl + photoArr[0];
|
item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
serviceMap: res.data.rows
|
serviceMap: data.rows
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// pages/volunteerRegister/volunteerRegister.js
|
// pages/volunteerRegister/volunteerRegister.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
token: '',
|
token: '',
|
||||||
isAgree: false, // 是否同意志愿者注册协议
|
isAgree: false, // 是否同意志愿者注册协议
|
||||||
openExperience: 0,
|
openExperience: 0,
|
||||||
@ -103,6 +103,12 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
areaChange: function(e) {
|
||||||
|
var self = this;
|
||||||
|
self.setData({
|
||||||
|
teamAreaIndex: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
changeOpen: function(e) {
|
changeOpen: function(e) {
|
||||||
if(e.detail.value == ''){
|
if(e.detail.value == ''){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -197,27 +203,22 @@ Page({
|
|||||||
agree: self.data.isAgree,
|
agree: self.data.isAgree,
|
||||||
openExperience : self.data.openExperience
|
openExperience : self.data.openExperience
|
||||||
};
|
};
|
||||||
wx.request({
|
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteer/savevolunteer', []),
|
||||||
url: self.data.baseUrl + 'wxminiapp/volunteer/savevolunteer',
|
volunteerVO, {
|
||||||
method: 'POST',
|
headers: {
|
||||||
header: {
|
'token': self.data.token
|
||||||
'token': self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
data: volunteerVO,
|
if('200' == code) {
|
||||||
success(res) {
|
app.dialog.msg('注册成功!');
|
||||||
if(res.statusCode == 200) {
|
|
||||||
wx.showToast({
|
|
||||||
title: '注册成功!',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}else {
|
|
||||||
console.log('登陆失败!' + res.errMsg);
|
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -226,16 +227,16 @@ Page({
|
|||||||
getDataFromDict: function(dictId, type) {
|
getDataFromDict: function(dictId, type) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
|
||||||
url: self.data.baseUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
'token': self.data.token
|
'token': self.data.token
|
||||||
},
|
}
|
||||||
success: function(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
if(res.data || type === 2) {
|
if(data || type === 2) {
|
||||||
var array = [];
|
var array = [];
|
||||||
for(var item of res.data) {
|
for(var item of data) {
|
||||||
delete item.dictionaryParentId;
|
delete item.dictionaryParentId;
|
||||||
delete item.dictionaryParentName;
|
delete item.dictionaryParentName;
|
||||||
delete item.dictionarySummary;
|
delete item.dictionarySummary;
|
||||||
@ -251,11 +252,14 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
tempObj: res.data
|
tempObj: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<view class="info-name">乡镇村:</view>
|
<view class="info-name">乡镇村:</view>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<picker bindchange="countyChange" value="{{teamAreaIndex}}" range="{{teamAreaArray}}">
|
<picker bindchange="areaChange" value="{{teamAreaIndex}}" range="{{teamAreaArray}}">
|
||||||
<view class="picker">
|
<view class="picker">
|
||||||
{{teamAreaArray[teamAreaIndex]}}
|
{{teamAreaArray[teamAreaIndex]}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// pages/volunteer/volunteer.js
|
// pages/volunteer/volunteer.js
|
||||||
|
var app = getApp();
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
baseUrl: 'http://192.168.0.111:8888/volunteer/',
|
|
||||||
token: '',
|
token: '',
|
||||||
otherTeamMap: {},
|
otherTeamMap: {},
|
||||||
type: '1',
|
type: '1',
|
||||||
@ -37,27 +37,28 @@ Page({
|
|||||||
type: e.currentTarget.dataset.type
|
type: e.currentTarget.dataset.type
|
||||||
})
|
})
|
||||||
if(self.data.type === '1') {
|
if(self.data.type === '1') {
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
||||||
}else {
|
}else {
|
||||||
self.otherTeam(self.data.baseUrl + 'wxminiapp/team/myjointeam?myTeam=true');
|
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/myjointeam?myTeam=true');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
otherTeam: function(url) {
|
otherTeam: function(url) {
|
||||||
var self = this;
|
var self = this;
|
||||||
wx.request({
|
app.restAjax.get(app.restAjax.path(url, []),
|
||||||
url: url,
|
{}, {
|
||||||
header: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
},
|
}
|
||||||
success(res) {
|
}, function(code, data) {
|
||||||
if('200' == res.statusCode) {
|
if('200' == code) {
|
||||||
self.setData({
|
self.setData({
|
||||||
otherTeamMap: res.data.rows
|
otherTeamMap: data.rows
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(res)
|
}, function(code, data) {
|
||||||
console.log(self.data.otherTeamMap)
|
app.dialog.msg(data.msg);
|
||||||
}
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -73,45 +74,42 @@ Page({
|
|||||||
var methodType;
|
var methodType;
|
||||||
var title;
|
var title;
|
||||||
if('1' == self.data.type) {
|
if('1' == self.data.type) {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/saveteammember'
|
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
|
||||||
teamMemberVO = {
|
teamMemberVO = {
|
||||||
teamId: e.currentTarget.dataset.teamid
|
teamId: e.currentTarget.dataset.teamid
|
||||||
}
|
}
|
||||||
methodType = 'POST'
|
methodType = app.restAjax.post
|
||||||
title = '申请成功!'
|
title = '申请成功!'
|
||||||
}else {
|
}else {
|
||||||
url = self.data.baseUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||||
methodType = 'GET'
|
methodType = app.restAjax.get
|
||||||
title = '退出成功!'
|
title = '退出成功!'
|
||||||
}
|
}
|
||||||
wx.request({
|
|
||||||
url: url,
|
methodType(app.restAjax.path(url, []),
|
||||||
data: teamMemberVO,
|
teamMemberVO, {
|
||||||
method: methodType,
|
headers: {
|
||||||
header: {
|
token: self.data.token
|
||||||
token: self.data.token
|
}
|
||||||
},
|
}, function(code, data) {
|
||||||
success(res) {
|
if('200' == code) {
|
||||||
if('200' == res.statusCode) {
|
app.dialog.msg(title);
|
||||||
wx.showToast({
|
|
||||||
title: title,
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../volunteer/volunteer',
|
url: '../volunteer/volunteer',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}, function(code, data) {
|
||||||
|
app.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
|
||||||
this.getToken().then(result => {
|
this.getToken().then(result => {
|
||||||
this.otherTeam(self.data.baseUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
this.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user