From 2d1f0f79e03868bd23d8042fb660a9ba8658693a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Sat, 1 Apr 2023 13:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=A6=96=E9=A1=B5=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 3 +-- src/pages/index/index.vue | 47 +++++++++++++++++---------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/src/pages.json b/src/pages.json index f6ac0de..e4725f5 100644 --- a/src/pages.json +++ b/src/pages.json @@ -3,8 +3,7 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "熊熊安装队", - "enablePullDownRefresh": true + "navigationBarTitleText": "熊熊安装队" } }, { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 97d7f74..4394643 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -120,38 +120,31 @@ export default { WidgetModal, }, onLoad() { - this.initPage(); + // 首页轮播 + this.$request({ + api: "index.banner", + }).then((response) => { + response.data.forEach((item) => { + this.bannerList.push({ + image: item.image, + }); + }); + }); + // 系统公告 + this.$models.system.notifyList().then((list) => { + this.notifyList = list; + }); + // 导航 + this.$models.system.navList().then((list) => { + this.installServiceList = list.install; + this.aftermarketServiceList = list.aftermarket; + }); }, onShow() {}, onReady() {}, onReachBottom() {}, - onPullDownRefresh() { - this.initPage(); - uni.stopPullDownRefresh(); - }, + onPullDownRefresh() {}, methods: { - initPage() { - this.bannerList = []; - // 首页轮播 - this.$request({ - api: "index.banner", - }).then((response) => { - response.data.forEach((item) => { - this.bannerList.push({ - image: item.image, - }); - }); - }); - // 系统公告 - this.$models.system.notifyList().then((list) => { - this.notifyList = list; - }); - // 导航 - this.$models.system.navList().then((list) => { - this.installServiceList = list.install; - this.aftermarketServiceList = list.aftermarket; - }); - }, /** * 跳转 */