From 73514c88a1ce6f9791070076d3c9b2ec1680e26a Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 20 Jun 2020 15:04:00 +0800 Subject: [PATCH] 0620 --- src/pages/PersonCenter/PersonCenter.vue | 112 ++++++++++++++++-- src/pages/VolunteerDetail/VolunteerDetail.vue | 1 + 2 files changed, 104 insertions(+), 9 deletions(-) diff --git a/src/pages/PersonCenter/PersonCenter.vue b/src/pages/PersonCenter/PersonCenter.vue index 9b1fc9c..54f6ea3 100644 --- a/src/pages/PersonCenter/PersonCenter.vue +++ b/src/pages/PersonCenter/PersonCenter.vue @@ -146,6 +146,22 @@ 服务区域: + + + + + + 县区: + + + + + + 村乡: + + + + + + 县区: + + + + + + 村乡: + @@ -611,12 +643,16 @@ export default { token: window.sessionStorage.getItem('token'), history: [], isVolunteer: false, + volunteerCity: [], + volunteerCounty: [], volunteerArea: [], volunteerType: [], volunteerIndustry: [], volunteerRegisterInfo: { agree: true, openExperience: '1', + serviceCity: '', + serviceCounty: '', serviceArea: '', serviceType: '', serviceIndustry: '' @@ -628,7 +664,9 @@ export default { photo: '', teamArea: '', teamName: '', - teamWatchword: '' + teamWatchword: '', + teamCity: '', + teamCounty: '' }, myTeam: [], checkTeamDetail: false, @@ -639,7 +677,10 @@ export default { otherTeamDetail: [], signedActivity: [], signedVolunteer: [], - isLoading: false + isLoading: false, + teamCity: [], + teamCounty: [], + teamArea: [] } }, computed: { @@ -674,12 +715,15 @@ export default { this.getVenueTicket() } else if (tab === 3) { this.userIsVolunteer() - this.getVolunteerArea() + this.getVolunteerCity() } else if (tab === 5) { this.page.rows = 7 this.getMyTeam() } else if (tab === 4) { - this.getVolunteerArea() + this.volunteerTeamRegister.teamArea = '' + this.volunteerTeamRegister.teamCity = '' + this.volunteerTeamRegister.teamCounty = '' + this.getVolunteerCity() } else if (tab === 6) { this.page.rows = 10 this.getOtherTeamList() @@ -881,14 +925,60 @@ export default { } }, // 获取志愿者注册区域 - getVolunteerArea: function () { + getVolunteerCity: function () { var self = this - axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/761d8633-3c2f-4e92-b32d-fb50d3dc07b7', { + axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/4a03e904-81e2-48e9-9006-e15ea4a6bc69', { headers: { token: self.token } }).then(function (res) { - self.volunteerArea = res.data + if (self.tab === 3) { + self.volunteerCity = res.data + } else if (self.tab === 4) { + self.teamCity = res.data + } + }) + }, + // 获取县区 + getVolunteerCounty: function () { + var self = this + var county + if (self.tab === 3) { + county = self.volunteerRegisterInfo.serviceCity + } else if (self.tab === 4) { + county = self.volunteerTeamRegister.teamCity + } + axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/' + county, { + headers: { + token: self.token + } + }).then(function (res) { + if (self.tab === 3) { + self.volunteerCounty = res.data + } else if (self.tab === 4) { + self.teamCounty = res.data + } + }) + }, + // 获取乡镇 + getVolunteerArea: function () { + var self = this + var area + if (self.tab === 3) { + area = self.volunteerRegisterInfo.serviceCounty + } else if (self.tab === 4) { + area = self.volunteerTeamRegister.teamCounty + } + axios.get('http://192.168.0.111:8888/volunteer/app/datadictionary/listdictionarybyparentid/' + area, { + headers: { + token: self.token + } + }).then(function (res) { + if (self.tab === 3) { + self.volunteerArea = res.data + } else if (self.tab === 4) { + self.teamArea = res.data + } }) }, // 获取志愿者注册类别 @@ -925,7 +1015,7 @@ export default { self.isVolunteer = true self.getVolunteerInfo() } - self.getVolunteerArea() + self.getVolunteerCity() self.getVolunteerType() self.getVolunteerIndustry() }) @@ -953,10 +1043,14 @@ export default { } }).then(function (res) { self.volunteerRegisterInfo.openExperience = res.data.openExperience + self.volunteerRegisterInfo.serviceCity = res.data.serviceCity + self.volunteerRegisterInfo.serviceCounty = res.data.serviceCounty self.volunteerRegisterInfo.serviceArea = res.data.serviceArea self.volunteerRegisterInfo.serviceIndustry = res.data.serviceIndustry self.volunteerRegisterInfo.serviceType = res.data.serviceType self.volunteerId = res.data.volunteerId + self.getVolunteerCounty() + self.getVolunteerArea() }) }, // 修改志愿者信息 diff --git a/src/pages/VolunteerDetail/VolunteerDetail.vue b/src/pages/VolunteerDetail/VolunteerDetail.vue index 95e71f3..dccdffe 100644 --- a/src/pages/VolunteerDetail/VolunteerDetail.vue +++ b/src/pages/VolunteerDetail/VolunteerDetail.vue @@ -17,6 +17,7 @@

{{volunteerDetail.serviceName}}

+

活动地址:{{volunteerDetail.address}}

活动时间:{{volunteerDetail.startTime}}至{{volunteerDetail.endTime}}

招募人数:{{volunteerDetail.count}}

服务要求:{{volunteerDetail.serviceRequirement}}