feat: 文件分享update

This commit is contained in:
landaiqing
2024-07-11 14:56:57 +08:00
parent 32dff4adbb
commit b7a16c3c59
13 changed files with 972 additions and 456 deletions

View File

@@ -0,0 +1,11 @@
/** @format */
import { lazy } from "react";
const ShareAdd = lazy(
() =>
new Promise((resolve: any) => {
resolve(import("@/components/Main/Share/components/ShareAdd/ShareAdd.tsx"));
}),
);
export default ShareAdd;

View File

@@ -46,6 +46,7 @@ import qiniuBucket from "@/router/modules/main/bucket/createBuckets/qiniu.ts";
import ucloudBucket from "@/router/modules/main/bucket/createBuckets/ucloud.ts";
import upBucket from "@/router/modules/main/bucket/createBuckets/up.ts";
import wangyiBucket from "@/router/modules/main/bucket/createBuckets/wangyi.ts";
import ShareAdd from "@/router/modules/main/share/modules/shareAdd.tsx";
const routes: RouteObject[] = [
{
@@ -163,6 +164,10 @@ const routes: RouteObject[] = [
path: "/main/share/detail/:id",
Component: ShareDetail,
},
{
path: "/main/share/add",
Component: ShareAdd,
},
{
path: "/main/setting",
Component: MainSetting,

View File

@@ -32,14 +32,14 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
return <Navigate to="/404" />;
}
// if (!isLogin) {
// message
// .open({
// content: "请先登录!",
// type: "warning",
// })
// .then();
// return <Navigate to="/login" />;
// }
if (!isLogin) {
message
.open({
content: "请先登录!",
type: "warning",
})
.then();
return <Navigate to="/login" />;
}
return props.children;
}