修改请求路径

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', 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', liveUrl: 'http://192.168.0.113:8084/live',
restAjax: restAjax, restAjax: restAjax,
dialog: dialog, dialog: dialog,

View File

@ -19,12 +19,12 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
var self = this; 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) { {}, null, function(code, data) {
if('200' == code) { if('200' == code) {
for(var item of data.rows) { for(var item of data.rows) {
if('' != item.activityImage) { 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({ self.setData({

View File

@ -19,10 +19,10 @@ Page({
onLoad: function (options) { onLoad: function (options) {
var self = this; var self = this;
var id = options.id; 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) { {}, null, function(code, data) {
if('200' == code) { 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({ self.setData({
dataMap: data dataMap: data
}) })

View File

@ -49,10 +49,10 @@ Page({
}) })
if(self.data.type === '1') { if(self.data.type === '1') {
// 我发起的活动 // 我发起的活动
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice'); self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice');
}else { }else {
// 我参加的活动 // 我参加的活动
self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagemyjoinservice'); self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagemyjoinservice');
} }
}, },
myActivity: function(url) { myActivity: function(url) {
@ -67,7 +67,7 @@ Page({
for(var item of 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 = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0]; item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
} }
} }
self.setData({ self.setData({
@ -93,14 +93,14 @@ Page({
var methodType; var methodType;
var title; var title;
if('1' == self.data.type) { if('1' == self.data.type) {
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
teamMemberVO = { teamMemberVO = {
teamId: e.currentTarget.dataset.teamid teamId: e.currentTarget.dataset.teamid
} }
methodType = app.restAjax.post methodType = app.restAjax.post
title = '申请成功!' title = '申请成功!'
}else { }else {
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
methodType = app.restAjax.get methodType = app.restAjax.get
title = '退出成功!' title = '退出成功!'
} }
@ -128,7 +128,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getToken().then(result => { 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 methodType;
var title; var title;
if('1' == self.data.type) { if('1' == self.data.type) {
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
teamMemberVO = { teamMemberVO = {
teamId: e.currentTarget.dataset.teamid teamId: e.currentTarget.dataset.teamid
} }
methodType = app.restAjax.post methodType = app.restAjax.post
title = '申请成功!' title = '申请成功!'
}else { }else {
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
methodType = app.restAjax.get methodType = app.restAjax.get
title = '退出成功!' title = '退出成功!'
} }
@ -103,7 +103,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getToken().then(result => { 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) { success (res) {
const tempFilePaths = res.tempFilePaths const tempFilePaths = res.tempFilePaths
console.log(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', { 'image', {
headers: { headers: {
token: self.data.token token: self.data.token
@ -184,7 +184,7 @@ Page({
self.data.teamArea[self.data.teamAreaIndex].dictionaryId : 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, { teamVO, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
@ -208,7 +208,7 @@ Page({
getDataFromDict: function(dictId, type) { getDataFromDict: function(dictId, type) {
var self = this; var self = this;
return new Promise(resolve => { 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: { headers: {
token: self.data.token token: self.data.token

View File

@ -89,7 +89,7 @@ Page({
wx.chooseImage({ wx.chooseImage({
success (res) { success (res) {
const tempFilePaths = res.tempFilePaths 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', { 'image', {
headers: { headers: {
token: self.data.token token: self.data.token
@ -175,7 +175,7 @@ Page({
photo: self.data.photo, photo: self.data.photo,
serviceRequirement: self.data.serviceRequirement 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, { volunteerServiceVO, {
headers: { headers: {
'token': self.data.token 'token': self.data.token

View File

@ -32,14 +32,14 @@ Page({
}, },
getDetail: function(id) { getDetail: function(id) {
var self = this; 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: { headers: {
'token': self.data.token 'token': self.data.token
} }
}, function(code, data) { }, function(code, data) {
if('200' == code) { 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({ self.setData({
dataMap: data dataMap: data
}) })
@ -130,7 +130,7 @@ Page({
*/ */
sendEnrollRequest: function(serviceMemberVO) { sendEnrollRequest: function(serviceMemberVO) {
var self = this; 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, { serviceMemberVO, {
headers: { headers: {
token: self.data.token token: self.data.token
@ -155,9 +155,9 @@ Page({
var self = this; var self = this;
var url; var url;
if(self.data.teamArray.length > 0) { 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 { }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, []), {}, { app.restAjax.get(app.restAjax.path(url, []), {}, {
@ -183,7 +183,7 @@ Page({
getMyTeam: function() { getMyTeam: function() {
var self = this; var self = this;
console.log(self.data.token) 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: { headers: {
token: self.data.token token: self.data.token

View File

@ -28,7 +28,7 @@ Page({
}, },
getDetail(teamId) { getDetail(teamId) {
var self = this; 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: { headers: {
token: self.data.token token: self.data.token
@ -48,7 +48,7 @@ Page({
}, },
getMember(teamId) { getMember(teamId) {
var self = this; 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: { headers: {
token: self.data.token token: self.data.token
@ -80,7 +80,7 @@ Page({
console.log(e) console.log(e)
var id = e.currentTarget.dataset.teammemberid; var id = e.currentTarget.dataset.teammemberid;
var type = e.currentTarget.dataset.type; 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: { headers: {
token: self.data.token token: self.data.token

View File

@ -36,14 +36,14 @@ Page({
*/ */
activityList: function() { activityList: function() {
var self = this; 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) { {}, null, function(code, data) {
if('200' == code) { if('200' == code) {
// 将活动照片,拼接为可访问地址 // 将活动照片,拼接为可访问地址
for(var item of 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 = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0]; item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0];
} }
} }
self.setData({ self.setData({

View File

@ -203,7 +203,7 @@ Page({
agree: self.data.isAgree, agree: self.data.isAgree,
openExperience : self.data.openExperience 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, { volunteerVO, {
headers: { headers: {
'token': self.data.token 'token': self.data.token
@ -227,7 +227,7 @@ Page({
getDataFromDict: function(dictId, type) { getDataFromDict: function(dictId, type) {
var self = this; var self = this;
return new Promise(resolve => { 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: { headers: {
'token': self.data.token 'token': self.data.token

View File

@ -37,9 +37,9 @@ Page({
type: e.currentTarget.dataset.type type: e.currentTarget.dataset.type
}) })
if(self.data.type === '1') { if(self.data.type === '1') {
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true'); self.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
}else { }else {
self.otherTeam(app.volunteerUrl + 'wxminiapp/team/myjointeam?myTeam=true'); self.otherTeam(app.volunteerUrl + '/wxminiapp/team/myjointeam?myTeam=true');
} }
}, },
otherTeam: function(url) { otherTeam: function(url) {
@ -74,14 +74,14 @@ Page({
var methodType; var methodType;
var title; var title;
if('1' == self.data.type) { if('1' == self.data.type) {
url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember'
teamMemberVO = { teamMemberVO = {
teamId: e.currentTarget.dataset.teamid teamId: e.currentTarget.dataset.teamid
} }
methodType = app.restAjax.post methodType = app.restAjax.post
title = '申请成功!' title = '申请成功!'
}else { }else {
url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId
methodType = app.restAjax.get methodType = app.restAjax.get
title = '退出成功!' title = '退出成功!'
} }
@ -109,7 +109,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.getToken().then(result => { this.getToken().then(result => {
this.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true'); this.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true');
}) })
}, },