Commit 687ecb51 authored by 任国军's avatar 任国军

fix session

parent ec7f4d10
Pipeline #25684 passed with stage
in 4 seconds
......@@ -567,7 +567,10 @@ class UserService extends Service {
session_key: '',
phone,
};
await ctx.app.memcache.set(key, value, 7 * 24 * 3600);
const session = await ctx.app.memcache.get(key);
if (ctx.isEmpty(session)) {
await ctx.app.memcache.set(key, value, 7 * 24 * 3600);
}
let authToken = await ctx.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 });
......
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