| | |
| | | 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() |
| | |
| | | const locationToast = () => { |
| | | uni.showModal({ |
| | | title: "请求授权当前位置", |
| | | content: "请求获取您的位置,加载附近饮水设备信息!", |
| | | content: "请求获取您的位置,加载附近取水设备信息!", |
| | | confirmText: "前往设置", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | |
| | | } |
| | | onMounted(() => { |
| | | getTopHeight() |
| | | getUserDatail() |
| | | // 获取位置信息 |
| | | getUserLocation() |
| | | }) |
| | | |
| | | onShow(() => { |
| | | getUserDatail() |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |