Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
company_app
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
毛细亚
company_app
Commits
c298460c
提交
c298460c
authored
6月 09, 2025
作者:
毛细亚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
下线成功
上级
527268d4
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
53 行增加
和
41 行删除
+53
-41
user.js
src/api/user.js
+1
-1
bindUserList.vue
src/views/components/bindGameAccount/bindUserList.vue
+2
-35
Info.vue
src/views/userInfo/components/Info.vue
+50
-5
没有找到文件。
src/api/user.js
浏览文件 @
c298460c
...
...
@@ -94,7 +94,7 @@ export function sendComment(data) {
export
function
client_session_rest
(
data
)
{
// 发送一个post请求,请求的url为'/sidebar/client_session/rest',请求的数据为data
return
request
({
url
:
'/sidebar/
client_sessio
n/rest'
,
url
:
'/sidebar/
work_wei_xi
n/rest'
,
method
:
'post'
,
data
})
...
...
src/views/components/bindGameAccount/bindUserList.vue
浏览文件 @
c298460c
...
...
@@ -13,7 +13,6 @@
<p
v-if=
"bindGameUserList.length > 0"
class=
"num"
>
总共
{{
bindGameUserList
.
length
}}
个账号
</p>
<el-button
type=
"danger"
style=
"margin-left: 10px;"
size=
"mini"
@
click=
"logout"
>
下线
</el-button>
<addUser
:show
.
sync=
"showLayer"
title=
"选择玩家"
...
...
@@ -53,7 +52,8 @@ export default {
...
mapState
(
'user'
,
[
'userid'
,
'corp_id'
,
'external_userid'
'external_userid'
,
'client_online_status'
]),
},
watch
:
{
...
...
@@ -102,39 +102,6 @@ export default {
}
},
logout
(){
this
.
$confirm
(
'确定下线吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
userLogout
()
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
})
})
},
async
userLogout
(){
const
data
=
{
userid
:
this
.
userid
,
}
const
res
=
await
logout
(
data
)
if
(
res
.
status_code
===
1
){
this
.
$message
({
type
:
'success'
,
message
:
'下线成功'
})
removeToken
()
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
this
.
corp_id
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'下线失败'
})
}
},
addNewUser
()
{
console
.
log
(
11
)
},
...
...
src/views/userInfo/components/Info.vue
浏览文件 @
c298460c
...
...
@@ -21,19 +21,22 @@
>
<p>
高风险用户,禁止转端 !!!
</p>
</div>
<div
class=
"cser_info"
>
<div
class=
"cser_name"
>
<span>
当前客服:
{{
`${cser_name
}
(${clientStatusText
}
)`
}}
<
/span
>
<
/div
>
<!--
添加客服状态显示及按钮
-->
<
div
class
=
"cser_status"
>
<
div
class
=
"status-actions"
>
<
el
-
button
type
=
"danger"
style
=
"margin-left: 0px;"
size
=
"mini"
@
click
=
"logout"
>
下线
<
/el-button
>
<!--
休息中状态显示结束休息按钮
-->
<
el
-
button
v
-
if
=
"clientStatus === 'rest'"
type
=
"primary"
size
=
"mini"
@
click
=
"handleFinishRest"
>
结束休息
<
/el-button
>
<!--
在线状态显示开始休息按钮
-->
<
el
-
button
v
-
if
=
"clientStatus === 'online'"
type
=
"warning"
size
=
"mini"
@
click
=
"handleStartRest"
title
=
"午休或者临时有事可点击休息"
>
开始休息
<
/el-button
>
<!--
发送评价按钮
-->
<
el
-
button
type
=
"primary"
size
=
"mini"
@
click
=
"handleSendComment"
>
发送评价
<
/el-button
>
<
el
-
button
type
=
"primary"
style
=
"margin-left: 0px;"
size
=
"mini"
@
click
=
"handleSendComment"
>
发送评价
<
/el-button
>
<
/div
>
<
/div
>
<
/div
>
<!--
会话内容存档状态
-->
...
...
@@ -201,9 +204,9 @@ import watchMember from '@/mixins/watchMember'
import
{
autoResetPassword
,
bindUserSelfAdd
}
from
'@/api/game'
import
{
memberBindCser
,
editUser
,
zyouUnBind
}
from
'@/api/works'
import
selectTag
from
'@/components/selectTag.vue'
import
{
getClientStatus
,
remarkSessionIntelTag
,
finishRest
,
client_session_rest
,
checkSingleAgree
,
checkUserPermit
,
sendComment
}
from
'@/api/user.js'
import
{
getClientStatus
,
remarkSessionIntelTag
,
finishRest
,
client_session_rest
,
checkSingleAgree
,
checkUserPermit
,
sendComment
,
logout
}
from
'@/api/user.js'
import
{
sendChatMessage
}
from
'@/utils/index.js'
import
{
getToken
,
removeToken
}
from
'@/utils/auth'
export
default
{
name
:
'UserDetailsPanel'
,
components
:
{
...
...
@@ -232,7 +235,6 @@ import watchMember from '@/mixins/watchMember'
changePhone
:
false
,
showTag
:
false
,
// 新增状态数据
clientStatus
:
''
,
// 客服休息状态:online上线 offline下线 rest休息中
agreeStatus
:
''
,
// 用户是否同意聊天内容存档:Agreen同意 Disagree不同意
hasPermit
:
false
,
// 客服号是否开启会话内容存档权限
}
...
...
@@ -253,6 +255,10 @@ import watchMember from '@/mixins/watchMember'
}
return
statusMap
[
this
.
client_online_status
]
||
'未知'
}
,
// 客服休息状态:online上线 offline下线 rest休息中
clientStatus
()
{
return
this
.
client_online_status
}
,
// 用户是否同意聊天内容存档文本
agreeStatusText
()
{
return
this
.
agreeStatus
===
'Agreen'
?
'已'
:
'未'
...
...
@@ -285,6 +291,46 @@ import watchMember from '@/mixins/watchMember'
console
.
error
(
'❌ 企业微信 SDK 初始化失败:'
,
error
)
}
}
,
logout
(){
if
(
this
.
client_online_status
===
'rest'
){
this
.
$message
({
type
:
'error'
,
message
:
'当前客服号处于休息状态,不能下线'
}
)
return
}
this
.
$confirm
(
'确定下线吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
this
.
userLogout
()
}
).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
}
)
}
)
}
,
async
userLogout
(){
const
data
=
{
userid
:
this
.
userid
,
}
const
res
=
await
logout
(
data
)
if
(
res
.
status_code
===
1
){
this
.
$message
({
type
:
'success'
,
message
:
'下线成功'
}
)
removeToken
()
window
.
location
.
href
=
window
.
location
.
origin
+
'/company_app/index.html?corp_id='
+
this
.
corp_id
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'下线失败'
}
)
}
}
,
// 获取初始数据
async
getInitialData
()
{
...
...
@@ -611,7 +657,6 @@ import watchMember from '@/mixins/watchMember'
justify
-
content
:
space
-
between
;
margin
-
bottom
:
10
px
;
font
-
size
:
14
px
;
.
status
-
actions
{
display
:
flex
;
gap
:
10
px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论