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
172f027c
authored
Jul 15, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
当前会话的人的id
parent
0a7084f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
components/message.vue
store/index.ts
store/model.ts
components/message.vue
View file @
172f027c
...
@@ -235,27 +235,29 @@ export default class Message extends Mixins(Filters) {
...
@@ -235,27 +235,29 @@ export default class Message extends Mixins(Filters) {
return
true
;
return
true
;
}
}
const
senderEid
=
Number
(
this
.
messageBody
.
eid
);
if
(
this
.
messageBody
)
{
if
(
this
.
messageBody
)
{
const
msg
=
this
.
messageBody
;
const
msg
=
this
.
messageBody
;
if
(
this
.
chatSource
)
{
if
(
this
.
chatSource
)
{
const
source
=
msg
.
msg
.
source
;
const
source
=
msg
.
msg
.
source
;
if
(
source
)
{
if
(
source
)
{
return
(
return
(
source
===
this
.
chatSource
&&
this
.
messageBody
.
e
id
===
this
.
chatMyId
source
===
this
.
chatSource
&&
senderE
id
===
this
.
chatMyId
);
);
}
}
if
(
this
.
org
&&
this
.
messageBody
.
oid
)
{
if
(
this
.
org
&&
this
.
messageBody
.
oid
)
{
return
(
return
(
this
.
messageBody
.
oid
===
this
.
org
&&
this
.
messageBody
.
oid
===
this
.
org
&&
this
.
messageBody
.
e
id
===
this
.
chatMyId
senderE
id
===
this
.
chatMyId
);
);
}
}
return
false
;
return
false
;
}
}
return
this
.
messageBody
.
e
id
===
this
.
chatMyId
;
return
senderE
id
===
this
.
chatMyId
;
}
}
return
false
;
return
false
;
...
...
store/index.ts
View file @
172f027c
...
@@ -152,7 +152,8 @@ export default {
...
@@ -152,7 +152,8 @@ export default {
[
ChatStore
.
MUTATION_SAVE_MYSELF_ID
](
state
)
{
[
ChatStore
.
MUTATION_SAVE_MYSELF_ID
](
state
)
{
Chat
.
getToken
().
then
((
token
)
=>
{
Chat
.
getToken
().
then
((
token
)
=>
{
const
eid
=
decode
(
token
);
const
eid
=
decode
(
token
);
state
[
ChatStore
.
STATE_CHAT_MY_ID
]
=
eid
.
eid
||
eid
.
sub
;
console
.
log
(
"fuck"
,
eid
);
state
[
ChatStore
.
STATE_CHAT_MY_ID
]
=
eid
.
user_id
;
state
[
ChatStore
.
STATE_CHAT_MY_UID
]
=
eid
.
sub
;
state
[
ChatStore
.
STATE_CHAT_MY_UID
]
=
eid
.
sub
;
});
});
},
},
...
@@ -264,7 +265,7 @@ export default {
...
@@ -264,7 +265,7 @@ export default {
if
(
chatId
==
null
)
return
;
if
(
chatId
==
null
)
return
;
if
(
payload
.
chat_id
!==
chatId
)
return
;
if
(
payload
.
chat_id
!==
chatId
)
return
;
const
arr
=
state
[
ChatStore
.
STATE_CURRENT_CHAT_INPUTING
];
const
arr
=
state
[
ChatStore
.
STATE_CURRENT_CHAT_INPUTING
];
const
eid
=
payload
.
eid
;
const
eid
=
Number
(
payload
.
eid
)
;
if
(
eid
===
state
[
ChatStore
.
STATE_CHAT_MY_ID
])
return
;
if
(
eid
===
state
[
ChatStore
.
STATE_CHAT_MY_ID
])
return
;
if
(
arr
.
includes
(
eid
))
{
if
(
arr
.
includes
(
eid
))
{
window
.
clearTimeout
(
setTimeoutId
[
eid
]);
window
.
clearTimeout
(
setTimeoutId
[
eid
]);
...
...
store/model.ts
View file @
172f027c
...
@@ -47,7 +47,7 @@ export namespace ChatStore {
...
@@ -47,7 +47,7 @@ export namespace ChatStore {
export
type
STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID
=
string
|
null
export
type
STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID
=
string
|
null
export
const
STATE_CHAT_MY_ID
=
"聊天窗口显示在右边那个人的id"
;
export
const
STATE_CHAT_MY_ID
=
"聊天窗口显示在右边那个人的id"
;
export
type
STATE_CHAT_MY_ID
=
string
|
null
export
type
STATE_CHAT_MY_ID
=
number
|
null
export
const
STATE_CHAT_MY_UID
=
"聊天窗口显示在右边那个人的uid"
;
export
const
STATE_CHAT_MY_UID
=
"聊天窗口显示在右边那个人的uid"
;
export
type
STATE_CHAT_MY_UID
=
string
|
null
export
type
STATE_CHAT_MY_UID
=
string
|
null
...
@@ -55,7 +55,7 @@ export namespace ChatStore {
...
@@ -55,7 +55,7 @@ export namespace ChatStore {
export
type
STATE_CHAT_SOURCE
=
StateChatSourceDirection
export
type
STATE_CHAT_SOURCE
=
StateChatSourceDirection
export
const
STATE_CURRENT_CHAT_INPUTING
=
"当前会话正在输入的人"
;
export
const
STATE_CURRENT_CHAT_INPUTING
=
"当前会话正在输入的人"
;
export
type
STATE_CURRENT_CHAT_INPUTING
=
string
[]
export
type
STATE_CURRENT_CHAT_INPUTING
=
number
[]
export
const
STATE_CURRENT_CHAT_INITING
=
"当前会是否正在初始化"
;
export
const
STATE_CURRENT_CHAT_INITING
=
"当前会是否正在初始化"
;
export
type
STATE_CURRENT_CHAT_INITING
=
boolean
export
type
STATE_CURRENT_CHAT_INITING
=
boolean
...
...
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