使用koa-router管理路由的時候,想在收到表單post請求后redirect到別的路由,但是使用this.redirect和router.redirect都無法跳轉。請問正確的寫法是什么無效的代碼:router.post('/login', bodyParser, function* (next) { // ...
this.redirect('/index');
});
koa-router 接受post請求如何讓頁面跳轉
臨摹微笑
2018-09-04 17:10:29