|
@@ -5,11 +5,11 @@ class YunjiuyeController extends Controller {
|
|
|
super(ctx);
|
|
|
this.service = this.ctx.service.yunjiuye;
|
|
|
}
|
|
|
-
|
|
|
+ // http://127.0.0.1:7001/api/train/y/login?code=中心&org=0
|
|
|
async login() {
|
|
|
- const body = this.ctx.request.body;
|
|
|
- const { code, org } = body;
|
|
|
- const res = await this.service.checkUserIsConnect(body);
|
|
|
+ const query = this.ctx.query;
|
|
|
+ const { code, org } = query;
|
|
|
+ const res = await this.service.checkUserIsConnect(query);
|
|
|
const { toBindPage, toDealTokenPage } = this.app.config.yunjiuye;
|
|
|
// 没关联,转到登录页面
|
|
|
if (!res) {
|
|
@@ -19,7 +19,6 @@ class YunjiuyeController extends Controller {
|
|
|
const token = await this.service.userToken(res);
|
|
|
this.ctx.redirect(`${toDealTokenPage}?token=${token}`);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
async userBind() {
|