接口修改
This commit is contained in:
parent
290e82db6d
commit
0255a2d8e7
4
app.js
4
app.js
@ -52,6 +52,8 @@ App({
|
||||
})
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null
|
||||
userInfo: null,
|
||||
curLat:-1,
|
||||
curLng:-1,
|
||||
}
|
||||
})
|
12
app.json
12
app.json
@ -33,7 +33,11 @@
|
||||
"pages/activityDetail/activityDetail",
|
||||
"pages/activity/activity",
|
||||
"pages/newsDetail/newsDetail",
|
||||
"pages/newsList/newsList"
|
||||
"pages/newsList/newsList",
|
||||
"pages/myActivity/myActivity",
|
||||
"pages/myVolunteerTeam/myVolunteerTeam",
|
||||
"pages/myVolunteerActivity/myVolunteerActivity",
|
||||
"pages/serviceActivityDetail/serviceActivityDetail"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
@ -45,8 +49,7 @@
|
||||
"color": "#BBBBBB",
|
||||
"borderStyle": "black",
|
||||
"selectedColor": "#000000",
|
||||
"list": [
|
||||
{
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "images/index.png",
|
||||
"text": "首页",
|
||||
@ -83,6 +86,9 @@
|
||||
"desc": "你的位置信息将用于您当前所在位置"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"getLocation"
|
||||
],
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
@ -16,7 +16,7 @@ Page({
|
||||
},
|
||||
getAreaList: function () {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dataarea/listareabyparentidrelease/640675', []),
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
|
||||
self.data.pages, null, function (code, data) {
|
||||
if (code == '200') {
|
||||
self.setData({
|
||||
@ -47,8 +47,9 @@ Page({
|
||||
},
|
||||
getActivityList: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wechat-miniapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
|
||||
self.data.pages, null, function(code, data) {
|
||||
console.log(code+"==="+data)
|
||||
if('200' == code) {
|
||||
for(var item of data.rows) {
|
||||
if('' != item.activityImage) {
|
||||
|
@ -58,12 +58,12 @@ Page({
|
||||
var url;
|
||||
var id = options.id;
|
||||
if(!self.data.token) {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
self.setData({
|
||||
token: null
|
||||
})
|
||||
}else {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
self.getToken()
|
||||
}
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
||||
|
@ -31,7 +31,7 @@ Page({
|
||||
},
|
||||
getActivityHis: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []),
|
||||
self.data.pages, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
|
@ -19,9 +19,9 @@ Page({
|
||||
timer: '',
|
||||
gotCode: false
|
||||
},
|
||||
getToken: function() {
|
||||
getToken: function () {
|
||||
var self = this;
|
||||
return new Promise(resolve =>{
|
||||
return new Promise(resolve => {
|
||||
wx.getStorage({
|
||||
key: 'token',
|
||||
success(res) {
|
||||
@ -33,51 +33,50 @@ Page({
|
||||
})
|
||||
})
|
||||
},
|
||||
getCode: function() {
|
||||
getCode: function () {
|
||||
var self = this;
|
||||
if(!self.data.phone) {
|
||||
if (!self.data.phone) {
|
||||
app.dialog.msg('请输入手机号');
|
||||
return false;
|
||||
}
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveSmsCoderelease/' + self.data.phone, []),
|
||||
{}, null, function(code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
self.setData({
|
||||
gotCode: true
|
||||
})
|
||||
self.data.timer = setInterval(function () {
|
||||
var cur = self.data.restTime - 1
|
||||
if (cur == 0) {
|
||||
clearInterval(self.data.timer)
|
||||
self.setData({
|
||||
restTime: 120,
|
||||
gotCode: false
|
||||
})
|
||||
} else {
|
||||
self.setData({
|
||||
restTime: cur
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}, function(code, data) {
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/sms/verify-code/' + self.data.phone, []), {}, null, function (code, data) {
|
||||
console.log(data)
|
||||
if ('200' == code) {
|
||||
self.setData({
|
||||
gotCode: true
|
||||
})
|
||||
self.data.timer = setInterval(function () {
|
||||
var cur = self.data.restTime - 1
|
||||
if (cur == 0) {
|
||||
clearInterval(self.data.timer)
|
||||
self.setData({
|
||||
restTime: 120,
|
||||
gotCode: false
|
||||
})
|
||||
} else {
|
||||
self.setData({
|
||||
restTime: cur
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg)
|
||||
}, function() {
|
||||
|
||||
}, function () {
|
||||
|
||||
})
|
||||
},
|
||||
commit: function() {
|
||||
commit: function () {
|
||||
var self = this;
|
||||
if(!self.data.phone) {
|
||||
if (!self.data.phone) {
|
||||
app.dialog.msg('请输入手机号');
|
||||
return false;
|
||||
}
|
||||
if(!self.data.name) {
|
||||
if (!self.data.name) {
|
||||
app.dialog.msg('请输入姓名');
|
||||
return false;
|
||||
}
|
||||
if(!self.data.idCard) {
|
||||
if (!self.data.idCard) {
|
||||
app.dialog.msg('请输入身份证号码');
|
||||
return false;
|
||||
}
|
||||
@ -88,26 +87,27 @@ Page({
|
||||
userName: self.data.name,
|
||||
userPhone: self.data.phone
|
||||
}
|
||||
app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapply', []),
|
||||
app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapply', []),
|
||||
activityUserApplyVO, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
},
|
||||
function (code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
if ('200' == code) {
|
||||
app.dialog.msg('报名成功');
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '../index/index'
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateBack({})
|
||||
}, 1000)
|
||||
}
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
|
||||
})
|
||||
},
|
||||
function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
},
|
||||
function () {
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
@ -117,31 +117,30 @@ Page({
|
||||
this.getToken().then(result => {
|
||||
var url;
|
||||
var id = options.id;
|
||||
if(!self.data.token) {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
}else {
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
if (!self.data.token) {
|
||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyidrelease/' + id;
|
||||
} else {
|
||||
url = '/wechat-miniapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
}
|
||||
self.setData({
|
||||
activityId: options.id
|
||||
})
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
data.activityImageArray = data.activityImage.split(',');
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
console.log(self.data.dataMap)
|
||||
}
|
||||
}, function() {
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function (code, data) {
|
||||
if ('200' == code) {
|
||||
data.activityImageArray = data.activityImage.split(',');
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
console.log(self.data.dataMap)
|
||||
}
|
||||
}, function () {
|
||||
|
||||
}, function () {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -293,7 +293,7 @@ Page({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
})
|
||||
app.restAjax.get(app.restAjax.path('{venueUrl}/api/sms/getverificationcode/' + self.data.phoneNumber, [app.venueUrl]), {}, null,
|
||||
app.restAjax.get(app.restAjax.path('{venueUrl}/app/sms/verify-code/' + self.data.phoneNumber, [app.venueUrl]), {}, null,
|
||||
function (code, data) {
|
||||
if (code == 200) {
|
||||
self.setData({
|
||||
|
@ -93,9 +93,9 @@ Page({
|
||||
/**
|
||||
* 跳转到我的活动
|
||||
*/
|
||||
toMyJoinActivity: function() {
|
||||
toMyJoinActivity(){
|
||||
wx.navigateTo({
|
||||
url: '../myActivity/myActivity',
|
||||
url: '/pages/myActivity/myActivity',
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -211,7 +211,7 @@ Page({
|
||||
iv: e.detail.iv
|
||||
}
|
||||
// app.dialog.loading('正在加载');
|
||||
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/miniuser/updatedefaultusernamebydata', [app.usercenterUrl]), info, {
|
||||
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/miniapp/update-phone', [app.usercenterUrl]), info, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
@ -256,7 +256,7 @@ Page({
|
||||
// 获取用户信息
|
||||
getUserInfo: function () {
|
||||
var self = this
|
||||
app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, {
|
||||
app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/get-app-user', [app.usercenterUrl]), {}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ Page({
|
||||
app.restAjax.post(app.restAjax.path('{url}/wechat-miniapp/sign/default', [app.loginUrl]), {
|
||||
jsCode: res.code
|
||||
}, null, function (code, data) {
|
||||
// var token ='elMxZExMVzZ2ZnYyM0JKU1FWRTZKcDFiVFhZeXpGbFBMTFh6c2I0NjNmeWlrU0RwUmlHMDViY1QxY0hsZ1dpdzh1TFhKL0hMT1JRV2pMYkZ0emliNW1LNU0rVHYwNDQvYW5qV0ZwcitoWGhMMENBeFZxTmlDT0FjTThhaDZaM3pFSzFyUXlGbFN5MUlTaE80dG5aNFJYSWFlMEk4a0d0R0kyczRYanIwUUF6VkFmeGdlWEdIM3UzYmdOMWtZYUtrZTZJUVF1bm94V0p4QTlpVDBmb0U1bTkvSCt5UkpqemE3cGxYTDMzZG5SQmVzNXU4dHIxS3l5bHlINURkV1VTWVc2VHFRanVMN0t2eXd0YUhTcHJaQzNYaFhLVEFBYm9MU0hkS1lEaE41d1U9';
|
||||
console.log(data)
|
||||
var tokenArray = data.data.split('_');
|
||||
var token = tokenArray[0];
|
||||
@ -55,93 +54,96 @@ Page({
|
||||
});
|
||||
} else {
|
||||
console.log(res)
|
||||
app.dialog.msg('登录失败!'+ res.errMsg);
|
||||
app.dialog.msg('登录失败!' + res.errMsg);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doGetBanner: function() {
|
||||
doGetBanner: function () {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
|
||||
newsDirectoriesId: 'eab0ca3c-d35d-4c02-9397-ace2bdd10fc1',
|
||||
page: 1,
|
||||
rows: 5
|
||||
}, null, function(code, data) {
|
||||
}, null, function (code, data) {
|
||||
self.setData({
|
||||
'news.bannerList': data.rows
|
||||
})
|
||||
}, function(code, data) {
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
doGetVenueList: function() {
|
||||
doGetVenueList: function () {
|
||||
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) {
|
||||
for(var i = 0, item; item = data.rows[i++];) {
|
||||
rows: 3,
|
||||
latitude:app.globalData.curLat,
|
||||
longitude:app.globalData.curLng,
|
||||
orderKey:"",
|
||||
}, null, function (code, data) {
|
||||
for (var i = 0, item; item = data.rows[i++];) {
|
||||
item.venuePanoramaArray = item.venuePanorama.split(',');
|
||||
}
|
||||
self.setData({
|
||||
'venue.venueList': data.rows
|
||||
});
|
||||
}, function(code, data) {
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
doGetActivityList: 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) {
|
||||
}, null, function (code, data) {
|
||||
console.log(data);
|
||||
for(var i = 0, item; item = data.rows[i++];) {
|
||||
for (var i = 0, item; item = data.rows[i++];) {
|
||||
item.activityImageArray = item.activityImage.split(',');
|
||||
}
|
||||
self.setData({
|
||||
'activity.activityList': data.rows
|
||||
});
|
||||
}, function(code, data) {
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
doGetNewsList: function() {
|
||||
doGetNewsList: function () {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
|
||||
newsDirectoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167',
|
||||
page: 1,
|
||||
rows: 5
|
||||
}, null, function(code, data) {
|
||||
}, null, function (code, data) {
|
||||
self.setData({
|
||||
'news.newsList': data.rows
|
||||
})
|
||||
}, function(code, data) {
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
doGetLiveList: function() {
|
||||
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) {
|
||||
}, null, function (code, data) {
|
||||
self.setData({
|
||||
'live.liveList': data.rows
|
||||
})
|
||||
}, function(code, data) {
|
||||
}, function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
goNewsDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
|
||||
url: '../newsDetail/newsDetail?templateRecordUrl=' + event.currentTarget.dataset.templateRecordUrl,
|
||||
})
|
||||
},
|
||||
goNewsList: function(event) {
|
||||
goNewsList: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../newsList/newsList?type='+ event.currentTarget.dataset.type,
|
||||
url: '../newsList/newsList?type=' + event.currentTarget.dataset.type,
|
||||
})
|
||||
},
|
||||
goVolunteer: function () {
|
||||
@ -159,14 +161,14 @@ Page({
|
||||
url: '../venue/venue',
|
||||
})
|
||||
},
|
||||
goVenueDetail: function(event) {
|
||||
goVenueDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../venueDetail/venueDetail?venuesInfoId=' + event.currentTarget.dataset.venuesInfoId,
|
||||
})
|
||||
},
|
||||
goBroadcastDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||
url: '../broadcastDetail/broadcastDetail?livePlanId=' + event.currentTarget.dataset.livePlanId,
|
||||
})
|
||||
},
|
||||
goActivity: function () {
|
||||
@ -174,7 +176,7 @@ Page({
|
||||
url: '../activity/activity',
|
||||
})
|
||||
},
|
||||
goActivityDetail: function(event) {
|
||||
goActivityDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../activityDetail/activityDetail?id=' + event.currentTarget.dataset.activityLibraryId
|
||||
})
|
||||
@ -184,9 +186,9 @@ Page({
|
||||
url: '../heritage/heritage',
|
||||
})
|
||||
},
|
||||
goCultureDetail: function(event) {
|
||||
goCultureDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../cultureDetail/cultureDetail?libraryId='+ event.currentTarget.dataset.libraryId,
|
||||
url: '../cultureDetail/cultureDetail?libraryId=' + event.currentTarget.dataset.libraryId,
|
||||
})
|
||||
},
|
||||
// 获取用户信息
|
||||
@ -224,6 +226,17 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
wx.getLocation({
|
||||
type: 'gcj02',
|
||||
success(res) {
|
||||
// const latitude = res.latitude
|
||||
// const longitude = res.longitude
|
||||
// const speed = res.speed
|
||||
// const accuracy = res.accuracy
|
||||
app.globalData.curLng=res.longitude
|
||||
app.globalData.curLat=res.latitude
|
||||
}
|
||||
})
|
||||
self.doLogin();
|
||||
self.doGetBanner();
|
||||
self.doGetNewsList();
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="team">
|
||||
<view class="team-box" bindtap="toTeamDetail"
|
||||
wx:for="{{dataMap}}">
|
||||
wx:for="{{dataMap}}" wx:key="index">
|
||||
<view class="name-join">
|
||||
<view class="name">{{item.activityTitle}}</view>
|
||||
</view>
|
||||
|
@ -48,10 +48,10 @@ Page({
|
||||
})
|
||||
if(self.data.type === '1') {
|
||||
// 我发起的活动
|
||||
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
|
||||
}else {
|
||||
// 我参加的活动
|
||||
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagemyjoinservice');
|
||||
self.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagemyjoinservice');
|
||||
}
|
||||
},
|
||||
myActivity: function(url) {
|
||||
@ -83,7 +83,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
|
||||
this.myActivity(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservice');
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="volunteer-activity">
|
||||
<view class="activity">
|
||||
<view class="activity-box" bindtap="goDetail" data-id="{{item.volunteerServiceId}}" wx:for="{{dataMap}}">
|
||||
<view class="activity-box" bindtap="goDetail" data-id="{{item.volunteerServiceId}}" wx:for="{{dataMap}}" wx:key="index">
|
||||
<view class="activity-img">
|
||||
<image src="{{item.photo}}"></image>
|
||||
</view>
|
||||
|
@ -68,14 +68,14 @@ Page({
|
||||
var methodType;
|
||||
var title;
|
||||
if('1' == self.data.type) {
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
|
||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
|
||||
teamMemberVO = {
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
}
|
||||
methodType = app.restAjax.post
|
||||
title = '申请成功!'
|
||||
}else {
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
|
||||
methodType = app.restAjax.get
|
||||
title = '退出成功!'
|
||||
}
|
||||
@ -103,7 +103,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.otherTeam(app.volunteerUrl + '/wxminiapp/team/myteamm');
|
||||
this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myteamm');
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -198,7 +198,7 @@ Page({
|
||||
self.data.teamArea[self.data.teamAreaIndex].dictionaryId :
|
||||
'',
|
||||
};
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/saveteam', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/saveteam', []),
|
||||
teamVO, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -262,12 +262,13 @@ Page({
|
||||
getDataFromArea: function(dictId, type) {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/dataarea/listareabyparentidrelease/' + dictId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listallbyparentidrelease/' + dictId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
console.log(data)
|
||||
if('200' == code) {
|
||||
if(data || type === 2) {
|
||||
var array = [];
|
||||
@ -311,6 +312,7 @@ Page({
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
this.getToken().then(result => {
|
||||
console.log(self.data.token)
|
||||
this.getDataFromArea('640332', 2).then(result => {
|
||||
self.setData({
|
||||
teamCity: self.data.tempObj,
|
||||
|
@ -177,7 +177,7 @@ Page({
|
||||
photo: self.data.uploadPhoto,
|
||||
serviceRequirement: self.data.serviceRequirement
|
||||
};
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/savevolunteerservice', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/savevolunteerservice', []),
|
||||
volunteerServiceVO, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
|
@ -90,7 +90,7 @@ Page({
|
||||
},
|
||||
getAreaList: function () {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dataarea/listareabyparentidrelease/640675', []),
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
|
||||
self.data.pages, null, function (code, data) {
|
||||
if (code == '200') {
|
||||
self.setData({
|
||||
|
@ -95,7 +95,7 @@ Page({
|
||||
app.restAjax.delete(app.restAjax.path('{venueUrl}/app/booking/removemyticket/{groundBookingId}',
|
||||
[app.venueUrl,self.data.groundBookingId]), {}, {headers:{token : self.data.token}},
|
||||
function (code, data) {
|
||||
self.getDetail();
|
||||
wx.navigateBack()
|
||||
},
|
||||
function (code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
|
@ -32,7 +32,7 @@ Page({
|
||||
},
|
||||
getDetail: function(id) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/getvolunteerservicebyid/' + id, []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -130,7 +130,7 @@ Page({
|
||||
*/
|
||||
sendEnrollRequest: function(serviceMemberVO) {
|
||||
var self = this;
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/servicemember/saveservicemember', []),
|
||||
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/servicemember/saveservicemember', []),
|
||||
serviceMemberVO, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -155,9 +155,9 @@ Page({
|
||||
var self = this;
|
||||
var url;
|
||||
if(self.data.teamArray.length > 0) {
|
||||
url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
||||
url = app.volunteerUrl + '/wechat-miniapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId;
|
||||
}else {
|
||||
url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
||||
url = app.volunteerUrl + '/wechat-miniapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null';
|
||||
}
|
||||
|
||||
app.restAjax.get(app.restAjax.path(url, []), {}, {
|
||||
@ -183,7 +183,7 @@ Page({
|
||||
getMyTeam: function() {
|
||||
var self = this;
|
||||
console.log(self.data.token)
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/myteamm', []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/myteamm', []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
|
@ -28,7 +28,7 @@ Page({
|
||||
},
|
||||
getDetail(teamId) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/getteambyid/' + teamId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/team/getteambyid/' + teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -48,7 +48,7 @@ Page({
|
||||
},
|
||||
getMember(teamId) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/listteammember?teamId=' + teamId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teammember/listteammember?teamId=' + teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
@ -80,7 +80,7 @@ Page({
|
||||
console.log(e)
|
||||
var id = e.currentTarget.dataset.teammemberid;
|
||||
var type = e.currentTarget.dataset.type;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
|
@ -25,7 +25,7 @@ Page({
|
||||
},
|
||||
getUserAgree: function(type) {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/agreecontent/getagreecontentbyid/' + type, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/agreecontent/getagreecontentbyid/' + type, []),
|
||||
{}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
|
@ -134,7 +134,7 @@ Page({
|
||||
// 获取地区列表
|
||||
getAreaList: function () {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/dataarea/listareabyparentidrelease/640675', []),
|
||||
app.restAjax.get(app.restAjax.path(app.usercenterUrl + '/app/area/listallbyparentidrelease/640675', []),
|
||||
self.data.pages, null, function (code, data) {
|
||||
if (code == '200') {
|
||||
self.setData({
|
||||
|
@ -40,7 +40,7 @@ Page({
|
||||
*/
|
||||
activityList: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservicerelease', []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteerservice/listpagevolunteerservicerelease', []),
|
||||
self.data.pages, null, function(code, data) {
|
||||
if('200' == code) {
|
||||
// 将活动照片,拼接为可访问地址
|
||||
|
@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="activity">
|
||||
<view class="activity-box" bindtap="goDetail" data-id="{{item.volunteerServiceId}}" wx:for="{{serviceMap}}">
|
||||
<view class="activity-box" bindtap="goDetail" data-id="{{item.volunteerServiceId}}" wx:for="{{serviceMap}}" wx:key="index">
|
||||
<view class="activity-img">
|
||||
<image src="{{item.photo}}"></image>
|
||||
<view class="corner" wx:if="{{item.status == 'enroll'}}">报名中</view>
|
||||
|
@ -233,10 +233,10 @@ Page({
|
||||
var url;
|
||||
var requ;
|
||||
if(!self.data.volunteerMsg) {
|
||||
url = '/wxminiapp/volunteer/savevolunteer';
|
||||
url = '/wechat-miniapp/volunteer/savevolunteer';
|
||||
requ = app.restAjax.post;
|
||||
}else {
|
||||
url = '/wxminiapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
|
||||
url = '/wechat-miniapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
|
||||
requ = app.restAjax.put;
|
||||
}
|
||||
requ(app.restAjax.path(app.volunteerUrl + url, []),
|
||||
@ -305,7 +305,7 @@ Page({
|
||||
getDataFromArea: function(dictId, type) {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/dataarea/listareabyparentidrelease/' + dictId, []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/area/listallbyparentidrelease/' + dictId, []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
@ -351,7 +351,7 @@ Page({
|
||||
getVolunteerMsg() {
|
||||
var self = this;
|
||||
return new Promise(resolve => {
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/getvolunteerbyuserid', []),
|
||||
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wechat-miniapp/volunteer/getvolunteerbyuserid', []),
|
||||
{}, {
|
||||
headers: {
|
||||
'token': self.data.token
|
||||
|
@ -54,7 +54,7 @@
|
||||
<view class="info-text" style="height: auto">
|
||||
<view class="section" style="height: auto">
|
||||
<checkbox-group bindchange="serviceTypeChange">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceType}}">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceType}}" wx:key="index">
|
||||
<view>{{item.dictionaryName}}</view>
|
||||
</checkbox>
|
||||
</checkbox-group>
|
||||
@ -66,7 +66,7 @@
|
||||
<view class="info-text" style="height: auto">
|
||||
<view class="section" style="height: auto">
|
||||
<checkbox-group bindchange="serviceIndustryChange">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceIndustry}}">
|
||||
<checkbox value='{{item.dictionaryId}}' wx:for="{{serviceIndustry}}" wx:key="index">
|
||||
<view>{{item.dictionaryName}}</view>
|
||||
</checkbox>
|
||||
</checkbox-group>
|
||||
|
@ -37,9 +37,9 @@ Page({
|
||||
type: e.currentTarget.dataset.type
|
||||
})
|
||||
if(self.data.type === '1') {
|
||||
self.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
|
||||
self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=true');
|
||||
}else {
|
||||
self.otherTeam(app.volunteerUrl + '/wxminiapp/team/myjointeam?myTeam=true');
|
||||
self.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/myjointeam?myTeam=true');
|
||||
}
|
||||
},
|
||||
otherTeam: function(url) {
|
||||
@ -74,14 +74,14 @@ Page({
|
||||
var methodType;
|
||||
var title;
|
||||
if('1' == self.data.type) {
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
|
||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/saveteammember'
|
||||
teamMemberVO = {
|
||||
teamId: e.currentTarget.dataset.teamid
|
||||
}
|
||||
methodType = app.restAjax.post
|
||||
title = '申请成功!'
|
||||
}else {
|
||||
url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
|
||||
url = app.volunteerUrl + '/wechat-miniapp/teammember/quitTeam/' + self.data.teamId
|
||||
methodType = app.restAjax.get
|
||||
title = '退出成功!'
|
||||
}
|
||||
@ -109,7 +109,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getToken().then(result => {
|
||||
this.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
|
||||
this.otherTeam(app.volunteerUrl + '/wechat-miniapp/team/otherteamm?otherTeam=true');
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<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}}" wx:key="index">
|
||||
<view class="name-join">
|
||||
<view class="name">{{item.teamName}}</view>
|
||||
<view class="join" wx:if="{{item.checkStatus == '' && type == 1}}" data-teamid="{{item.teamId}}" bindtap="joinOrOutTeam">申请加入</view>
|
||||
|
Loading…
Reference in New Issue
Block a user