接口变更为通过区域查询

This commit is contained in:
wanggeng 2022-12-14 11:34:17 +08:00
parent db09524d83
commit fa5461d937
2 changed files with 15 additions and 5 deletions

View File

@ -1,6 +1,14 @@
const url = 'http://127.0.0.1:8081/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/'
/**
* 基础区域编码
* 日喀则540200000000
* 南木林县: 540221000000
* @type {string}
*/
const areaCode = '540221000000'
const phoneSafe = (phone) => {
if (phone.length === 11) {
@ -13,5 +21,6 @@ export default {
url,
liveUrl,
shopUrl,
areaCode: areaCode,
phoneSafe
}

View File

@ -73,7 +73,7 @@ export default {
methods: {
getDynamicsList: function () {
var self = this
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
params: self.dynamicsPage
}).then(function (res) {
var picNews = res.data.rows.splice(0, 1)[0]
@ -100,7 +100,7 @@ export default {
},
getLiterature: function () {
var self = this
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
params: self.literaturePage
}).then(function (res) {
for (var i = 0; i < res.data.rows.length; i++) {
@ -111,7 +111,7 @@ export default {
},
getExhibition: function () {
var self = this
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
params: self.exhibitionPage
}).then(function (res) {
for (var i = 0; i < res.data.rows.length; i++) {
@ -120,9 +120,10 @@ export default {
self.exhibition = res.data.rows
})
},
//
getSwiper: function () {
var self = this
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
params: {
page: 1,
rows: 3,