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
f79818b1
authored
Jul 19, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化显示消息发送者名字的逻辑
parent
a925c4a9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
25 deletions
chat-list.vue
components/message.vue
model/index.ts
store/index.ts
chat-list.vue
View file @
f79818b1
...
...
@@ -218,7 +218,7 @@ export default class ChatList extends Vue {
wantedChatRoom
.
business_data
.
model_name
,
wantedChatRoom
.
business_data
.
obj_id
);
this
.
saveChatId
({
await
this
.
saveChatId
({
chatId
:
wantedChatRoom
.
chat_id
,
v
:
info
.
uniplat_version
,
uniplatId
:
info
.
uniplatId
,
...
...
components/message.vue
View file @
f79818b1
...
...
@@ -135,7 +135,6 @@ import { Filters } from "../mixin/filter";
import
*
as
dto
from
"../model"
;
import
{
isAccessibleUrl
}
from
"../service/tools"
;
import
{
replaceText2Link
}
from
"../utils"
;
import
{
getUserInfo
}
from
"../utils/user-info"
;
import
chat
from
"./../xim"
;
import
{
...
...
@@ -269,9 +268,8 @@ export default class Message extends Mixins(Filters) {
this
.
getUserName
(
this
.
data
.
eid
);
}
private
async
getUserName
(
eid
:
string
)
{
const
data
=
await
getUserInfo
(
eid
);
this
.
senderName
=
data
.
name
;
private
getUserName
(
eid
:
string
)
{
this
.
senderName
=
this
.
chatMembers
.
find
(
member
=>
member
.
eid
===
eid
)?.
name
??
""
;
}
private
get
avatar
()
{
...
...
model/index.ts
View file @
f79818b1
...
...
@@ -27,7 +27,7 @@ export interface Chat {
unread_msg_count
:
number
;
}
export
type
TokenStringGetter
=
()
=>
Promise
<
string
>
export
type
TokenStringGetter
=
()
=>
Promise
<
string
>
;
export
interface
ChatOption
{
/**
...
...
@@ -50,7 +50,7 @@ export interface ChatServiceLogger {
export
type
ChatListRequestList
=
{
list
:
Chat
[];
total
:
number
;
}
}
;
export
interface
Message
{
at_id
:
string
;
...
...
@@ -74,7 +74,7 @@ export interface Message {
url
:
string
;
}
export
type
MessageRequestResult
=
readonly
Message
[]
export
type
MessageRequestResult
=
readonly
Message
[]
;
export
interface
CreateChatByServicemanRequestResult
{
id
:
number
;
...
...
@@ -118,32 +118,34 @@ export interface CreateChatByServicemanRequestResult {
export
type
ChatMemberExtraInfo
=
{
name
?:
string
;
phone
?:
string
;
}
}
;
export
interface
ChatMember
{
at_all
:
boolean
;
at_me
:
boolean
;
chat_id
:
number
;
create_time
:
number
;
dnd
:
number
;
id
:
number
;
org_id
:
string
;
uid
:
string
;
oid
:
string
;
eid
:
string
;
chat_id
:
number
;
type
:
number
;
join_msg_id
:
number
;
exit_msg_id
:
number
;
id
:
number
;
is_act
:
boolean
;
is_exited
:
boolean
;
is_remove
:
boolean
;
is_top
:
boolean
;
join_msg_i
d
:
number
;
dn
d
:
number
;
label
:
string
;
nickname
:
string
;
oid
:
string
;
org_id
:
string
;
type
:
number
;
uid
:
string
;
unread_msg_count
:
number
;
nickname
:
string
;
at_me
:
boolean
;
at_all
:
boolean
;
is_act
:
boolean
;
create_time
:
number
;
update_time
:
number
;
name
:
string
;
phone
:
string
;
}
export
type
ChatMembers
=
readonly
ChatMember
[]
export
type
ChatMembers
=
readonly
ChatMember
[]
;
export
interface
ServiceMan
{
id
:
number
;
...
...
@@ -165,7 +167,7 @@ export interface ServiceMan {
status
:
number
;
}
export
type
AllServiceMan
=
ServiceMan
[]
export
type
AllServiceMan
=
ServiceMan
[]
;
export
interface
OneWhoReadMessage
{
create_time
:
number
;
...
...
store/index.ts
View file @
f79818b1
...
...
@@ -365,7 +365,6 @@ export default {
state
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID
];
if
(
uniplatId
==
null
)
return
;
try
{
console
.
log
(
"fuck send"
,
params
);
const
data
=
await
model
()
.
action
(
"sendMsg"
)
.
updateInitialParams
({
...
...
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