修改按照账号区域查询数据
This commit is contained in:
parent
bbe4ac25b2
commit
cbe03a8b96
@ -1,15 +1,16 @@
|
||||
// const url = 'http://127.0.0.1:8081/xzszwhy/'
|
||||
const url = 'http://49.233.36.36:58099/xzszwhy/'
|
||||
const url = 'http://127.0.0.1:8081/xzszwhy/'
|
||||
// const url = 'http://49.233.36.36:58099/xzszwhy/'
|
||||
const liveUrl = 'https://www.xzszwhy.cn/'
|
||||
const shopUrl = 'http://175.24.42.217:9016/xzshop/'
|
||||
/**
|
||||
* 基础区域ID、编码
|
||||
* 日喀则:640675, 540200000000
|
||||
* 南木林县: 640865, 540221000000
|
||||
* 桑珠孜区: 640676, 540202000000
|
||||
*/
|
||||
const area = {
|
||||
areaId: '640675',
|
||||
areaCode: '540200000000'
|
||||
areaId: '640865',
|
||||
areaCode: '540221000000'
|
||||
}
|
||||
|
||||
const phoneSafe = (phone) => {
|
||||
|
@ -123,7 +123,7 @@ export default {
|
||||
},
|
||||
getPointe: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/venuesmap/listrangevenuesinforelease').then(function (res) {
|
||||
axios.get(self.url + 'app/venuesmap/listrangevenuesinforelease/' + common.area.areaCode).then(function (res) {
|
||||
for (var i = 0; i < res.data.data.length; i++) {
|
||||
var p = new BMap.Point(res.data.data[i].longitude, res.data.data[i].latitude)
|
||||
self.arrayList.push(p)
|
||||
|
@ -20,8 +20,8 @@
|
||||
<div class="select-line">
|
||||
<span>选择区域></span>
|
||||
<div style="display: inline-block;width: 94%;">
|
||||
<button :class="{active: area == ''}" @click="changeArea(null)">全部</button>
|
||||
<button v-for="(btn,idx) in areaList" :key="idx" @click="changeArea(btn.areaId, btn.areaLevel)" :class="{active: area == btn.areaId}">{{btn.areaName}}</button>
|
||||
<button :class="{active: area === defaultArea}" @click="changeArea(defaultArea)">全部</button>
|
||||
<button v-for="(btn,idx) in areaList" :key="btn.areaId" @click="changeArea(btn.areaCode, btn.areaLevel)" :class="{active: area === btn.areaCode}">{{btn.areaName}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,18 +61,18 @@
|
||||
<span @click="paging(1)">首页</span>
|
||||
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
|
||||
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page === cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="page.totalPage > 5">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page === cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page === (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.totalPage - 5 + cpage}}
|
||||
</li>
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page === (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.page - (3 - cpage)}}
|
||||
</li>
|
||||
</ul>
|
||||
@ -112,7 +112,8 @@ export default {
|
||||
url: common.url,
|
||||
isLoading: false,
|
||||
areaList: [],
|
||||
area: ''
|
||||
defaultArea: common.area.areaCode,
|
||||
area: common.area.areaCode
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -127,7 +128,7 @@ export default {
|
||||
getHeritageInfo () {
|
||||
var self = this
|
||||
self.isLoading = true
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease', {
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease/' + self.area, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
if (res.status === 200) {
|
||||
@ -144,25 +145,14 @@ export default {
|
||||
},
|
||||
getAreaList: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/area/listbyparentidrelease/640675').then(function (res) {
|
||||
axios.get(self.url + 'app/area/listbyparentidrelease/' + common.area.areaId).then(function (res) {
|
||||
self.areaList = res.data
|
||||
})
|
||||
},
|
||||
changeArea: function (area, lv) {
|
||||
changeArea: function (code) {
|
||||
this.page.page = 1
|
||||
this.changePage = 1
|
||||
if (area) {
|
||||
var level = 'area' + (parseInt(lv) + 1)
|
||||
this.$set(this.page, level, area)
|
||||
this.area = area
|
||||
} else {
|
||||
this.area = ''
|
||||
this.page = {
|
||||
page: 1,
|
||||
rows: 8,
|
||||
totalPage: 1
|
||||
}
|
||||
}
|
||||
this.area = code
|
||||
this.getHeritageInfo()
|
||||
}
|
||||
},
|
||||
|
@ -10,8 +10,8 @@
|
||||
<div class="type-container">
|
||||
<span>类型:</span>
|
||||
<ul>
|
||||
<li :class="{active: page.newsDirectoriesId == ''}" @click="changeType(null)">全部</li>
|
||||
<li v-for="(btn,idx) in typeList" :key="idx" :class="{active: page.newsDirectoriesId == btn.newsDirectoriesId}" @click="changeType(btn.newsDirectoriesId)">{{btn.directoriesName}}</li>
|
||||
<li :class="{active: page.newsDirectoriesId === ''}" @click="changeType(null)">全部</li>
|
||||
<li v-for="(btn,idx) in typeList" :key="idx" :class="{active: page.newsDirectoriesId === btn.newsDirectoriesId}" @click="changeType(btn.newsDirectoriesId)">{{btn.directoriesName}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -40,18 +40,18 @@
|
||||
<span @click="paging(1)">首页</span>
|
||||
<span @click="paging(page.page - 1)" v-if="page.page > 1">上一页</span>
|
||||
<ul v-if="page.totalPage > 0 && page.totalPage <= 5">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-for="cpage in page.totalPage" :class="{'active': page.page === cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="page.totalPage > 5">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page == cpage}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page < 3" v-for="cpage in 5" :class="{'active': page.page === cpage}" :key="cpage" @click="paging(cpage)">
|
||||
{{cpage}}
|
||||
</li>
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page > page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page === (page.totalPage - 5 + cpage)}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.totalPage - 5 + cpage}}
|
||||
</li>
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page == (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
<li v-if="page.page >= 3 && page.page <= page.totalPage - 2" v-for="cpage in 5" :class="{'active': page.page === (page.page - (3 - cpage))}" :key="cpage" @click="paging(cpage)">
|
||||
{{page.page - (3 - cpage)}}
|
||||
</li>
|
||||
</ul>
|
||||
@ -153,7 +153,6 @@ export default {
|
||||
self.isLoading = false
|
||||
self.resource = res.data.rows
|
||||
self.page.totalPage = Math.ceil(res.data.total / self.page.rows)
|
||||
console.log(self.resource)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -312,7 +312,7 @@ export default {
|
||||
// 查询志愿活动
|
||||
searchVolunteer: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease', {
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease/' + common.area.areaCode, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
for (var i = 0; i < res.data.rows.length; i++) {
|
||||
@ -417,7 +417,7 @@ export default {
|
||||
// 查询非遗清单
|
||||
searchHeritage: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease', {
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease/' + common.area.areaCode, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
self.pageList = res.data.rows
|
||||
|
@ -305,7 +305,7 @@ export default {
|
||||
// 查询志愿活动
|
||||
searchVolunteer: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease', {
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease/' + common.area.areaCode, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
for (var i = 0; i < res.data.rows.length; i++) {
|
||||
@ -420,7 +420,7 @@ export default {
|
||||
// 查询非遗清单
|
||||
searchHeritage: function () {
|
||||
var self = this
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease', {
|
||||
axios.get(self.url + 'app/intangiblelibrary/listpageintangiblelibraryrelease/' + common.area.areaCode, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
self.heritageList = res.data.rows
|
||||
|
@ -105,7 +105,7 @@ export default {
|
||||
getVolunteerList: function () {
|
||||
var self = this
|
||||
self.isLoading = true
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease', {
|
||||
axios.get(self.url + 'app/volunteerservice/listpagevolunteerservicerelease/' + common.area.areaCode, {
|
||||
params: self.page
|
||||
}).then(function (res) {
|
||||
for (var i = 0; i < res.data.rows.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user