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
9d186753
authored
Jan 12, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
f9d281a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
components/image-preview.vue
store/index.ts
components/image-preview.vue
View file @
9d186753
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
width=
"90%"
width=
"90%"
>
>
<div
class=
"d-flex flex-column"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"d-flex justify-content-center"
>
<div
class=
"d-flex justify-content-center
align-items-start
"
>
<img
v-if=
"file"
:src=
"file.url"
/>
<img
v-if=
"file"
:src=
"file.url"
/>
<i
class=
"el-icon-close"
@
click=
"close"
></i>
<i
class=
"el-icon-close"
@
click=
"close"
></i>
</div>
</div>
...
...
store/index.ts
View file @
9d186753
...
@@ -433,7 +433,7 @@ export default {
...
@@ -433,7 +433,7 @@ export default {
},
},
},
},
actions
:
{
actions
:
{
async
[
ChatStore
.
ACTION_GET_MY_CHAT_LIST
]({
commit
,
dispatch
})
{
async
[
ChatStore
.
ACTION_GET_MY_CHAT_LIST
]({
commit
,
dispatch
,
state
})
{
commit
(
ChatStore
.
MUTATION_SAVE_MYSELF_ID
);
commit
(
ChatStore
.
MUTATION_SAVE_MYSELF_ID
);
if
(
loadingChatList
)
{
if
(
loadingChatList
)
{
...
@@ -465,7 +465,8 @@ export default {
...
@@ -465,7 +465,8 @@ export default {
);
);
dispatch
(
dispatch
(
ChatStore
.
ACTION_REBUILD_UNREAD_MESSAGE_COUNT
ChatStore
.
ACTION_REBUILD_UNREAD_MESSAGE_COUNT
).
finally
(
resolve
);
);
resolve
(
items
);
})
})
.
catch
(
reject
);
.
catch
(
reject
);
});
});
...
@@ -473,11 +474,13 @@ export default {
...
@@ -473,11 +474,13 @@ export default {
return
await
execute
().
then
((
d
)
=>
clearAction
(
d
));
return
await
execute
().
then
((
d
)
=>
clearAction
(
d
));
},
},
async
[
ChatStore
.
ACTION_REBUILD_UNREAD_MESSAGE_COUNT
]({
state
})
{
[
ChatStore
.
ACTION_REBUILD_UNREAD_MESSAGE_COUNT
]({
state
})
{
let
items
=
await
dbController
.
getChatList
();
const
items
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
let
sum
=
0
;
if
(
items
)
{
items
.
forEach
((
i
)
=>
(
sum
+=
i
.
unread_msg_count
));
let
sum
=
0
;
state
[
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
]
=
sum
;
items
.
forEach
((
i
)
=>
(
sum
+=
i
.
unread_msg_count
));
state
[
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
]
=
sum
;
}
},
},
async
[
ChatStore
.
ACTION_UPDATE_CHAT_UNREAD_MESSAGE_COUNT
](
async
[
ChatStore
.
ACTION_UPDATE_CHAT_UNREAD_MESSAGE_COUNT
](
{
dispatch
,
state
},
{
dispatch
,
state
},
...
...
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