Commit 3d4dc045 by panjiangyi

修改sdk注入

parent 284f5a4a
Showing with 3 additions and 8 deletions
......@@ -42,17 +42,12 @@ export interface ChatOption {
* 长链接chat sdk地址
*/
webSocketUri: string
sdk:UniplatSdk
sdk: () => UniplatSdk
orgId: () => string | number
logger?: ChatServiceLogger
}
export interface ChatServiceLogger {
......
......@@ -5,7 +5,7 @@ import { EmojiService } from "../service/emoji"
import tokenManager from "./token"
import type { UniplatSdk } from "uniplat-sdk"
class Chat {
private _sdk: UniplatSdk
private _sdk: () => UniplatSdk
private _orgId: () => string | number = () => "0"
private token!: TokenStringGetter
......@@ -40,7 +40,7 @@ class Chat {
}
public getSdk = () => {
return this._sdk
return this._sdk()
}
public getOrgId = () => {
......
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 sign in to comment