From fa5461d93788ff703c7add598ed88efd851f3e98 Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Wed, 14 Dec 2022 11:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4=E4=B8=BA?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=8C=BA=E5=9F=9F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/components/common.js | 11 ++++++++++- src/pages/Index/Index.vue | 9 +++++---- 2 files changed, 15 insertions(+), 5 deletions(-) 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,