提交 6cc46e07 作者: 毛细亚

清除 cookie

上级 e5a50223
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
</div> </div>
<div class="rowFlex columnCenter spaceBetween gameCodeTitle" @click="showGameCode = !showGameCode"> <div class="rowFlex columnCenter spaceBetween gameCodeTitle" @click="showGameCode = !showGameCode">
<p class="rowFlex columnCenter spaceBetween"> <p class="rowFlex columnCenter spaceBetween">
<img src="@/assets/icon/svg/gift.svg" alt="gift" <svg-icon icon-class="gift" style="font-size:20px;margin-right: 5px;margin-top: -2px;"></svg-icon>
style="width: 16px;height: 16px;margin-right: 5px;margin-top: -2px;">
<span class="giftCode">礼包码</span> <span class="giftCode">礼包码</span>
</p> </p>
<i :class="showGameCode ? 'el-icon-arrow-right' : 'el-icon-arrow-down'"></i> <i :class="showGameCode ? 'el-icon-arrow-right' : 'el-icon-arrow-down'"></i>
......
<template> <template>
<div class="info-tab-content"> <div class="info-tab-content">
<div <div class="userDetailsPanel columnFlex">
class="userDetailsPanel columnFlex"
>
<div class="content" v-loading="viewLoading"> <div class="content" v-loading="viewLoading">
<div v-if="chatUserDetails.is_phishing_account==1" class="warnText"> <div v-if="chatUserDetails.is_phishing_account == 1" class="warnText">
<p>高风险玩家,请立即通知组长!!!!</p> <p>高风险玩家,请立即通知组长!!!!</p>
<p>①千万不能推转游!!不要发送违禁词汇!!不要发送礼包和告知任何礼包信息!!</p> <p>①千万不能推转游!!不要发送违禁词汇!!不要发送礼包和告知任何礼包信息!!</p>
<p>②不能以任何形式推送APP/网页链接,也不可承认有APP/网页端口!!</p> <p>②不能以任何形式推送APP/网页链接,也不可承认有APP/网页端口!!</p>
</div> </div>
<div <div v-if="change_appraisal" class="warnText">
v-if="change_appraisal"
class="warnText"
>
<p> 钓鱼号 禁止转端通知组长!</p> <p> 钓鱼号 禁止转端通知组长!</p>
</div> </div>
<div <div v-else-if="gameUserInfo.exp_ip" class="warnText">
v-else-if="gameUserInfo.exp_ip"
class="warnText"
>
<p>高风险用户,禁止转端 !!!</p> <p>高风险用户,禁止转端 !!!</p>
</div> </div>
<div class="cser_info"> <div class="cser_info">
...@@ -28,50 +20,40 @@ ...@@ -28,50 +20,40 @@
<!-- 添加客服状态显示及按钮 --> <!-- 添加客服状态显示及按钮 -->
<div class="cser_status"> <div class="cser_status">
<div class="status-actions"> <div class="status-actions">
<el-button type="danger" v-if="clientStatus !== 'offline'" style="margin-left: 0px;" size="mini" @click="logout">下线</el-button> <el-button type="danger" v-if="clientStatus !== 'offline'" 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 === 'rest'" type="primary" size="mini"
@click="handleFinishRest">结束休息</el-button>
<!-- 在线状态显示开始休息按钮 --> <!-- 在线状态显示开始休息按钮 -->
<el-tooltip v-if="clientStatus === 'online'" content="午休或者临时有事可点击休息" placement="top"> <el-tooltip v-if="clientStatus === 'online'" content="午休或者临时有事可点击休息" placement="top">
<el-button type="warning" size="mini" @click="handleStartRest" >开始休息</el-button> <el-button type="warning" size="mini" @click="handleStartRest">开始休息</el-button>
</el-tooltip> </el-tooltip>
<!-- 发送评价按钮 --> <!-- 发送评价按钮 -->
<el-button type="primary" style="margin-left: 0px;" size="mini" @click="handleSendComment">发送评价</el-button> <el-button type="primary" style="margin-left: 0px;" size="mini"
@click="handleSendComment">发送评价</el-button>
</div> </div>
</div> </div>
</div> </div>
<!-- 会话内容存档状态 --> <!-- 会话内容存档状态 -->
<div class="archive-status" v-if="agreeStatus!=='Agree' || !hasPermit"> <div class="archive-status" v-if="agreeStatus !== 'Agree' || !hasPermit">
<p v-if="agreeStatus!=='Agree'">当前微信用户未开启会话内容存档</p> <p v-if="agreeStatus !== 'Agree'">当前微信用户未开启会话内容存档</p>
<p v-if="!hasPermit">当前客服号未授权开启会话内容存档</p> <p v-if="!hasPermit">当前客服号未授权开启会话内容存档</p>
</div> </div>
<div class="item rowFlex"> <div class="item rowFlex">
<!-- 公共的信息 --> <!-- 公共的信息 -->
<el-image <el-image fit="fill" draggable="false" style="-webkit-user-drag: none" :src="chatUserDetails.avatar"
fit="fill" class="tableImage"></el-image>
draggable="false"
style="-webkit-user-drag: none"
:src="chatUserDetails.avatar"
class="tableImage"
></el-image>
<div class="columnFlex"> <div class="columnFlex">
<div <div class="rowFlex" style="margin-bottom: 3px">
class="rowFlex" <p class="text" style="font-weight: 600">
style="margin-bottom: 3px"
>
<p
class="text"
style="font-weight: 600"
>
{{ chatUserDetails.name }} {{ chatUserDetails.name }}
</p> </p>
<span v-if="chatUserDetails.add_way_text" style="color: #09b159; margin-left: 10px">@{{ chatUserDetails.add_way_text }}</span> <span v-if="chatUserDetails.add_way_text" style="color: #09b159; margin-left: 10px">@{{
chatUserDetails.add_way_text }}</span>
</div> </div>
<!-- 游戏模块特有 --> <!-- 游戏模块特有 -->
<div <div v-if="accountSelect && accountSelect !== ''" style="margin-top: 3px">
v-if="accountSelect && accountSelect !== ''"
style="margin-top: 3px"
>
<el-button-group> <el-button-group>
<el-button size="mini" @click="zyouUnBindConfirm">解绑</el-button> <el-button size="mini" @click="zyouUnBindConfirm">解绑</el-button>
<!-- <el-button size="mini" @click="autoResetPassword">修改密码</el-button> <!-- <el-button size="mini" @click="autoResetPassword">修改密码</el-button>
...@@ -85,11 +67,7 @@ ...@@ -85,11 +67,7 @@
<div class="item rowFlex columnCenter"> <div class="item rowFlex columnCenter">
<div class="rowFlex columnCenter"> <div class="rowFlex columnCenter">
<span class="label" style="min-width: 45px;">备注:</span> <span class="label" style="min-width: 45px;">备注:</span>
<p <p v-if="!showInputRemark" class="text" style="max-width: 170px;">
v-if="!showInputRemark"
class="text"
style="max-width: 170px;"
>
{{ {{
chatUserDetails.remark && chatUserDetails.remark != "" chatUserDetails.remark && chatUserDetails.remark != ""
? chatUserDetails.remark ? chatUserDetails.remark
...@@ -97,16 +75,9 @@ ...@@ -97,16 +75,9 @@
}} }}
</p> </p>
</div> </div>
<el-input <el-input v-if="showInputRemark" v-model="showInputRemarkValue" class="showInputRemarkInput" type="textarea"
v-if="showInputRemark" @change="handleInputRemark" @blur="showInputRemark = false"></el-input>
v-model="showInputRemarkValue" <i class="el-icon-edit icon" style="font-size: 14px" @click="editRemark"></i>
class="showInputRemarkInput"
type="textarea"
@change="handleInputRemark"
@blur="showInputRemark = false"
></el-input>
<i class="el-icon-edit icon" style="font-size: 14px"
@click="editRemark"></i>
</div> </div>
<div> <div>
...@@ -138,59 +109,35 @@ ...@@ -138,59 +109,35 @@
</div> </div>
</div> --> </div> -->
<!-- 游戏业务的账号信息 --> <!-- 游戏业务的账号信息 -->
<gameDetails <gameDetails v-if="gameUserInfo.username && !viewLoading" :chat-user-details="chatUserDetails"
v-if="gameUserInfo.username && !viewLoading" :game-user-info="gameUserInfo" @changeAppraisal="changeAppraisal" />
:chat-user-details="chatUserDetails"
:game-user-info="gameUserInfo"
@changeAppraisal="changeAppraisal"
/>
<!-- 游戏标签 --> <!-- 游戏标签 -->
<div <div class="item rowFlex columnCenter spaceBetween tagsLost">
class="item rowFlex columnCenter spaceBetween tagsLost"
>
<div class="rowFlex"> <div class="rowFlex">
<span class="label">关联标签:</span> <span class="label">关联标签:</span>
<div <div v-if="
v-if="
chatUserDetails.tag_group && chatUserDetails.tag_group &&
chatUserDetails.tag_group.length > 0 chatUserDetails.tag_group.length > 0
" ">
>
<!-- 第一个标签组的所有标签 --> <!-- 第一个标签组的所有标签 -->
<el-tag <el-tag v-for="(items, indexs) in chatUserDetails.tag_group[0].tag" :key="indexs">{{ items.name
v-for="(items, indexs) in chatUserDetails.tag_group[0].tag" }}</el-tag>
:key="indexs"
>{{ items.name }}</el-tag>
<!-- 如果有多个标签组,显示+n --> <!-- 如果有多个标签组,显示+n -->
<el-popover <el-popover v-if="chatUserDetails.tag_group.length > 1" placement="top" trigger="hover"
v-if="chatUserDetails.tag_group.length > 1" popper-class="tag-popover">
placement="top"
trigger="hover"
popper-class="tag-popover"
>
<div class="groups-popover-content" style="max-height: 600px;overflow-y: auto;"> <div class="groups-popover-content" style="max-height: 600px;overflow-y: auto;">
<div <div v-for="(group, groupIndex) in chatUserDetails.tag_group.slice(1)" :key="groupIndex"
v-for="(group, groupIndex) in chatUserDetails.tag_group.slice(1)" class="group-item">
:key="groupIndex" <el-tag v-for="(tagItem, tagIndex) in group.tag" :key="tagIndex" style="margin-right: 10px;">{{
class="group-item" tagItem.name }}</el-tag>
>
<el-tag
v-for="(tagItem, tagIndex) in group.tag"
:key="tagIndex"
style="margin-right: 10px;"
>{{ tagItem.name }}</el-tag>
</div> </div>
</div> </div>
<span <span slot="reference" class="tag-more">+{{ chatUserDetails.tag_group.length - 1 }}</span>
slot="reference"
class="tag-more"
>+{{ chatUserDetails.tag_group.length - 1 }}</span>
</el-popover> </el-popover>
</div> </div>
</div> </div>
<i class="el-icon-edit icon" style="font-size: 14px;margin-right: 10px;" <i class="el-icon-edit icon" style="font-size: 14px;margin-right: 10px;" @click="editTags"></i>
@click="editTags"></i>
</div> </div>
<!-- 共享信息 --> <!-- 共享信息 -->
<shareInfo :chat-user-details="chatUserDetails" /> <shareInfo :chat-user-details="chatUserDetails" />
...@@ -198,35 +145,26 @@ ...@@ -198,35 +145,26 @@
</div> </div>
</div> </div>
<!-- 修改手机号 --> <!-- 修改手机号 -->
<changePhone <changePhone :show.sync="changePhone" :phone.sync="gameUserInfo.mobile" title="修改手机号" width="350px" />
:show.sync="changePhone"
:phone.sync="gameUserInfo.mobile"
title="修改手机号"
width="350px"
/>
<!-- 修改标签 --> <!-- 修改标签 -->
<selectTag <selectTag v-if="showTag" :show.sync="showTag" :checkbox="true" :check-list="chatUserDetails.tag_group || []"
v-if="showTag" @submit="selectTags" />
:show.sync="showTag"
:checkbox="true"
:check-list="chatUserDetails.tag_group || []"
@submit="selectTags"
/>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapMutations, mapActions } from 'vuex' import { mapState, mapMutations, mapActions } from 'vuex'
import gameDetails from './gameInfo/gameUserInfo.vue' import gameDetails from './gameInfo/gameUserInfo.vue'
import shareInfo from './shareInfo.vue' import shareInfo from './shareInfo.vue'
import changePhone from './changePhone.vue' import changePhone from './changePhone.vue'
import watchMember from '@/mixins/watchMember' import watchMember from '@/mixins/watchMember'
import { autoResetPassword,bindUserSelfAdd } from '@/api/game' import { autoResetPassword, bindUserSelfAdd } from '@/api/game'
import { memberBindCser,editUser,zyouUnBind } from '@/api/works' import { memberBindCser, editUser, zyouUnBind } from '@/api/works'
import selectTag from '@/components/selectTag.vue' import selectTag from '@/components/selectTag.vue'
import { getClientStatus, remarkSessionIntelTag, finishRest, client_session_rest, checkSingleAgree, checkUserPermit, sendComment, logout } 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 { sendChatMessage } from '@/utils/index.js'
import { getToken,removeToken } from '@/utils/auth' import { getToken, removeToken } from '@/utils/auth'
export default { import Cookies from 'js-cookie'
export default {
name: 'info', name: 'info',
components: { components: {
gameDetails, gameDetails,
...@@ -246,13 +184,13 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -246,13 +184,13 @@ import { getToken,removeToken } from '@/utils/auth'
// 备注相关 // 备注相关
showInputRemark: false, showInputRemark: false,
showInputRemarkValue: '', showInputRemarkValue: '',
change_appraisal:false, change_appraisal: false,
// 自定义列相关 // 自定义列相关
showInput: false, showInput: false,
showInputValue: '', showInputValue: '',
inputIndex: -1, inputIndex: -1,
changePhone:false, changePhone: false,
showTag:false, showTag: false,
// 新增状态数据 // 新增状态数据
agreeStatus: '', // 用户是否同意聊天内容存档:Agreen同意 Disagree不同意 agreeStatus: '', // 用户是否同意聊天内容存档:Agreen同意 Disagree不同意
hasPermit: false, // 客服号是否开启会话内容存档权限 hasPermit: false, // 客服号是否开启会话内容存档权限
...@@ -265,7 +203,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -265,7 +203,7 @@ import { getToken,removeToken } from '@/utils/auth'
'bindGameUserList', 'bindGameUserList',
'viewLoading' 'viewLoading'
]), ]),
...mapState('user', ['cser_info', 'cser_id', 'cser_name', 'corp_id', 'external_userid', 'userid', 'client_online_status','token']), ...mapState('user', ['cser_info', 'cser_id', 'cser_name', 'corp_id', 'external_userid', 'userid', 'client_online_status', 'token']),
// 客服状态文本 // 客服状态文本
clientStatusText() { clientStatusText() {
const statusMap = { const statusMap = {
...@@ -285,7 +223,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -285,7 +223,7 @@ import { getToken,removeToken } from '@/utils/auth'
// 初始化企业微信SDK // 初始化企业微信SDK
this.initializeWecom() this.initializeWecom()
// 获取客服状态和相关信息 // 获取客服状态和相关信息
if(this.cser_id && this.token){ if (this.cser_id && this.token) {
this.getInitialData() this.getInitialData()
} }
}, },
...@@ -303,8 +241,8 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -303,8 +241,8 @@ import { getToken,removeToken } from '@/utils/auth'
console.error('❌ 企业微信 SDK 初始化失败:', error) console.error('❌ 企业微信 SDK 初始化失败:', error)
} }
}, },
logout(){ logout() {
if(this.client_online_status === 'rest'){ if (this.client_online_status === 'rest') {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '当前客服号处于休息状态,不能下线' message: '当前客服号处于休息状态,不能下线'
...@@ -324,24 +262,26 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -324,24 +262,26 @@ import { getToken,removeToken } from '@/utils/auth'
}) })
}) })
}, },
async userLogout(){ async userLogout() {
const data = { const data = {
userid: this.userid, userid: this.userid,
} }
const res = await logout(data) const res = await logout(data)
if(res.status_code === 1){ if (res.status_code === 1) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '下线成功' message: '下线成功'
}) })
removeToken() removeToken()
window.location.href = window.location.origin +'/company_app/index.html?corp_id='+this.corp_id Cookies.clear()
}else{ window.location.href = window.location.origin + '/company_app/index.html?corp_id=' + this.corp_id
} else {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '下线失败' message: '下线失败'
}) })
} }
}, },
// 获取初始数据 // 获取初始数据
...@@ -350,9 +290,9 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -350,9 +290,9 @@ import { getToken,removeToken } from '@/utils/auth'
// 1. 获取客服休息状态 // 1. 获取客服休息状态
const statusRes = await getClientStatus() const statusRes = await getClientStatus()
if (statusRes.status_code === 1) { if (statusRes.status_code === 1) {
if(statusRes.data.client_online_status === 'offline'){ if (statusRes.data.client_online_status === 'offline') {
removeToken() removeToken()
window.location.href = window.location.origin +'/company_app/index.html?corp_id='+this.corp_id window.location.href = window.location.origin + '/company_app/index.html?corp_id=' + this.corp_id
} }
this.$store.commit('user/set_client_online_status', statusRes.data.client_online_status) this.$store.commit('user/set_client_online_status', statusRes.data.client_online_status)
} }
...@@ -514,7 +454,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -514,7 +454,7 @@ import { getToken,removeToken } from '@/utils/auth'
if (res.status_code == 1) { if (res.status_code == 1) {
this.$message.success(res.msg) this.$message.success(res.msg)
const index = this.bindGameUserList.findIndex(item => item.member_id == this.accountSelect) const index = this.bindGameUserList.findIndex(item => item.member_id == this.accountSelect)
this.bindGameUserList.splice(index,1) this.bindGameUserList.splice(index, 1)
this.set_accountSelect(this.bindGameUserList[0].member_id) this.set_accountSelect(this.bindGameUserList[0].member_id)
} }
}) })
...@@ -639,40 +579,46 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -639,40 +579,46 @@ import { getToken,removeToken } from '@/utils/auth'
this.editUserInfo(params) this.editUserInfo(params)
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.info-tab-content{ .info-tab-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fff; background: #fff;
} }
.userDetailsPanel { .userDetailsPanel {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
.warnText{
width:100%; .warnText {
height:auto; width: 100%;
height: auto;
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
p{
p {
color: #F56C6C; color: #F56C6C;
line-height: 25px; line-height: 25px;
} }
} }
.cser_name{
.cser_name {
font-size: 14px; font-size: 14px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.cser_status { .cser_status {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
.status-actions { .status-actions {
display: flex; display: flex;
gap: 10px; gap: 10px;
...@@ -685,28 +631,33 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -685,28 +631,33 @@ import { getToken,removeToken } from '@/utils/auth'
background-color: #f8f8f8; background-color: #f8f8f8;
border-radius: 4px; border-radius: 4px;
font-size: 14px; font-size: 14px;
p { p {
margin: 5px 0; margin: 5px 0;
color: #F56C6C; color: #F56C6C;
font-weight: 600; font-weight: 600;
} }
} }
.detailsTitle { .detailsTitle {
height: 50px; height: 50px;
padding: 0 20px; padding: 0 20px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
p { p {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
} }
.warnText{
width:100%; .warnText {
height:auto; width: 100%;
height: auto;
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
margin-bottom: 10px; margin-bottom: 10px;
p{
p {
color: #F56C6C; color: #F56C6C;
line-height: 25px; line-height: 25px;
} }
...@@ -717,6 +668,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -717,6 +668,7 @@ import { getToken,removeToken } from '@/utils/auth'
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
.item { .item {
margin-bottom: 15px; margin-bottom: 15px;
position: relative; position: relative;
...@@ -740,10 +692,11 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -740,10 +692,11 @@ import { getToken,removeToken } from '@/utils/auth'
} }
.noBind { .noBind {
color: #3491FA ; color: #3491FA;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
.icon { .icon {
cursor: pointer; cursor: pointer;
margin-left: 10px; margin-left: 10px;
...@@ -753,8 +706,10 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -753,8 +706,10 @@ import { getToken,removeToken } from '@/utils/auth'
.tags { .tags {
max-width: 200px; max-width: 200px;
.tagsItem { .tagsItem {
margin-bottom: 5px; margin-bottom: 5px;
.tag { .tag {
background-color: #f5f5f5; background-color: #f5f5f5;
color: #666; color: #666;
...@@ -767,6 +722,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -767,6 +722,7 @@ import { getToken,removeToken } from '@/utils/auth'
} }
} }
} }
.item:hover .icon { .item:hover .icon {
display: block; display: block;
} }
...@@ -843,6 +799,7 @@ import { getToken,removeToken } from '@/utils/auth' ...@@ -843,6 +799,7 @@ import { getToken,removeToken } from '@/utils/auth'
margin-bottom: 8px; margin-bottom: 8px;
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px dashed #eee; border-bottom: 1px dashed #eee;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论