diff --git a/plugins/addon/theme_configurator/template/admin/index.html b/plugins/addon/theme_configurator/template/admin/index.html index 59d30ae..d8f3696 100644 --- a/plugins/addon/theme_configurator/template/admin/index.html +++ b/plugins/addon/theme_configurator/template/admin/index.html @@ -843,9 +843,27 @@ if (!url) { return showMessage(this, "error", "上传失败:未获取到文件地址"); } - if (!/^https?:\/\//i.test(url) && url.charAt(0) !== "/") { - url = "/" + url; + + // 非绝对地址的情况,按智简魔方上传规则补全到 /upload/common/default/... 这类路径 + if (!/^https?:\/\//i.test(url)) { + // 已包含 /upload/ 的,仅补前导 / + if (url.indexOf("/upload/") === 0) { + // ok + } else if (url.indexOf("upload/") === 0) { + url = "/" + url; + } else if (url.indexOf("/common/") === 0) { + url = "/upload" + url; + } else if (url.indexOf("common/") === 0) { + url = "/upload/" + url; + } else if (url.charAt(0) !== "/") { + // 兜底:直接视为 /upload/ 下的相对路径 + url = "/upload/" + url; + } else { + // 已经是 /xxx 但不含 /upload/,同样前面补 /upload + url = "/upload" + url; + } } + this.setConfigByPath(path, url); } catch (e) { showMessage(this, "error", "上传处理异常:" + e.message); @@ -1100,4 +1118,3 @@ }); })(); - diff --git a/public/footer.html b/public/footer.html index b2c8e96..69db54d 100644 --- a/public/footer.html +++ b/public/footer.html @@ -88,26 +88,17 @@ {/if} -
+ {if ( isset($data.friendly_link) ) }