Commit 513b4187 by panjiangyi

update type def

parent 172f027c
......@@ -235,7 +235,7 @@ export default class Message extends Mixins(Filters) {
return true;
}
const senderEid = Number(this.messageBody.eid);
const senderEid = this.messageBody.eid;
if (this.messageBody) {
const msg = this.messageBody;
......
......@@ -152,8 +152,7 @@ export default {
[ChatStore.MUTATION_SAVE_MYSELF_ID](state) {
Chat.getToken().then((token) => {
const eid = decode(token);
console.log("fuck", eid);
state[ChatStore.STATE_CHAT_MY_ID] = eid.user_id;
state[ChatStore.STATE_CHAT_MY_ID] = String(eid.user_id);
state[ChatStore.STATE_CHAT_MY_UID] = eid.sub;
});
},
......@@ -265,7 +264,7 @@ export default {
if (chatId == null) return;
if (payload.chat_id !== chatId) return;
const arr = state[ChatStore.STATE_CURRENT_CHAT_INPUTING];
const eid = Number(payload.eid);
const eid = payload.eid;
if (eid === state[ChatStore.STATE_CHAT_MY_ID]) return;
if (arr.includes(eid)) {
window.clearTimeout(setTimeoutId[eid]);
......
......@@ -47,7 +47,7 @@ export namespace ChatStore {
export type STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID = string | null
export const STATE_CHAT_MY_ID = "聊天窗口显示在右边那个人的id";
export type STATE_CHAT_MY_ID = number | null
export type STATE_CHAT_MY_ID = string | null
export const STATE_CHAT_MY_UID = "聊天窗口显示在右边那个人的uid";
export type STATE_CHAT_MY_UID = string | null
......@@ -55,7 +55,7 @@ export namespace ChatStore {
export type STATE_CHAT_SOURCE = StateChatSourceDirection
export const STATE_CURRENT_CHAT_INPUTING = "当前会话正在输入的人";
export type STATE_CURRENT_CHAT_INPUTING = number[]
export type STATE_CURRENT_CHAT_INPUTING = string[]
export const STATE_CURRENT_CHAT_INITING = "当前会是否正在初始化";
export type STATE_CURRENT_CHAT_INITING = boolean
......
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