From b270e6dd14665b2174ac11030ae861addd7d552a Mon Sep 17 00:00:00 2001 From: taoshihan <630892807@qq.com> Date: Mon, 31 Jul 2023 17:10:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=A8=A1=E5=BC=8F=E4=BB=8B?= =?UTF-8?q?=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 20 ++++++++++++++++++ static/js/kefu-front.js | 4 ++++ static/templates/index.html | 41 ++++++++++++++++++++++++++++++++++--- 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 607d655..376783c 100644 --- a/readme.md +++ b/readme.md @@ -68,7 +68,27 @@ go env -w GOPROXY=https://goproxy.cn,direct 程序正常运行后,监听端口8081,可以直接ip+端口8081访问 也可以配置域名访问,反向代理到8081端口,就能隐藏端口号 +### 客服对接 +聊天链接 +http://127.0.0.1:8081/chatIndex?kefu_id=kefu2 + +弹窗使用 + +``` + (function(a, b, c, d) { + let h = b.getElementsByTagName('head')[0];let s = b.createElement('script'); + s.type = 'text/javascript';s.src = c+"/static/js/kefu-front.js";s.onload = s.onreadystatechange = function () { + if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") d(c); + };h.appendChild(s); + })(window, document,"http://127.0.0.1:8081",function(u){ + KEFU.init({ + KEFU_URL:u, + KEFU_KEFU_ID: "kefu2", + }) + }); + +``` ### 版权声明 当前项目是完整功能代码 , 但是仍然仅支持个人演示测试 , 不包含线上使用 ,禁止一切商用行为。 diff --git a/static/js/kefu-front.js b/static/js/kefu-front.js index 51eea70..fc9f129 100644 --- a/static/js/kefu-front.js +++ b/static/js/kefu-front.js @@ -291,6 +291,10 @@ KEFU.layerOpen=function (width,height,offset){ } var title=`
Golang语言开源客服系统,主要使用了gin + jwt-go + websocket + go.uuid + gorm + cobra + VueJS + ElementUI + MySQL等技术
create database gofly charset utf8mb4;
+ create database gofly charset utf8mb4;
+
配置数据库链接信息,在config目录mysql.json中
{
@@ -80,6 +96,25 @@ go env -w GOPROXY=https://goproxy.cn,direct
程序正常运行后,监听端口8081,可以直接ip+端口8081访问
也可以配置域名访问,反向代理到8081端口,就能隐藏端口号
+ +聊天链接
+http://127.0.0.1:8081/chatIndex?kefu_id=kefu2
+弹窗使用
+ (function(a, b, c, d) {
+ let h = b.getElementsByTagName('head')[0];let s = b.createElement('script');
+ s.type = 'text/javascript';s.src = c+"/static/js/kefu-front.js";s.onload = s.onreadystatechange = function () {
+ if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") d(c);
+ };h.appendChild(s);
+ })(window, document,"http://127.0.0.1:8081",function(u){
+ KEFU.init({
+ KEFU_URL:u,
+ KEFU_KEFU_ID: "kefu2",
+ })
+ });
+
+
+
当前项目是完整功能代码 , 但是仍然仅支持个人演示测试 , 不包含线上使用 ,禁止一切商用行为。 使用本软件时,请遵守当地法律法规,任何违法用途一切后果请自行承担.