修改请求路径

This commit is contained in:
Renpc-kilig 2020-06-27 15:47:58 +08:00
parent 98fc9efd12
commit 21145d88e0
12 changed files with 37 additions and 37 deletions

2
app.js
View File

@ -8,7 +8,7 @@ App({
libraryUrl: 'http://192.168.0.113:8081/library',
venueUrl: 'http://192.168.0.109:8082/venuebooking',
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,
dialog: dialog,

View File

@ -19,12 +19,12 @@ Page({
*/
onLoad: function (options) {
var self = this;
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []),
{}, null, function(code, data) {
if('200' == code) {
for(var item of data.rows) {
if('' != item.activityImage) {
item.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + item.activityImage;
item.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + item.activityImage;
}
}
self.setData({

View File

@ -19,10 +19,10 @@ Page({
onLoad: function (options) {
var self = this;
var id = options.id;
app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []),
app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []),
{}, null, function(code, data) {
if('200' == code) {
data.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + data.activityImage;
data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage;
self.setData({
dataMap: data
})

View File

@ -49,10 +49,10 @@ Page({
})
if(self.data.type === '1') {
// 我发起的活动
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
}else {
// 我参加的活动
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagemyjoinservice');
self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagemyjoinservice');
}
},
myActivity: function(url) {
@ -67,7 +67,7 @@ Page({
for(var item of data.rows) {
if('' != item.photo) {
var photoArr = item.photo.split(",");
item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0];
item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
}
}
self.setData({
@ -93,14 +93,14 @@ Page({
var methodType;
var title;
if('1' == self.data.type) {
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
url = app.volunteerUrl + '/wxminiapp/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 + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
methodType = app.restAjax.get
title = '退出成功!'
}
@ -128,7 +128,7 @@ Page({
*/
onLoad: function (options) {
this.getToken().then(result => {
this.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice');
this.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
})
},

View File

@ -68,14 +68,14 @@ Page({
var methodType;
var title;
if('1' == self.data.type) {
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember'
url = app.volunteerUrl + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/team/myteamm');
})
},

View File

@ -64,7 +64,7 @@ Page({
success (res) {
const tempFilePaths = res.tempFilePaths
console.log(tempFilePaths)
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0],
'image', {
headers: {
token: self.data.token
@ -184,7 +184,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 + '/wxminiapp/team/saveteam', []),
teamVO, {
headers: {
'token': self.data.token
@ -208,7 +208,7 @@ Page({
getDataFromDict: function(dictId, type) {
var self = this;
return new Promise(resolve => {
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []),
{}, {
headers: {
token: self.data.token

View File

@ -89,7 +89,7 @@ Page({
wx.chooseImage({
success (res) {
const tempFilePaths = res.tempFilePaths
app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0],
app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0],
'image', {
headers: {
token: self.data.token
@ -175,7 +175,7 @@ Page({
photo: self.data.photo,
serviceRequirement: self.data.serviceRequirement
};
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/savevolunteerservice', []),
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/savevolunteerservice', []),
volunteerServiceVO, {
headers: {
'token': self.data.token

View File

@ -32,14 +32,14 @@ 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 + '/wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []),
{}, {
headers: {
'token': self.data.token
}
}, function(code, data) {
if('200' == code) {
data.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + data.photo;
data.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + data.photo;
self.setData({
dataMap: data
})
@ -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 + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/team/myteamm', []),
{}, {
headers: {
token: self.data.token

View File

@ -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 + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []),
{}, {
headers: {
token: self.data.token

View File

@ -36,14 +36,14 @@ 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 + '/wxminiapp/volunteerservice/listpagevolunteerservicerelease', []),
{}, null, function(code, data) {
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];
item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
}
}
self.setData({

View File

@ -203,7 +203,7 @@ Page({
agree: self.data.isAgree,
openExperience : self.data.openExperience
};
app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteer/savevolunteer', []),
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/savevolunteer', []),
volunteerVO, {
headers: {
'token': self.data.token
@ -227,7 +227,7 @@ Page({
getDataFromDict: function(dictId, type) {
var self = this;
return new Promise(resolve => {
app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []),
app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []),
{}, {
headers: {
'token': self.data.token

View File

@ -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 + '/wxminiapp/team/otherteamm?otherTeam=true');
}else {
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/myjointeam?myTeam=true');
self.otherTeam(app.volunteerUrl + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/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 + '/wxminiapp/team/otherteamm?otherTeam=true');
})
},