From be3936a1bfea6c519ea401300bbf264c0b2bf554 Mon Sep 17 00:00:00 2001 From: zhengshuiqi Date: Fri, 25 Nov 2022 21:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A0=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/account/myCoupons.vue | 3 ++- pages/index/index.vue | 26 ++++++++++++++++---------- pages/login/index.vue | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pages/account/myCoupons.vue b/pages/account/myCoupons.vue index a90c414..cea8244 100644 --- a/pages/account/myCoupons.vue +++ b/pages/account/myCoupons.vue @@ -23,7 +23,8 @@ sorry,no coupons~ - + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 7c16d1d..efcf871 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -216,7 +216,13 @@ uni.getNetworkType({ success: (res) => { console.log(res.networkType, s); - if (res.networkType !== 'none') { + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { that.typee = 2; clearInterval(time); let home = 'HOME' @@ -244,7 +250,7 @@ }) s++; }, 5000); - + }, mounted() { @@ -323,18 +329,18 @@ }, methods: { - checkNetwork(){ + checkNetwork() { uni.getNetworkType({ - complete:function(res){ + complete: function(res) { // console.log(res.networkType) - if(res.networkType=='none'){ - setTimeout(()=>{ + if (res.networkType == 'none') { + setTimeout(() => { uni.showToast({ - icon:'none', - title:'Please connect to the network', - duration:3000, + icon: 'none', + title: 'Please connect to the network', + duration: 3000, }) - },200) + }, 200) // return false } } diff --git a/pages/login/index.vue b/pages/login/index.vue index 3670b4e..3926142 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -207,8 +207,8 @@ uni.setStorageSync('isLogin',1) uni.setStorageSync('user_info',res.data) uni.switchTab({ - // delta: 1 - url:'../index/index' + delta: 1 + // url:'../index/index' }) }else{ if(res.data){