From 0255a2d8e7a9588322b83dcebafb26237a4955fe Mon Sep 17 00:00:00 2001 From: itgaojian163 Date: Wed, 16 Nov 2022 14:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- app.json | 12 +- pages/activity/activity.js | 5 +- pages/activityDetail/activityDetail.js | 4 +- pages/activityDialog/activityDialog.js | 2 +- pages/activitySign/activitySign.js | 129 +++++++++--------- pages/book/book.js | 2 +- pages/center/center.js | 8 +- pages/index/index.js | 69 ++++++---- pages/myActivity/myActivity.wxml | 2 +- .../myVolunteerActivity.js | 6 +- .../myVolunteerActivity.wxml | 2 +- pages/myVolunteerTeam/myVolunteerTeam.js | 6 +- pages/newTeam/newTeam.js | 6 +- .../newVolunteerActivity.js | 2 +- pages/newsList/newsList.js | 2 +- pages/orderDetail/orderDetail.js | 2 +- .../serviceActivityDetail.js | 10 +- pages/teamDetail/teamDetail.js | 6 +- pages/userAgree/userAgree.js | 2 +- pages/venue/venue.js | 2 +- pages/volunteer/volunteer.js | 2 +- pages/volunteer/volunteer.wxml | 2 +- pages/volunteerRegister/volunteerRegister.js | 8 +- .../volunteerRegister/volunteerRegister.wxml | 4 +- pages/volunteerTeam/volunteerTeam.js | 10 +- pages/volunteerTeam/volunteerTeam.wxml | 2 +- 27 files changed, 167 insertions(+), 144 deletions(-) diff --git a/app.js b/app.js index e6cf713..d27dc5b 100644 --- a/app.js +++ b/app.js @@ -52,6 +52,8 @@ App({ }) }, globalData: { - userInfo: null + userInfo: null, + curLat:-1, + curLng:-1, } }) \ No newline at end of file diff --git a/app.json b/app.json index 6ec8c36..7f0eea5 100644 --- a/app.json +++ b/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" } \ No newline at end of file diff --git a/pages/activity/activity.js b/pages/activity/activity.js index 8773892..12f680d 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -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) { diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js index 6e28e7e..0ddce26 100644 --- a/pages/activityDetail/activityDetail.js +++ b/pages/activityDetail/activityDetail.js @@ -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, []), {}, { diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js index dda691a..804ae15 100644 --- a/pages/activityDialog/activityDialog.js +++ b/pages/activityDialog/activityDialog.js @@ -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 diff --git a/pages/activitySign/activitySign.js b/pages/activitySign/activitySign.js index 17c709e..cb5c8c6 100644 --- a/pages/activitySign/activitySign.js +++ b/pages/activitySign/activitySign.js @@ -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() { - }) }) }, diff --git a/pages/book/book.js b/pages/book/book.js index 6a4dcfe..06707a0 100644 --- a/pages/book/book.js +++ b/pages/book/book.js @@ -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({ diff --git a/pages/center/center.js b/pages/center/center.js index ab5f4e3..8b8ed4a 100644 --- a/pages/center/center.js +++ b/pages/center/center.js @@ -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 } diff --git a/pages/index/index.js b/pages/index/index.js index 163f8ac..a80af19 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -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(); diff --git a/pages/myActivity/myActivity.wxml b/pages/myActivity/myActivity.wxml index a1acc7f..c72d8b7 100644 --- a/pages/myActivity/myActivity.wxml +++ b/pages/myActivity/myActivity.wxml @@ -1,6 +1,6 @@ + wx:for="{{dataMap}}" wx:key="index"> {{item.activityTitle}} diff --git a/pages/myVolunteerActivity/myVolunteerActivity.js b/pages/myVolunteerActivity/myVolunteerActivity.js index 4eb2c9f..473afd5 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.js +++ b/pages/myVolunteerActivity/myVolunteerActivity.js @@ -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'); }) }, diff --git a/pages/myVolunteerActivity/myVolunteerActivity.wxml b/pages/myVolunteerActivity/myVolunteerActivity.wxml index b018090..e2c9f54 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.wxml +++ b/pages/myVolunteerActivity/myVolunteerActivity.wxml @@ -12,7 +12,7 @@ - + diff --git a/pages/myVolunteerTeam/myVolunteerTeam.js b/pages/myVolunteerTeam/myVolunteerTeam.js index cc5261b..21884ca 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 + '/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'); }) }, diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js index dadcb1a..83680e2 100644 --- a/pages/newTeam/newTeam.js +++ b/pages/newTeam/newTeam.js @@ -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, diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js index 6f0f7df..e5bd313 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.js +++ b/pages/newVolunteerActivity/newVolunteerActivity.js @@ -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 diff --git a/pages/newsList/newsList.js b/pages/newsList/newsList.js index bc89952..c4f025c 100644 --- a/pages/newsList/newsList.js +++ b/pages/newsList/newsList.js @@ -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({ diff --git a/pages/orderDetail/orderDetail.js b/pages/orderDetail/orderDetail.js index 83a69b1..ed18594 100644 --- a/pages/orderDetail/orderDetail.js +++ b/pages/orderDetail/orderDetail.js @@ -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); diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js index f8590cf..8f7e58e 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.js +++ b/pages/serviceActivityDetail/serviceActivityDetail.js @@ -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 diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js index 6f911e8..7988b72 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 + '/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 diff --git a/pages/userAgree/userAgree.js b/pages/userAgree/userAgree.js index 81c2d27..a41588b 100644 --- a/pages/userAgree/userAgree.js +++ b/pages/userAgree/userAgree.js @@ -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 diff --git a/pages/venue/venue.js b/pages/venue/venue.js index 1a69bc5..205514b 100644 --- a/pages/venue/venue.js +++ b/pages/venue/venue.js @@ -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({ diff --git a/pages/volunteer/volunteer.js b/pages/volunteer/volunteer.js index b5b5244..800d4c5 100644 --- a/pages/volunteer/volunteer.js +++ b/pages/volunteer/volunteer.js @@ -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) { // 将活动照片,拼接为可访问地址 diff --git a/pages/volunteer/volunteer.wxml b/pages/volunteer/volunteer.wxml index 6b2fe44..04e15c6 100644 --- a/pages/volunteer/volunteer.wxml +++ b/pages/volunteer/volunteer.wxml @@ -40,7 +40,7 @@ - + 报名中 diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js index a2a7c41..d37ad92 100644 --- a/pages/volunteerRegister/volunteerRegister.js +++ b/pages/volunteerRegister/volunteerRegister.js @@ -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 diff --git a/pages/volunteerRegister/volunteerRegister.wxml b/pages/volunteerRegister/volunteerRegister.wxml index 137a234..f551e1a 100644 --- a/pages/volunteerRegister/volunteerRegister.wxml +++ b/pages/volunteerRegister/volunteerRegister.wxml @@ -54,7 +54,7 @@ - + {{item.dictionaryName}} @@ -66,7 +66,7 @@ - + {{item.dictionaryName}} diff --git a/pages/volunteerTeam/volunteerTeam.js b/pages/volunteerTeam/volunteerTeam.js index c01b99b..6e10d29 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 + '/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'); }) }, diff --git a/pages/volunteerTeam/volunteerTeam.wxml b/pages/volunteerTeam/volunteerTeam.wxml index 7fb08c9..f840dc5 100644 --- a/pages/volunteerTeam/volunteerTeam.wxml +++ b/pages/volunteerTeam/volunteerTeam.wxml @@ -11,7 +11,7 @@ - + {{item.teamName}} 申请加入