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