Feat: AuthRouter & CleanNeteaseCache API

前端增加限制访问的路由,后端调整鉴权接口,增加清除网易云缓存接口
This commit is contained in:
2022-05-06 23:10:16 +08:00
parent 3bb999aed5
commit 2f09fcabe4
15 changed files with 427 additions and 60 deletions
+27
View File
@@ -0,0 +1,27 @@
// React
import React from "react";
// UI
import Button from "@/components/Base/Button";
import ArticleHead from "@/components/Layout/ArticleHead";
import AddACGM from "@/components/Admin/AddACGM";
import RemoveMusicCache from "@/components/Admin/RemoveMusicCache";
// Components
function Admin() {
return (
<main>
<ArticleHead title="轻管理" desc="简单的维护功能" />
<form>
<AddACGM />
<RemoveMusicCache />
</form>
</main>
)
}
export default Admin;
+10 -5
View File
@@ -31,12 +31,17 @@ function Login() {
onSuccess: (data) => {
console.log(data);
setGlobalData({
type: "profile",
value: data.profile
});
if (data.data) {
setGlobalData({
type: "profile",
value: data.data.profile
});
navigate("/")
navigate("/");
}
else {
alert("错误的用户名或密码");
}
}
}
);