| | |
| | | */ |
| | | // 小程序更新检测 |
| | | import { useUserStore } from "@/store/index.js" |
| | | import configEnv from "@/config/env.js"; |
| | | import process from "node:process" |
| | | |
| | | export function mpUpdate () { |
| | | const updateManager = uni.getUpdateManager() |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getEnvObj() { |
| | | return configEnv?.[process?.env?.ENV_NAME] || {} |
| | | } |
| | | export function getWebViewUrl (targetUrl, otherParams) { |
| | | const userStore = useUserStore() |
| | | const url = "https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper" |
| | | const url = getEnvObj().VITE_APP_WEBVIEW_URL |
| | | // 1. 处理用户参数 |
| | | const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}' |
| | | // 2. 构建查询参数字符串 |