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 = () => { const bucketList = () => {
return ( return (
<ProCard <ProCard
title={"MinIO存储桶列表"} title={"Qiniu存储桶列表"}
headerBordered headerBordered
extra={ extra={
<> <>

View File

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

View File

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

View File

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