From a1aca8be99e62ea683fd8d7db82d7a480f5d0305 Mon Sep 17 00:00:00 2001 From: web <candymxq888@outlook.com> Date: 星期二, 08 七月 2025 09:58:05 +0800 Subject: [PATCH] feat:增加取水能力 --- pages/index/index.vue | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index c1abbf2..9564b1e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -51,6 +51,7 @@ import { onMounted, ref } from "vue"; import { BASE_URL } from '../../config/index.js'; import { getUserInfo } from '@/api/index.js' + import { onShow } from "@dcloudio/uni-app" const topHeight = ref(0) const userInfo = ref() @@ -108,7 +109,7 @@ const locationToast = () => { uni.showModal({ title: "请求授权当前位置", - content: "请求获取您的位置,加载附近饮水设备信息!", + content: "请求获取您的位置,加载附近取水设备信息!", confirmText: "前往设置", success: (res) => { if (res.confirm) { @@ -145,10 +146,13 @@ } onMounted(() => { getTopHeight() - getUserDatail() // 获取位置信息 getUserLocation() }) + + onShow(() => { + getUserDatail() + }) </script> <style lang="scss" scoped> -- Gitblit v1.9.3