From fbd1cac020b07ed977e9b8d841ea24a92c6df0cc Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Fri, 27 May 2022 14:38:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=AE=9A=E4=BD=8D=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/refuel-details/refuel-details.vue | 4 +-- pages/tabBar/home/home.vue | 31 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index 2ecdfe2..6a8d024 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -215,7 +215,7 @@ this.counId = options.desId; if (app.globalData.accountId) { this.isTyAgent = true; - } + } // #ifdef H5 if (app.globalData.accountType && app.globalData.accountType == '000000#/') { this.recentGasStation(); @@ -265,7 +265,7 @@ longitude: app.globalData.longitude, isTyAgent: this.isTyAgent } - recentGasStation(params).then(res => { + recentGasStation(params).then(res => { uni.hideLoading(); if (res.return_code == '000000') { this.storeList = res.return_data; diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index b0e261b..221c55a 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -187,20 +187,6 @@ } } }) - uni.getStorage({ - key: 'accountType', - success(e) { - if (e.data) { - app.globalData.accountType = e.data; - if (e.data == '000000#/' && app.globalData.h5code) { - uni.navigateTo({ - url: '../../goods/refuel-details/refuel-details' - }) - } - - } - } - }) // #endif }, onLoad(options) { @@ -384,6 +370,7 @@ success: function(res) { app.globalData.latitude = res.latitude; app.globalData.longitude = res.longitude; + // that.findByLatAndLng(res.longitude, res.latitude); // #ifdef H5 that.getUserLocation(res.longitude, res.latitude); @@ -519,7 +506,21 @@ that.getCmsAactibity(); that.getCmsContentcmshome(); that.getCmsContentcmsContent(); - } + } + uni.getStorage({ + key: 'accountType', + success(e) { + if (e.data) { + app.globalData.accountType = e.data; + if (e.data == '000000#/' && app.globalData.h5code) { + uni.navigateTo({ + url: '../../goods/refuel-details/refuel-details' + }) + } + + } + } + }) }) .catch(err => {