修改插件UI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-21 12:42:18 +08:00
parent 8622f2b7b2
commit 5834ab9a74
10 changed files with 403 additions and 70 deletions

View File

@@ -105,21 +105,33 @@ $(function () {
$(".login-in").attr("style", "display:none");
$(".no-login").attr("style", "display:block");
}
};
// 获取通用配置信息
const getCommentInfo = () => {
$.ajax({
url: "/console/v1/common",
method: "get",
headers: {
Authorization: "Bearer" + " " + localStorage.jwt,
},
success: function (res) {
sessionStorage.commentData = JSON.stringify(res.data);
setCommData();
},
});
};
};
// 获取通用配置信息
const getCommentInfo = () => {
const handleSuccess = function (res) {
sessionStorage.commentData = JSON.stringify(res.data);
setCommData();
};
$.ajax({
url: "/console/v1/theme/config",
method: "get",
headers: {
Authorization: "Bearer" + " " + localStorage.jwt,
},
success: handleSuccess,
error: function () {
// 若插件接口不存在或报错,回落到原有 /console/v1/common
$.ajax({
url: "/console/v1/common",
method: "get",
headers: {
Authorization: "Bearer" + " " + localStorage.jwt,
},
success: handleSuccess,
});
},
});
};
// 设置通用信息函数
const setCommData = () => {
const commentObj = JSON.parse(sessionStorage.commentData);