master
taoshihan 2 months ago
parent 05e8b3f788
commit 5efe4dc591

@ -55,12 +55,12 @@
<el-avatar class="mainLogo" title="Customer Support" :size="45" src="/static/images/1.jpg"></el-avatar>
</el-badge>
</div>
<div class="menuLeftItem" v-on:click="openIframeUrl('/pannel')">
<div class="menuLeftItem active" v-on:click="openIframeUrl('/pannel')">
<i class="el-icon-platform-eleme"></i>
<span slot="title">Dashboard</span>
</div>
<div class="menuLeftItem active" v-on:click="haveNewMessage='';openIframeUrl('/chat_main')">
<div class="menuLeftItem" v-on:click="haveNewMessage='';openIframeUrl('/chat_main')">
<el-badge :value="haveNewMessage" class="item">
<i class="el-icon-chat-dot-round"></i>
</el-badge>
@ -99,7 +99,7 @@
adminRole:"",
onlineType:"success",
haveNewMessage:"",
iframeUrl:"/chat_main",
iframeUrl:"/pannel",
},
methods: {
focusWindow(){
@ -148,7 +148,7 @@
} else {
_this.adminAvator=data.result.avator;
_this.adminRole=data.result.role_name;
_this.iframeUrl = "/chat_main";
_this.iframeUrl = "/pannel";
}
}
});

@ -1,61 +1,87 @@
{{template "header" }}
<div id="app" style="width:100%;background: #eef0f6">
{{template "header"}}
<style>
.deployment-guide {
max-width: 1200px;
margin: 20px auto;
padding: 24px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.deployment-section {
margin: 30px 0;
padding: 20px;
background: #f8fafc;
border-radius: 8px;
}
.el-input {
width: 100%;
}
.el-input__inner {
height: 40px;
font-size: 14px;
padding: 0 12px;
}
.el-step__title {
font-size: 14px;
}
.el-step__description {
font-size: 12px;
}
h2 {
color: #303133;
font-size: 24px;
margin-bottom: 20px;
}
h3 {
color: #606266;
font-size: 18px;
margin-bottom: 16px;
}
#app {
background: #f5f7fa;
padding: 20px;
min-height: calc(100vh - 40px);
}
.el-card {
border-radius: 8px;
}
.el-card__header {
padding: 18px 20px;
}
</style>
<div id="app" style="width:100%;background: #f5f7fa">
<template>
<div class="tongji">
<div class="tongjiItem">
<div class="tongjiHeader">
全部客户
<el-card class="deployment-guide">
<div slot="header" class="clearfix">
<h2>System Deployment Guide</h2>
</div>
<div class="tongjiBody">
33
</div>
<div class="tongjiFooter">
累计客户数量<span>xx</span>
</div>
</div>
<div class="tongjiItem">
<div class="tongjiHeader">
日新增客户
</div>
<div class="tongjiBody">
33
</div>
<div class="tongjiFooter">
累计客户数量<span>xx</span>
</div>
</div>
<div class="tongjiItem">
<div class="tongjiHeader">
月新增客户
</div>
<div class="tongjiBody">
33
</div>
<div class="tongjiFooter">
累计客户数量<span>xx</span>
</div>
</div>
<div class="tongjiItem">
<div class="tongjiHeader">
年新增客户
</div>
<div class="tongjiBody">
33
</div>
<div class="tongjiFooter">
累计客户数量<span>xx</span>
</div>
</div>
</div>
<div style="background: #fff;margin: 10px;padding: 10px" id="visitorNums">
<el-steps :active="3" align-center>
<el-step title="Server Setup" description="Prepare your hosting environment"></el-step>
<el-step title="System Installation" description="Deploy the application"></el-step>
<el-step title="Configuration" description="Set up system parameters"></el-step>
<el-step title="Go Live" description="Launch your chat system"></el-step>
</el-steps>
<div class="deployment-section">
<h3>Quick Start via Chat Link</h3>
<p>To immediately access your customer support chat interface:</p>
<p>Your live chat endpoint is available at:</p>
<el-input v-model="chatEndpoint" readonly style="width: 100%; margin-top: 10px;">
<el-button slot="append" icon="el-icon-document-copy"
v-on:click="copyText(chatEndpoint)"></el-button>
</el-input>
</div>
</el-card>
</template>
</div>
</body>
<script src="/static/js/echarts.min.js?v=1.0.0"></script>
<script>
const ACTION="pannel";
const ACTION="pannel";
</script>
{{template "setting_bottom" .}}

@ -105,6 +105,7 @@
confirm_new_pass:""
},
avatarUrl:"",
chatEndpoint: "",
},
methods: {
@ -539,6 +540,29 @@
type: 'success'
});
},
//获取客服信息
getKefuInfo(){
let _this=this;
$.ajax({
type:"get",
url:"/kefuinfo",
headers:{
"token":localStorage.getItem("token")
},
success: function(data) {
if(data.code==200 && data.result!=null){
_this.kefuInfo=data.result;
_this.chatEndpoint=window.location.origin + '/chatIndex?kefu_id='+_this.kefuInfo.username;
}
if(data.code!=200){
_this.$message({
message: data.msg,
type: 'error'
});
}
}
});
},
},
mounted:function(){
@ -548,9 +572,7 @@
}
},
created: function () {
// if(ACTION=="setting"){
// this.showNotice();
// }
this.getKefuInfo();
this.initInfo();
}
})

@ -86,7 +86,7 @@ func AddVisitorToList(user *User) {
userInfo["avator"] = user.Avator
userInfo["last_message"] = lastMessage.Content
if userInfo["last_message"] == "" {
userInfo["last_message"] = "新访客"
userInfo["last_message"] = "new visitor"
}
msg := TypeMessage{
Type: "userOnline",
@ -105,7 +105,7 @@ func VisitorOnline(kefuId string, visitor models.Visitor) {
userInfo["avator"] = visitor.Avator
userInfo["last_message"] = lastMessage.Content
if userInfo["last_message"] == "" {
userInfo["last_message"] = "新访客"
userInfo["last_message"] = "new visitor"
}
msg := TypeMessage{
Type: "userOnline",

Loading…
Cancel
Save