Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9edeeeb6
authored
Jul 26, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化打开会话逻辑
parent
f24ba7b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
components/chat-list.vue
store/index.ts
components/chat-list.vue
View file @
9edeeeb6
...
@@ -86,7 +86,6 @@
...
@@ -86,7 +86,6 @@
import
{
Component
,
Prop
,
Ref
,
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Prop
,
Ref
,
Vue
}
from
"vue-property-decorator"
;
import
buttonThrottle
from
"../utils/button-throttle"
;
import
buttonThrottle
from
"../utils/button-throttle"
;
import
{
getChatModelInfo
}
from
"../utils/chat-info"
;
import
avatar
from
"@/customer-service/components/avatar.vue"
;
import
avatar
from
"@/customer-service/components/avatar.vue"
;
import
{
chatStore
,
ChatStore
}
from
"@/customer-service/store/model"
;
import
{
chatStore
,
ChatStore
}
from
"@/customer-service/store/model"
;
...
@@ -194,24 +193,10 @@ export default class ChatList extends Vue {
...
@@ -194,24 +193,10 @@ export default class ChatList extends Vue {
this
.
showChat
();
this
.
showChat
();
return
;
return
;
}
}
const
wantedChatRoom
=
this
.
chatRooms
.
find
(
await
this
.
saveChatId
(
data
.
chat_id
).
finally
(
this
.
raiseChatIdChanged
);
(
k
)
=>
k
.
chat_id
===
data
.
chat_id
);
if
(
wantedChatRoom
==
null
)
return
;
if
(
wantedChatRoom
.
business_data
==
null
)
{
return
;
}
const
info
=
await
getChatModelInfo
(
wantedChatRoom
.
business_data
.
model_name
,
wantedChatRoom
.
business_data
.
obj_id
,
wantedChatRoom
.
business_data
.
detail_name
);
await
this
.
saveChatId
(
wantedChatRoom
.
chat_id
).
finally
(
this
.
raiseChatIdChanged
);
this
.
showChat
();
this
.
showChat
();
this
.
close
();
this
.
close
();
this
.
saveChatTitle
(
info
.
uniplatId
);
}
}
private
raiseChatIdChanged
()
{
private
raiseChatIdChanged
()
{
...
...
store/index.ts
View file @
9edeeeb6
...
@@ -505,6 +505,7 @@ export default {
...
@@ -505,6 +505,7 @@ export default {
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MESSAGES
),
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MESSAGES
),
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MEMBERS
),
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MEMBERS
),
]);
]);
commit
(
ChatStore
.
MUTATION_SAVE_CHAT_TITLE
,
chatId
);
commit
(
ChatStore
.
MUTATION_INITING_CHAT_DONE
);
commit
(
ChatStore
.
MUTATION_INITING_CHAT_DONE
);
commit
(
ChatStore
.
MUTATION_SCROLL_TO_BOTTOM
);
commit
(
ChatStore
.
MUTATION_SCROLL_TO_BOTTOM
);
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment