更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-9
View File
@@ -3,20 +3,15 @@ import uni from '@dcloudio/vite-plugin-uni'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
// 新版 Vite / uni 编译器会把配置文件预打包成 CJS 加载,此时 import.meta.url 为 undefined,
// fileURLToPath(undefined) 会抛 "The path argument must be of type string. Received undefined"。
// 这里做兜底:拿不到模块路径时退回 __dirname / 当前工作目录(构建命令均在 uniapp 目录执行)。
function resolveRootDir() {
try {
const url = typeof import.meta !== 'undefined' ? import.meta.url : ''
if (url) return path.dirname(fileURLToPath(url))
} catch (e) {
/* import.meta.url 不可用时继续兜底 */
}
try {
if (typeof __dirname !== 'undefined') return __dirname
} catch (e) {
/* 忽略 */
}
return process.cwd()
}
@@ -36,11 +31,8 @@ export default defineConfig({
port: 4403,
strictPort: true,
proxy: {
// H5 开发:api/config.js 默认 baseURL 为 /proxy-api,转发到 Go 后端
'/proxy-api': {
// 本地联调统一认证(/app/home 等新接口生产未部署时用本地)
target: 'http://127.0.0.1:9000',
// target: 'https://api.yunzer.cn',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/proxy-api/, ''),
},
@@ -49,7 +41,6 @@ export default defineConfig({
css: {
preprocessorOptions: {
scss: {
// 关闭废弃 API 警告
silenceDeprecations: ['legacy-js-api', 'color-functions', 'import'],
},
},