This commit is contained in:
@@ -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"),
|
||||
|
||||
3
plugins/addon/theme_configurator/template/admin/js/axios.min.js
vendored
Normal file
3
plugins/addon/theme_configurator/template/admin/js/axios.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user