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: '请前往“我的”完成登录',