Commit 47f04293 by 杨铁龙

disabledDbIndex

parent b779691b
Showing with 8 additions and 4 deletions
......@@ -82,6 +82,8 @@ export interface ChatOption {
message?: ChatMessageController;
avatar?: string;
disabledDbIndex?:boolean;
}
export interface ChatMessageController {
......
......@@ -58,10 +58,12 @@ class Chat {
option.message && (this.messageController = option.message);
option.avatar !== undefined && (this.defaultAvatar = option.avatar);
await this.setupIndexDb(option.orgId()).catch(err => {
// 必须catch error不然小程序不会向后运行
console.error("setupIndexDb Error")
});
if(!option.disabledDbIndex){
await this.setupIndexDb(option.orgId()).catch(err => {
// 必须catch error不然小程序不会向后运行
console.error("setupIndexDb Error")
});
}
this.token = async () => option.sdk().global.jwtToken;
tokenManager.save(this.token);
......
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