Ant-design-pro: 🧐[问题]接手的项目的初始登陆密码在哪里看

Created on 4 Dec 2019  ·  2Comments  ·  Source: ant-design/ant-design-pro

🧐 问题描述

💻 示例代码

🚑 其他信息

🕵🏻‍♀️ question

Most helpful comment

ant-design-pro 的话 看下面的代码

 'POST /api/login/account': (req: Request, res: Response) => {
    const { password, userName, type } = req.body;
    if (password === 'ant.design' && userName === 'admin') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'admin',
      });
      return;
    }
    if (password === 'ant.design' && userName === 'user') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'user',
      });
      return;
    }
    res.send({
      status: 'error',
      type,
      currentAuthority: 'guest',
    });
  },

All 2 comments

描述清楚 是你公司的项目 还是初始化的 ant-design-pro的项目

ant-design-pro 的话 看下面的代码

 'POST /api/login/account': (req: Request, res: Response) => {
    const { password, userName, type } = req.body;
    if (password === 'ant.design' && userName === 'admin') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'admin',
      });
      return;
    }
    if (password === 'ant.design' && userName === 'user') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'user',
      });
      return;
    }
    res.send({
      status: 'error',
      type,
      currentAuthority: 'guest',
    });
  },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

yaoleiroyal picture yaoleiroyal  ·  3Comments

happier2 picture happier2  ·  3Comments

952425340 picture 952425340  ·  3Comments

zhuanglong picture zhuanglong  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments