|
|
@@ -76,7 +76,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
async refresh(ctx) {
|
|
|
- const { refresh_token } = ctx.request.query;
|
|
|
+ const { refresh_token } = ctx.request.body;
|
|
|
if (!refresh_token) {
|
|
|
ctx.body = { code: -1, msg: '缺少 refresh_token', data: null };
|
|
|
return;
|
|
|
@@ -86,7 +86,7 @@ module.exports = app => {
|
|
|
ctx.body = { code: 0, msg: '', data: { access_token: token } };
|
|
|
} catch (error) {
|
|
|
this.log(error);
|
|
|
- ctx.body = { code: -1, msg: '登陆已过期,请重新登录', data: null };
|
|
|
+ ctx.body = { code: -1, msg: '登录已过期,请重新登录', data: null };
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -103,13 +103,14 @@ module.exports = app => {
|
|
|
ctx.body = {
|
|
|
code: 0, msg: '', data: {
|
|
|
userInfo: projectAccount,
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
} catch (error) {
|
|
|
this.log(error);
|
|
|
ctx.body = { code: -1, msg: '', data: null };
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return WeappController;
|