mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-11 04:22:54 +00:00
优化
This commit is contained in:
parent
d2f4c6442e
commit
e43576ac01
@ -26,12 +26,8 @@ export function getProxyTarget(proxy: any) {
|
||||
const value = match[1];
|
||||
|
||||
try {
|
||||
if (config.type == "uniapp-x") {
|
||||
return proxy[value].target;
|
||||
} else {
|
||||
const { target, rewrite } = proxy[`/${value}/`];
|
||||
return target + rewrite(`/${value}`);
|
||||
}
|
||||
const { target, rewrite } = proxy[`/${value}/`];
|
||||
return target + rewrite(`/${value}`);
|
||||
} catch (err) {
|
||||
error(`[cool-proxy] Error:${value} → ` + getPath());
|
||||
return "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user