axios修复
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-21 13:30:41 +08:00
parent f6c898c831
commit e0f872bf3d
2 changed files with 6 additions and 9 deletions

View File

@@ -289,15 +289,9 @@
</div>
<script src="/plugins/addon/theme_configurator/template/admin/lang/index.js"></script>
<script src="/plugins/addon/theme_configurator/template/admin/js/axios.min.js"></script>
<script>
(function () {
// 兼容全局 axios / Axios
const http = window.axios || window.Axios;
if (!http) {
console.error("[ThemeConfigurator] axios / Axios not found, theme config page cannot initialize.");
return;
}
const host = location.origin;
const adminPath = location.pathname.split("/")[1];
const base = `${host}/${adminPath}/v1/theme/config`;
@@ -406,7 +400,7 @@
},
loadConfig() {
this.loading = true;
http
axios
.get(base, {
headers: {
Authorization: "Bearer " + localStorage.getItem("backJwt"),
@@ -520,7 +514,7 @@
...this.fullConfig,
side_floating_window: this.fullConfig.side || [],
};
http
axios
.post(base, payload, {
headers: {
Authorization: "Bearer " + localStorage.getItem("backJwt"),

File diff suppressed because one or more lines are too long