From 21145d88e0b57d0771624282eab303389a25725e Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Sat, 27 Jun 2020 15:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/activity/activity.js | 4 ++-- pages/activityDetail/activityDetail.js | 4 ++-- pages/myVolunteerActivity/myVolunteerActivity.js | 12 ++++++------ pages/myVolunteerTeam/myVolunteerTeam.js | 6 +++--- pages/newTeam/newTeam.js | 6 +++--- pages/newVolunteerActivity/newVolunteerActivity.js | 4 ++-- pages/serviceActivityDetail/serviceActivityDetail.js | 12 ++++++------ pages/teamDetail/teamDetail.js | 6 +++--- pages/volunteer/volunteer.js | 4 ++-- pages/volunteerRegister/volunteerRegister.js | 4 ++-- pages/volunteerTeam/volunteerTeam.js | 10 +++++----- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/app.js b/app.js index ce64a40..bf675e7 100644 --- a/app.js +++ b/app.js @@ -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, diff --git a/pages/activity/activity.js b/pages/activity/activity.js index 75d3736..530b1f2 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -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({ diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js index 115d24b..fb366e4 100644 --- a/pages/activityDetail/activityDetail.js +++ b/pages/activityDetail/activityDetail.js @@ -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 }) diff --git a/pages/myVolunteerActivity/myVolunteerActivity.js b/pages/myVolunteerActivity/myVolunteerActivity.js index 216845f..7387995 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.js +++ b/pages/myVolunteerActivity/myVolunteerActivity.js @@ -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'); }) }, diff --git a/pages/myVolunteerTeam/myVolunteerTeam.js b/pages/myVolunteerTeam/myVolunteerTeam.js index 94925b1..cc5261b 100644 --- a/pages/myVolunteerTeam/myVolunteerTeam.js +++ b/pages/myVolunteerTeam/myVolunteerTeam.js @@ -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'); }) }, diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js index 8cea636..881d966 100644 --- a/pages/newTeam/newTeam.js +++ b/pages/newTeam/newTeam.js @@ -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 diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js index 03915af..3b7aab7 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.js +++ b/pages/newVolunteerActivity/newVolunteerActivity.js @@ -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 diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js index 15f8aa8..93857a4 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.js +++ b/pages/serviceActivityDetail/serviceActivityDetail.js @@ -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 diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js index 036ad0c..6f911e8 100644 --- a/pages/teamDetail/teamDetail.js +++ b/pages/teamDetail/teamDetail.js @@ -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 diff --git a/pages/volunteer/volunteer.js b/pages/volunteer/volunteer.js index 5821d54..3eb8f9c 100644 --- a/pages/volunteer/volunteer.js +++ b/pages/volunteer/volunteer.js @@ -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({ diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js index beab318..7e5cc41 100644 --- a/pages/volunteerRegister/volunteerRegister.js +++ b/pages/volunteerRegister/volunteerRegister.js @@ -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 diff --git a/pages/volunteerTeam/volunteerTeam.js b/pages/volunteerTeam/volunteerTeam.js index 032dbc8..c01b99b 100644 --- a/pages/volunteerTeam/volunteerTeam.js +++ b/pages/volunteerTeam/volunteerTeam.js @@ -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'); }) },