feat(mobile): redesign profile page with identity card and deduped entries
This commit is contained in:
@@ -5,6 +5,8 @@ const uni = typeof uniPlugin === 'function' ? uniPlugin : uniPlugin.default;
|
||||
const devPort = Number(process.env.PORT) || 5175;
|
||||
const devHost = process.env.HOST || '0.0.0.0';
|
||||
const proxyTarget = process.env.VITE_PROXY_TARGET || 'https://wygj-api.localhost';
|
||||
// 代理到线上等已带 /dev-api 前缀的网关时,设 VITE_PROXY_KEEP_PREFIX=1 保留前缀
|
||||
const keepProxyPrefix = process.env.VITE_PROXY_KEEP_PREFIX === '1';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
@@ -17,7 +19,7 @@ export default defineConfig({
|
||||
target: proxyTarget,
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
rewrite: (path) => path.replace(/^\/dev-api/, '')
|
||||
rewrite: (path) => (keepProxyPrefix ? path : path.replace(/^\/dev-api/, ''))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user