Commit ea4b527c by panjiangyi

补充类型

parent 24e75f0a
Showing with 3 additions and 5 deletions
import { RootStoreState } from "@/store/model"; import { RootStoreState } from "@/store/model";
import { Index } from "uniplat-sdk";
import { Module } from "vuex"; import { Module } from "vuex";
import { ChatMember } from "../model"; import { ChatMember } from "../model";
...@@ -21,10 +22,10 @@ const UniplatChatModelName = "UniplatChat"; ...@@ -21,10 +22,10 @@ const UniplatChatModelName = "UniplatChat";
const model = () => sdk().model(UniplatChatModelName); const model = () => sdk().model(UniplatChatModelName);
const orgId = Chat.getOrgId; const orgId = Chat.getOrgId;
const getMyinfo = (function () { const getMyinfo = (function () {
let data; let data: Index.getUserInfo;
return async () => { return async () => {
if (data != null) return data; if (data != null) return data;
data = sdk().getUserInfo(); data = await sdk().getUserInfo();
return data; return data;
}; };
})(); })();
...@@ -407,10 +408,7 @@ export default { ...@@ -407,10 +408,7 @@ export default {
{ state, commit, dispatch }, { state, commit, dispatch },
params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN>[0] params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN>[0]
) { ) {
const myId = (await getMyinfo()).id;
const { id } = await sdk().model(params.modelName).createChat({ const { id } = await sdk().model(params.modelName).createChat({
orgId: orgId(),
uid: myId,
detailId: +params.selectedListId detailId: +params.selectedListId
}); });
await new Promise(resolve => setTimeout(resolve, 500)); await new Promise(resolve => setTimeout(resolve, 500));
......
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