Ant Design Pro V4 默认进入登录页

修改如下:

step1 :修改src\utils\authority.ts中的配置:

export function getAuthority(str?: string): string | string[] {
    const authorityString =
        typeof str === 'undefined' && localStorage ? localStorage.getItem('antd-pro-authority') : str;
    // authorityString could be admin, "admin", ["admin"]
    let authority;
    try {
        if (authorityString) {
            authority = JSON.parse(authorityString);
        }
    } catch (e) {
        authority = authorityString;
    }
    if (typeof authority === 'string') {
        return [authority];
    }
    // 注释以下代码即可
    // preview.pro.ant.design only do not use in your production.
    // preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
    // if (!authority && ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
    //     return ['admin'];
    // }
    return authority;

step2 :修改config\config.ts中的配置: 

 routes: [
        {
            path: '/',
            component: '../layouts/BlankLayout',
            routes: [
                {
                    path: '/',
                    component: '../layouts/UserLayout',
                    routes: [
                        // 新增重定向
                        {
                            path: '/',
                            redirect: '/user/login',
                        },
                        {
                            path: '/user/login',
                            name: 'login',
                            component: './User/login',
                        },
                        {
                            path: '/user',
                            redirect: '/user/login',
                        },
                        {
                            name: 'register-result',
                            icon: 'smile',
                            path: '/user/register-result',
                            component: './user/register-result',
                        },
                        {
                            name: 'register',
                            icon: 'smile',
                            path: '/user/register',
                            component: './user/register',
                        },
                        {
                            component: '404',
                        },
                    ],
                },

              ...  ...

            ],
        },
    ],

 

 

已标记关键词 清除标记
<p> <span style="font-size:18px;color:#E53333;"><strong><span style="color:#000000;">课程演示环境:Ubuntu</span><br /> <br /> <span style="color:#000000;">需要学习Windows系统YOLOv4的同学请前往《Windows版YOLOv4目标检测实战:训练自己的数据集》,课程链接https://edu.csdn.net/course/detail/28748</span><br /> <br /> YOLOv4</strong></span><span style="font-size:18px;color:#E53333;"><strong>来了!速度和精度双提升!</strong></span> </p> <p> <span style="font-size:16px;"> </span> </p> <p> <span style="font-size:16px;">与</span><span style="font-size:16px;"> YOLOv3 </span><span style="font-size:16px;">相比,新版本的</span><span style="font-size:16px;"> AP(精度) </span><span style="font-size:16px;">和</span><span style="font-size:16px;"> FPS </span><span style="font-size:16px;">(每秒帧率)分别提高了</span><span style="font-size:16px;"> 10% </span><span style="font-size:16px;">和</span><span style="font-size:16px;"> 12%</span><span style="font-size:16px;">。</span><span></span> </p> <p> <span style="font-size:16px;"> </span> </p> <p> <span style="font-size:16px;">YOLO系列是基于深度学习的端到端实时目标检测方法。本课程将手把手地教大家使用</span><span style="font-size:16px;">labelImg</span><span style="font-size:16px;">标注和使用</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">训练自己的数据集。课程实战分为两个项目:单目标检测(足球目标检测)和多目标检测(足球和梅西同时检测)。</span><span></span> </p> <p> <span style="font-size:16px;"> </span> </p> <p> <span style="font-size:16px;">本课程的</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">使用</span><span style="font-size:16px;">AlexAB/darknet</span><span style="font-size:16px;">,在</span><span style="font-size:16px;">Ubuntu</span><span style="font-size:16px;">系统上做项目演示。包括:安装</span><span style="font-size:16px;">YOLOv4、</span><span style="font-size:16px;">标注自己的数据集、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计</span><span style="font-size:16px;">(mAP</span><span style="font-size:16px;">计算和画出</span><span style="font-size:16px;">PR</span><span style="font-size:16px;">曲线</span><span style="font-size:16px;">)</span><span style="font-size:16px;">和先验框聚类分析。还将介绍改善</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标训练性能的技巧。</span><span></span> </p> <p> <span style="font-size:16px;"> </span> </p> <p> <span style="font-size:16px;">除本课程《</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标检测实战:训练自己的数据集》外,本人将推出有关</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标检测的系列课程。请持续关注该系列的其它视频课程,包括:</span><span></span> </p> <p> <span style="font-size:16px;">《</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标检测实战:人脸口罩佩戴识别》</span><br /> <span style="font-size:16px;">《</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标检测实战:中国交通标志识别》</span><br /> <span style="font-size:16px;">《</span><span style="font-size:16px;">YOLOv4</span><span style="font-size:16px;">目标检测:原理与源码解析》</span> </p> <p> <br /> </p> <p> <span style="font-size:16px;"><br /> </span> </p> <p> <span style="font-size:16px;"><img src="https://img-bss.csdn.net/202004260858382698.jpg" alt="" /><br /> </span> </p> <p> <span style="font-size:16px;"><br /> </span> </p> <p> <span style="font-size:16px;"><img src="https://img-bss.csdn.net/202004260858535136.jpg" alt="" /><br /> </span> </p> <p> <span style="font-size:16px;"><img src="https://img-bss.csdn.net/202004260859074920.jpg" alt="" /><br /> </span> </p> <p> <span></span> </p> <p> <span></span> </p>
相关推荐
<p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【为什么要学习这门课】</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">Linux</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">创始人<span>Linus Torvalds</span>有一句名言:<span>Talk is cheap. Show me the code. </span></span><span style="font-family:微软雅黑, sans-serif;color:#e03e2d;background-color:#ffffff;">冗谈不够,放码过来!</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">代码阅读是从基础到提高的必由之路。 </span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">YOLOv5</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">是最近推出的轻量且高性能的实时目标检测方法。<span>YOLOv5</span>使用<span>PyTorch</span>实现,含有很多业界前沿和常用的技巧,可以作为很好的代码阅读案例,让我们深入探究其实现原理,其中不少知识点的代码可以作为相关项目的借鉴。</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【课程内容与收获】</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">本课程将详细解析<span>YOLOv5</span>的实现原理和源码,对关键代码使用<span>PyCharm</span>的<span>debug</span>模式逐行分析解读。 本课程将提供注释后的<span>YOLOv5</span>的源码程序文件。</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;"> <img src="https://img-bss.csdnimg.cn/202012061533559839.jpg" alt="课程内容" /></span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【相关课程】</span> </p> <p style="margin-left:0cm;"> 本人推出了有关YOLOv5目标检测的系列课程。请持续关注该系列的其它视频课程,包括: </p> <p> 《YOLOv5(PyTorch)目标检测实战:训练自己的数据集》 </p> <p> Ubuntu系统 <strong><a href="https://edu.csdn.net/course/detail/30793"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/30793</span></a></strong> </p> <p> Windows系统 <strong><a href="https://edu.csdn.net/course/detail/30923"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/30923</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测:原理与源码解析》<strong><a href="https://edu.csdn.net/course/detail/31428"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/31428</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测实战:Flask Web部署》<strong><a href="https://edu.csdn.net/course/detail/31087"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/31087</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测实战:TensorRT加速部署》<strong><a href="https://edu.csdn.net/course/detail/32303"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/32303</span></a></strong> </p>
©️2020 CSDN 皮肤主题: 精致技术 设计师:CSDN官方博客 返回首页