Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
f4728f0a
Commit
f4728f0a
authored
Oct 18, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3dddb664
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
chatCardStore.ts
src/store/chatCardStore.ts
+1
-1
Chat.vue
src/views/Chat/Chat.vue
+6
-7
ChatContentMessage.vue
src/views/Chat/ChatContentMessage.vue
+0
-1
No files found.
src/store/chatCardStore.ts
View file @
f4728f0a
import
{
re
active
,
re
f
}
from
'vue'
import
{
ref
}
from
'vue'
export
const
chatCardTimeStamp
=
ref
(
0
)
export
const
chatCardTimeStamp
=
ref
(
0
)
src/views/Chat/Chat.vue
View file @
f4728f0a
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
/* eslint-disable */
/* eslint-disable */
import
NavBar
from
"@/components/NavBar/index.vue"
;
import
NavBar
from
"@/components/NavBar/index.vue"
;
import
{
defineComponent
,
on
BeforeUnmount
,
onMounted
,
reactive
,
ref
,
watch
,
defineAsyncComponent
,
computed
}
from
"vue"
;
import
{
defineComponent
,
on
Mounted
,
ref
,
watch
,
defineAsyncComponent
,
computed
}
from
"vue"
;
import
{
connectionState
}
from
"@/store/connectionStore"
;
import
{
connectionState
}
from
"@/store/connectionStore"
;
import
{
getFromId
}
from
"@/store/appCallerStore"
;
import
{
getFromId
}
from
"@/store/appCallerStore"
;
import
{
messageStore
}
from
"@/store/messagesStore"
;
import
{
messageStore
}
from
"@/store/messagesStore"
;
...
@@ -52,9 +52,9 @@ import { v4 as uuidv4 } from 'uuid'
...
@@ -52,9 +52,9 @@ import { v4 as uuidv4 } from 'uuid'
import
{
ChatMessageTypes
}
from
"@/types/chatMessageTypes"
;
import
{
ChatMessageTypes
}
from
"@/types/chatMessageTypes"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
queryFaqAnswer
,
queryFaqList
}
from
"@/service/FaqService"
;
import
{
queryFaqAnswer
,
queryFaqList
}
from
"@/service/FaqService"
;
import
{
getDisplayNames
,
get
DisplayNamesFromAddress
,
get
MsgFromAddress
}
from
"@/utils/displayName"
;
import
{
getDisplayNames
,
getMsgFromAddress
}
from
"@/utils/displayName"
;
import
{
MessageContent
}
from
"@/types/chat-message"
;
import
{
MessageContent
}
from
"@/types/chat-message"
;
import
{
CONST_END_CHAT
,
CONST_START_CHAT
,
CONST_WARNING
}
from
"@/config/chat"
;
import
{
CONST_END_CHAT
,
CONST_START_CHAT
}
from
"@/config/chat"
;
import
ChatOptionItemVue
from
"@/components/ChatOptions/ChatOptionItem.vue"
;
import
ChatOptionItemVue
from
"@/components/ChatOptions/ChatOptionItem.vue"
;
import
ShowCall
from
"@/components/showCall/index.vue"
import
ShowCall
from
"@/components/showCall/index.vue"
import
{
getUserMsg
}
from
"@/utils/userMsg"
;
import
{
getUserMsg
}
from
"@/utils/userMsg"
;
...
@@ -62,7 +62,6 @@ import { eRole } from "@/types/roleType";
...
@@ -62,7 +62,6 @@ import { eRole } from "@/types/roleType";
import
ChatDBService
from
"@/db/ChatDBService"
;
import
ChatDBService
from
"@/db/ChatDBService"
;
import
UserService
from
"@/service/UserService"
;
import
UserService
from
"@/service/UserService"
;
import
{
gotoChatWithStaff
}
from
"@/router/navigate"
;
import
{
gotoChatWithStaff
}
from
"@/router/navigate"
;
import
{
Toast
}
from
"vant"
;
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -251,9 +250,8 @@ export default defineComponent({
...
@@ -251,9 +250,8 @@ export default defineComponent({
}
}
watch
(
chatCardTimeStamp
,
async
()
=>
{
watch
(
chatCardTimeStamp
,
async
()
=>
{
const
messageList
=
await
ChatMessageDB
.
getInstance
().
getMessage
(
getFromId
()
as
string
,
target
);
const
messageList
=
await
ChatMessageDB
.
getInstance
().
getMessage
(
getFromId
()
as
string
,
route
.
query
.
targetId
as
string
);
messageStore
.
messages
.
splice
(
0
,
messageStore
.
messages
.
length
);
messageStore
.
messages
.
splice
(
0
,
messageStore
.
messages
.
length
);
messageStore
.
messages
.
push
(...
messageList
);
messageStore
.
messages
.
push
(...
messageList
);
})
})
...
@@ -278,8 +276,9 @@ export default defineComponent({
...
@@ -278,8 +276,9 @@ export default defineComponent({
const
initMessageList
=
async
()
=>
{
const
initMessageList
=
async
()
=>
{
messageStore
.
messages
.
splice
(
0
,
messageStore
.
messages
.
length
);
messageStore
.
messages
.
splice
(
0
,
messageStore
.
messages
.
length
);
const
messageList
=
await
ChatMessageDB
.
getInstance
().
getMessage
(
getFromId
()
as
string
,
route
.
query
.
targetId
as
string
);
const
messageList
=
await
ChatMessageDB
.
getInstance
().
getMessage
(
getFromId
()
as
string
,
route
.
query
.
targetId
as
string
);
console
.
log
(
messageList
,
'show messageList'
)
messageStore
.
messages
.
push
(...
messageList
);
messageStore
.
messages
.
push
(...
messageList
);
ChatListCardDB
.
getInstance
().
readMsg
(
getFromId
()
as
string
,
target
)
ChatListCardDB
.
getInstance
().
readMsg
(
getFromId
()
as
string
,
route
.
query
.
targetId
as
string
)
}
}
const
notifyUserAndStaffTheChatBegin
=
async
()
=>
{
const
notifyUserAndStaffTheChatBegin
=
async
()
=>
{
...
...
src/views/Chat/ChatContentMessage.vue
View file @
f4728f0a
...
@@ -104,7 +104,6 @@ import { target } from "@/store/appCallerStore";
...
@@ -104,7 +104,6 @@ import { target } from "@/store/appCallerStore";
import
{
copyToClipboard
}
from
'quasar'
import
{
copyToClipboard
}
from
'quasar'
import
{
Toast
}
from
"vant"
;
import
{
Toast
}
from
"vant"
;
import
ChatMessageDB
from
"@/db/ChatMessageDB"
;
import
ChatMessageDB
from
"@/db/ChatMessageDB"
;
import
{
chatCardTimeStamp
}
from
"@/store/chatCardStore"
;
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
...
...
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