15 lines
318 B
JavaScript
15 lines
318 B
JavaScript
/**
|
|
* 添加多级路径
|
|
*
|
|
* @param {*} url
|
|
*/
|
|
export const addContentPath = (url) => {
|
|
const ecologyContentPath = window.ecologyContentPath;
|
|
if (url && ecologyContentPath) {
|
|
if (url.startsWith('/') && !url.startsWith(ecologyContentPath)) {
|
|
url = ecologyContentPath + url;
|
|
}
|
|
}
|
|
return url;
|
|
};
|