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
383d54c9
authored
Aug 02, 2021
by
吴云建
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加客户端发起会话
parent
be0ef3af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
store/index.ts
store/model.ts
store/index.ts
View file @
383d54c9
...
@@ -433,6 +433,20 @@ export default {
...
@@ -433,6 +433,20 @@ export default {
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
,
true
);
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
,
true
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
chatId
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
chatId
);
},
},
async
[
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
](
{
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
>
[
0
]
)
{
const
{
id
,
ImChatId
,
uniplat_version
}
=
await
sdk
()
.
model
(
params
.
modelName
)
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
createChat
();
const
uniplatId
=
id
.
value
;
const
chatId
=
Number
(
ImChatId
.
value
);
const
v
=
uniplat_version
.
value
;
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
,
true
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
chatId
);
},
// async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE](
// async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE](
// { commit, dispatch },
// { commit, dispatch },
// option: {
// option: {
...
...
store/model.ts
View file @
383d54c9
...
@@ -239,6 +239,13 @@ export namespace ChatStore {
...
@@ -239,6 +239,13 @@ export namespace ChatStore {
uids
:
string
[];
uids
:
string
[];
})
=>
Promise
<
void
>
})
=>
Promise
<
void
>
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
"顾客向客服发起新会话"
;
export
type
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
(
params
:
{
modelName
:
string
;
selectedListId
:
string
;
uids
:
string
[];
})
=>
Promise
<
void
>
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
"startNewConversationByCustomerSide"
;
"startNewConversationByCustomerSide"
;
export
type
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
(
option
:
{
export
type
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
(
option
:
{
...
...
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