fix: bug修复

This commit is contained in:
landaiqing
2024-07-22 22:44:09 +08:00
parent ac41e00105
commit 8e10d4a253
4 changed files with 9 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ const QiniuDrawer = observer(() => {
const bucketList = () => {
return (
<ProCard
title={"MinIO存储桶列表"}
title={"Qiniu存储桶列表"}
headerBordered
extra={
<>

View File

@@ -56,7 +56,7 @@ import {
import StorageIcon from "@/constant/stroage-icon.ts";
import { useNavigate } from "react-router-dom";
import Base64 from "base-64";
const File: FunctionComponent = observer(() => {
const File: FunctionComponent = () => {
const store = useStore("file");
const navigate = useNavigate();
const [files, setFiles] = useState<any>([]);
@@ -1046,5 +1046,5 @@ const File: FunctionComponent = observer(() => {
</Modal>
</>
);
});
};
export default observer(File);

View File

@@ -219,7 +219,7 @@ const QiniuSettings: React.FC = observer(() => {
};
async function getAllConfigs() {
getAllQiniuConfigs(1).then((res: any) => {
getAllQiniuConfigs(userId).then((res: any) => {
if (res && res.success && res.data) {
setConfig(res.data);
}

View File

@@ -12,13 +12,14 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
const condition: boolean =
(currentPath === "/login" && !isLogin) ||
currentPath === "/404" ||
(currentPath === "register" && !isLogin) ||
(currentPath === "forget" && !isLogin);
(currentPath === "/register" && !isLogin) ||
(currentPath === "/forget" && !isLogin) ||
(currentPath === "/" && !isLogin);
// 登录后访问login
const conditionWithLogin: boolean =
(currentPath === "/login" && isLogin) ||
(currentPath === "register" && isLogin) ||
(currentPath === "forget" && isLogin);
(currentPath === "/register" && isLogin) ||
(currentPath === "/forget" && isLogin);
const findPath: any = matchAuth(currentPath);
if (condition) {