From 6a67ef9347914e251c82bfcd14c04a8964fd161f Mon Sep 17 00:00:00 2001 From: "@QQNZX" Date: Tue, 5 Dec 2023 11:21:21 +0800 Subject: [PATCH] =?UTF-8?q?12.05=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gasStation-uni/pagesHome/Activity/index.vue | 11 ++++++-- gasStation-uni/pagesHome/activeIn/index.vue | 31 +++++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/gasStation-uni/pagesHome/Activity/index.vue b/gasStation-uni/pagesHome/Activity/index.vue index 38c8ad5d6..601a4ec35 100644 --- a/gasStation-uni/pagesHome/Activity/index.vue +++ b/gasStation-uni/pagesHome/Activity/index.vue @@ -57,12 +57,19 @@ }) }, getData() { + uni.showLoading({ + title: '加载中' + }); request({ url: 'business/marketingActivity/activeExchange/applet', method: 'get', }).then(res => { console.log(res); - this.activityList = res.data + if (res.code == 200) { + this.activityList = res.data + uni.hideLoading(); + } + }) }, getactvity(url) { @@ -175,4 +182,4 @@ position: fixed; top: 0px; } - + \ No newline at end of file diff --git a/gasStation-uni/pagesHome/activeIn/index.vue b/gasStation-uni/pagesHome/activeIn/index.vue index 43b71355c..fc077398e 100644 --- a/gasStation-uni/pagesHome/activeIn/index.vue +++ b/gasStation-uni/pagesHome/activeIn/index.vue @@ -58,12 +58,19 @@ }, methods: { getData(name) { + uni.showLoading({ + title: '加载中' + }); if (name == '消费有礼活动') { request({ url: '/business/marketingActivity/activeConsumption/appletList', method: 'get', }).then(res => { - this.datas = res.data + if (res.code == 200) { + this.datas = res.data + uni.hideLoading(); + } + }) } if (name == '折扣营销活动') { @@ -71,7 +78,10 @@ url: '/business/marketingActivity/activeDiscount/appletList', method: 'get', }).then(res => { - this.datas = res.data + if (res.code == 200) { + this.datas = res.data + uni.hideLoading(); + } }) } if (name == '推荐有礼活动') { @@ -79,7 +89,10 @@ url: '/business/marketingActivity/activeRecommend/applet', method: 'get', }).then(res => { - this.datas = res.data + if (res.code == 200) { + this.datas = res.data + uni.hideLoading(); + } }) } if (name == '新人有礼活动') { @@ -87,7 +100,10 @@ url: '/business/marketingActivity/activeNewlyweds/applet', method: 'get', }).then(res => { - this.datas = res.data + if (res.code == 200) { + this.datas = res.data + uni.hideLoading(); + } }) } if (name == '满减营销活动') { @@ -95,7 +111,10 @@ url: '/business/marketingActivity/activeFullminus/appletList', method: 'get', }).then(res => { - this.datas = res.data + if (res.code == 200) { + this.datas = res.data + uni.hideLoading(); + } }) } @@ -174,4 +193,4 @@ font-size: 14px; color: #333333; } - + \ No newline at end of file