mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
fix: fix login bug
This commit is contained in:
parent
6ed74e8ae1
commit
b17f008bc0
@ -54,7 +54,7 @@ class Login extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.QSSO.attach('qsso-login','/user/login_by_token')
|
||||
window.QSSO.attach('qsso-login','/api/user/login_by_token')
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,11 +20,11 @@ class baseController {
|
||||
async init(ctx) {
|
||||
this.$user = null;
|
||||
let ignoreRouter = [
|
||||
'/user/login_by_token',
|
||||
'/user/login',
|
||||
'/user/reg',
|
||||
'/user/status',
|
||||
'/user/logout'
|
||||
'/api/user/login_by_token',
|
||||
'/api/user/login',
|
||||
'/api/user/reg',
|
||||
'/api/user/status',
|
||||
'/api/user/logout'
|
||||
];
|
||||
if (ignoreRouter.indexOf(ctx.path) > -1) {
|
||||
this.$auth = true;
|
||||
|
@ -66,7 +66,7 @@ var baseController = function () {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
this.$user = null;
|
||||
ignoreRouter = ['/user/login_by_token', '/user/login', '/user/reg', '/user/status', '/user/logout'];
|
||||
ignoreRouter = ['/api/user/login_by_token', '/api/user/login', '/api/user/reg', '/api/user/status', '/api/user/logout'];
|
||||
|
||||
if (!(ignoreRouter.indexOf(ctx.path) > -1)) {
|
||||
_context.next = 6;
|
||||
|
Loading…
Reference in New Issue
Block a user