开源在线客服系统GO语言开发GO-FLY,免费在线客服系统
在使用 Telegram Bot 做客服系统来快速服务客户中介绍了如何用Telegram机器人做客服系统,
下面介绍一个 Golang实现的开源的在线客服聊天即时通讯系统 ,网页客服 ,WEB IM 访客-客服即时通讯在线聊天。
Golang语言开源客服系统,主要使用了gin + jwt-go + websocket + go.uuid + gorm + cobra + VueJS + ElementUI + MySQL等技术
安装使用
- 先安装和运行mysql数据库 ,版本>=5.5 ,创建数据库
1
|
create database gofly charset utf8mb4;
|
- 配置数据库链接信息,在config目录mysql.json中
1
2
3
4
5
6
7
|
{
"Server":"127.0.0.1",
"Port":"3306",
"Database":"gofly",
"Username":"go-fly",
"Password":"go-fly"
}
|
- 安装配置Golang运行环境,请参照下面的命令去执行
1
2
3
4
5
6
7
8
9
|
wget https://studygolang.com/dl/golang/go1.20.2.linux-amd64.tar.gz
tar -C /usr/local -xvf go1.20.2.linux-amd64.tar.gz
mv go1.20.2.linux-amd64.tar.gz /tmp
echo "PATH=\$PATH:/usr/local/go/bin" >> /etc/profile
echo "PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
source /etc/profile
go version
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
|
在任意目录 git clone https://github.com/taoshihan1991/go-fly.git
进入go-fly 目录
-
导入数据库 go run go-fly.go install
-
源码运行 go run go-fly.go server
-
源码打包 go build -o kefu 会生成kefu可以执行文件
-
二进制文件运行
linux: ./kefu server [可选 -p 8082 -d]
windows: kefu.exe server [可选 -p 8082 -d]
killall kefu
程序正常运行后,监听端口8081,可以直接ip+端口8081访问
也可以配置域名访问,反向代理到8081端口,就能隐藏端口号
客服对接
聊天链接
http://127.0.0.1:8081/chatIndex?kefu_id=kefu2
弹窗使用
1
2
3
4
5
6
7
8
9
10
11
|
(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",
})
});
|
参考
Go-fly
唯一客服系统
go-fly gitee