Feat: AuthRouter & CleanNeteaseCache API
前端增加限制访问的路由,后端调整鉴权接口,增加清除网易云缓存接口
This commit is contained in:
@@ -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
@@ -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("错误的用户名或密码");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user