From da0f4e6589571735474ec38affe1833b7b2fdf2d Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 9 Apr 2024 14:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/stationDetail/stationDetail.vue | 2 +- pages/index/startPage/startPage.vue | 7 ++-- pages/tabbar/home/home.vue | 33 +++++++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 4ae6c9e..c300a29 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -308,7 +308,7 @@ if (!user) { uni.showModal({ title: '请您登录', - content: "登录佰川加油才可以加油 |˛˙꒳​˙)♡", + content: "登录中品加油才可以加油 |˛˙꒳​˙)♡", confirmText: '去登陆', success: (res) => { if (res.confirm) { diff --git a/pages/index/startPage/startPage.vue b/pages/index/startPage/startPage.vue index dfa3816..5bf6fdd 100644 --- a/pages/index/startPage/startPage.vue +++ b/pages/index/startPage/startPage.vue @@ -88,8 +88,11 @@ url: '/pages/tabbar/home/home', }) } else { - uni.redirectTo({ - url: '/BagAuth/pages/login/login' + // uni.redirectTo({ + // url: '/BagAuth/pages/login/login' + // }) + uni.switchTab({ + url: '/pages/tabbar/home/home', }) } } diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index 126f809..5683f23 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -324,8 +324,11 @@ success: (resSec) => { if (resSec.confirm) { uni.openSetting({ - success:(resThird) => { - if (resThird.authSetting['scope.userLocation']) { + success: (resThird) => { + if (resThird + .authSetting[ + 'scope.userLocation' + ]) { this.refreshLocation() } } @@ -376,10 +379,26 @@ showQr() { + const user = uni.getStorageSync('user'); + if (!user) { + uni.showToast({ + title: '请先登录!', + icon: 'none' + }) + return + } this.showThreeSites = true }, toCards() { + const user = uni.getStorageSync('user'); + if (!user) { + uni.showToast({ + title: '请先登录!', + icon: 'none' + }) + return + } uni.navigateTo({ url: '/BagMoney/pages/oilCards/oilCards' }) @@ -494,6 +513,14 @@ }, openScan() { + const user = uni.getStorageSync('user'); + if (!user) { + uni.showToast({ + title: '请先登录!', + icon: 'none' + }) + return + } uni.scanCode({ scanType: 'qrCode', onlyFromCamera: false, @@ -654,4 +681,4 @@ .my-icon-sm .text-sm { line-height: 1rem; } - + \ No newline at end of file