Commit a2e913ea authored by 任国军's avatar 任国军

change phone login

parent 189dc29c
Pipeline #26312 passed with stage
in 21 seconds
......@@ -99,7 +99,10 @@ class UserService extends Service {
phone,
};
await ctx.app.memcache.set(key, value, 7 * 24 * 3600);
const authToken = await this.service.jwt.apply({ user_uuid: userInfo.uuid, openid: userInfo.openid });
let authToken = await app.memcache.get('course_auth_token_' + userInfo.uuid);
if (ctx.isEmpty(authToken)) {
authToken = await this.service.jwt.apply({ user_uuid: userInfo.uuid, openid: userInfo.openid });
}
await app.memcache.set('course_auth_token_' + userInfo.uuid, authToken, 30 * 24 * 3600);
const ret = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment