From 128cfe4b906fad1bb78bdaf280935b5360f2dbea Mon Sep 17 00:00:00 2001 From: qzc Date: Thu, 4 Jul 2024 09:16:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 10 +++++++++- pages/homeIndex/index.vue | 11 ++++++++++- pages/login/login.vue | 29 ++++++++++++++++------------- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/pages.json b/pages.json index b63f3d1..dd18d9f 100644 --- a/pages.json +++ b/pages.json @@ -19,7 +19,15 @@ { "path": "pages/homeIndex/index", "style": { - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "enablePullDownRefresh": true, + "app-plus": { + "pullToRefresh": { + "support": true, + "style": "default", + "offset": "70px" + } + } } }, { diff --git a/pages/homeIndex/index.vue b/pages/homeIndex/index.vue index 34ada72..57edcf2 100644 --- a/pages/homeIndex/index.vue +++ b/pages/homeIndex/index.vue @@ -403,7 +403,16 @@ export default { numPic: 0, allStatus: false } - }, + }, + onPullDownRefresh() { + this.getSwiperList() + this.getOverview() + this.getDataTime() + this.getResponseLevel() + setTimeout(function () { + uni.stopPullDownRefresh(); + }, 1000); + }, computed: { getNavList () { const adcd = uni.getStorageSync('value').adcd diff --git a/pages/login/login.vue b/pages/login/login.vue index 6cad247..f07d095 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -27,8 +27,8 @@ >记住用户名和密码 - - + + @@ -113,9 +113,9 @@ export default { } //提交表单 - + uni.$http.post('/gunshiApp/xfflood/doLogin', postForm).then(res => { - uni.showLoading({ title: '努力登录中...', mask: true }) + // uni.showLoading({ title: '努力登录中...', mask: true }) if (res.data.code === 200) { //localStorage保存token @@ -150,17 +150,20 @@ export default { } else { uni.setStorageSync('avatar', '../../static/tabs/touxiang.png') } + + + + uni.showLoading({title:'努力登录中...', mask:true}); + //登录成功后跳转界 + setTimeout(function () { + uni.hideLoading() + uni.reLaunch({ + url: '/pages/homeIndex/index' + }) + }, 1000) + clearTimeout() }) } - - //登录成功后跳转界面 - setTimeout(function () { - uni.hideLoading() - uni.reLaunch({ - url: '/pages/homeIndex/index' - }) - }, 1000) - clearTimeout() } else if (res.data.code === 400) { //登录失败后弹出信息 setTimeout(function () {