This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<link rel="stylesheet" href="/plugins/addon/theme_configurator/template/admin/theme.css" />
|
||||
|
||||
<div id="theme-config-app" class="template" v-cloak>
|
||||
<com-config>
|
||||
<t-card class="theme-card" title="SEO 设置" bordered>
|
||||
<t-card class="theme-card" title="SEO 设置" bordered>
|
||||
<div class="form-grid">
|
||||
<div class="form-item">
|
||||
<label>站点标题</label>
|
||||
@@ -283,16 +282,22 @@
|
||||
</div>
|
||||
</t-card>
|
||||
|
||||
<div class="action-bar">
|
||||
<t-button variant="outline" @click="loadConfig" :loading="loading">重新加载</t-button>
|
||||
<t-button theme="primary" class="ml-10" @click="saveConfig" :loading="saving">保存全部配置</t-button>
|
||||
</div>
|
||||
</com-config>
|
||||
<div class="action-bar">
|
||||
<t-button variant="outline" @click="loadConfig" :loading="loading">重新加载</t-button>
|
||||
<t-button theme="primary" class="ml-10" @click="saveConfig" :loading="saving">保存全部配置</t-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/plugins/addon/theme_configurator/template/admin/lang/index.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`;
|
||||
@@ -401,7 +406,7 @@
|
||||
},
|
||||
loadConfig() {
|
||||
this.loading = true;
|
||||
axios
|
||||
http
|
||||
.get(base, {
|
||||
headers: {
|
||||
Authorization: "Bearer " + localStorage.getItem("backJwt"),
|
||||
@@ -515,7 +520,7 @@
|
||||
...this.fullConfig,
|
||||
side_floating_window: this.fullConfig.side || [],
|
||||
};
|
||||
axios
|
||||
http
|
||||
.post(base, payload, {
|
||||
headers: {
|
||||
Authorization: "Bearer " + localStorage.getItem("backJwt"),
|
||||
|
||||
Reference in New Issue
Block a user