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