Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
kefu_server
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
b1be2a69
authored
Apr 01, 2020
by
keith
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
客户端增加定时获取会话列表,避免服务端推送不到
parent
36497b1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
ui/kefu_admin/main.js
ui/kefu_admin/src/views/workbench/index.vue
utils/message_into.go
ui/kefu_admin/main.js
View file @
b1be2a69
...
...
@@ -32,9 +32,9 @@ function createWindow () {
message
:
"您确定关闭应用程序吗?"
,
buttons
:
[
'我点错了'
,
'窗口最小化'
,
'确定关闭'
]
}
dialog
.
showMessageBox
(
options
,
function
(
index
)
{
if
(
index
==
2
)
app
.
exit
();
if
(
index
==
1
)
mainWindow
.
minimize
()
dialog
.
showMessageBox
(
options
).
then
(
function
(
res
)
{
if
(
res
.
response
==
2
)
app
.
exit
();
if
(
res
.
response
==
1
)
mainWindow
.
minimize
()
})
e
.
preventDefault
()
})
...
...
ui/kefu_admin/src/views/workbench/index.vue
View file @
b1be2a69
...
...
@@ -278,6 +278,9 @@ export default {
// 粘贴事件
document
.
addEventListener
(
"paste"
,
this
.
inputPaste
,
false
)
// 3秒请求一次会话列表(避免后台推送不到不能及时更新)
setTimeout
(()
=>
this
.
$store
.
dispatch
(
'ON_GET_CONTACTS'
),
3000
)
},
beforeDestroy
(){
document
.
removeEventListener
(
"mousemove"
,
this
.
onMousemoveEvent
,
false
)
...
...
utils/message_into.go
View file @
b1be2a69
...
...
@@ -101,7 +101,10 @@ func MessageInto(message models.Message) {
// 接收者是客服就推送
if
admin
!=
nil
{
PushNewContacts
(
message
.
ToAccount
)
go
func
()
{
time
.
Sleep
(
1
*
time
.
Second
)
PushNewContacts
(
message
.
ToAccount
)
}()
}
}
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