From c1f0cf198a08b5518010a2a411a94f96d73d15b5 Mon Sep 17 00:00:00 2001 From: donqi Date: Thu, 21 Jul 2022 14:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=80=85=E5=88=86=E9=94=80?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=8F=82=E6=95=B0undefined=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 3 +-- pages/index/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/js/request.js b/common/js/request.js index 9deb810..54f4dca 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -66,8 +66,7 @@ export default { await _this.wxGetLocation(); } }, - async wxGetLocation() { - console.log("获取定位") + async wxGetLocation() { let res = await wx.getLocation({ type: 'gcj02' }) diff --git a/pages/index/index.vue b/pages/index/index.vue index 3ec8325..0329fbd 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -105,13 +105,13 @@ this.inParam = option; this.loadData(option); }, - onShareAppMessage(e) { + async onShareAppMessage(e) { let shareInfo = null; if (e && e.target && e.target.dataset) { shareInfo = e.target.dataset.shareInfo; } if (!this.curUserInfo) { - this.curUserInfo = this.$request.getCurUserNoCache(); + this.curUserInfo = await this.$request.getCurUserNoCache(); if (!this.curUserInfo) { uni.showToast({ title: '请前往“我的”完成登录',