diff --git a/src/common/components/common.js b/src/common/components/common.js index 9ae026c..7437ff9 100644 --- a/src/common/components/common.js +++ b/src/common/components/common.js @@ -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 } diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index f239b45..c27f3f6 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -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,