接口变更为通过区域查询
This commit is contained in:
parent
db09524d83
commit
fa5461d937
@ -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 liveUrl = 'https://www.xzszwhy.cn/'
|
||||||
const shopUrl = 'http://175.24.42.217:9016/xzshop/'
|
const shopUrl = 'http://175.24.42.217:9016/xzshop/'
|
||||||
|
/**
|
||||||
|
* 基础区域编码
|
||||||
|
* 日喀则:540200000000
|
||||||
|
* 南木林县: 540221000000
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
const areaCode = '540221000000'
|
||||||
|
|
||||||
const phoneSafe = (phone) => {
|
const phoneSafe = (phone) => {
|
||||||
if (phone.length === 11) {
|
if (phone.length === 11) {
|
||||||
@ -13,5 +21,6 @@ export default {
|
|||||||
url,
|
url,
|
||||||
liveUrl,
|
liveUrl,
|
||||||
shopUrl,
|
shopUrl,
|
||||||
|
areaCode: areaCode,
|
||||||
phoneSafe
|
phoneSafe
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getDynamicsList: function () {
|
getDynamicsList: function () {
|
||||||
var self = this
|
var self = this
|
||||||
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
||||||
params: self.dynamicsPage
|
params: self.dynamicsPage
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
var picNews = res.data.rows.splice(0, 1)[0]
|
var picNews = res.data.rows.splice(0, 1)[0]
|
||||||
@ -100,7 +100,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getLiterature: function () {
|
getLiterature: function () {
|
||||||
var self = this
|
var self = this
|
||||||
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
||||||
params: self.literaturePage
|
params: self.literaturePage
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
for (var i = 0; i < res.data.rows.length; i++) {
|
for (var i = 0; i < res.data.rows.length; i++) {
|
||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getExhibition: function () {
|
getExhibition: function () {
|
||||||
var self = this
|
var self = this
|
||||||
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
||||||
params: self.exhibitionPage
|
params: self.exhibitionPage
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
for (var i = 0; i < res.data.rows.length; i++) {
|
for (var i = 0; i < res.data.rows.length; i++) {
|
||||||
@ -120,9 +120,10 @@ export default {
|
|||||||
self.exhibition = res.data.rows
|
self.exhibition = res.data.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 轮播图
|
||||||
getSwiper: function () {
|
getSwiper: function () {
|
||||||
var self = this
|
var self = this
|
||||||
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease', {
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
||||||
params: {
|
params: {
|
||||||
page: 1,
|
page: 1,
|
||||||
rows: 3,
|
rows: 3,
|
||||||
|
Loading…
Reference in New Issue
Block a user