Constructor
new SessionManager(ctx)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
ctx |
object | egg's ctx |
Members
ctx
- Source:
egg 的 ctx 对象,通过它来调用相关的其他资源
Methods
(async) destroy()
- Source:
销毁会话
(async) getSession() → {undefined|string|number}
- Source:
获取会话 id
Returns:
- Type
- undefined | string | number
(async) setSession(value)
- Source:
设置会话 id
Parameters:
Name | Type | Description |
---|---|---|
value |
number | string | 会话 id |