You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-fly/static/templates/index.html

138 lines
5.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>独立私有化智能在线客服系统</title>
<style>
body{
display: flex;
align-items: center;
justify-content: center;
line-height: 23px;
}
h1{
border-bottom: 1px solid #eee;
}
h1, h2, h3{
margin: 15px 0px!important;
padding: 15px 0px!important;
}
ul,pre{
margin: 10px!important;
padding: 10px!important;
}
pre{
border: 1px solid #e7eaed;
background-color: #f8f8f8;
}
a {
color: #4183C4;
}
p{
line-height: 30px;
}
.main{
max-width: 900px;
width: 100%;
margin:30px 0px;
}
</style>
</head>
<body>
<div class="main">
<h1>开源在线客服系统</h1>
<h3 id="郑重提示">郑重提示</h3>
<p>禁止将本项目用于含病毒、木马、色情、赌博、诈骗、违禁用品、假冒产品、虚假信息、数字货币、金融等违法违规业务</p>
<p>当前项目仅供个人学习测试,禁止一切线上商用行为,禁止一切违法使用!!!</p>
<h3 id="项目简介">项目简介</h3>
<p>Golang语言开源客服系统主要使用了gin + jwt-go + websocket + go.uuid + gorm + cobra + VueJS + ElementUI + MySQL等技术</p>
<h3 id="安装使用">安装使用</h3>
<ul>
<li>先安装和运行mysql数据库 ,版本&gt;=5.5 ,创建数据库
<pre><code> create database gofly charset utf8mb4;</code></pre>
</li>
</ul>
<ul>
<li><p>配置数据库链接信息在config目录mysql.json中</p>
<pre><code class="language-php">{
&quot;Server&quot;:&quot;127.0.0.1&quot;,
&quot;Port&quot;:&quot;3306&quot;,
&quot;Database&quot;:&quot;gofly&quot;,
&quot;Username&quot;:&quot;go-fly&quot;,
&quot;Password&quot;:&quot;go-fly&quot;
}</code></pre>
</li>
<li><p>安装配置Golang运行环境请参照下面的命令去执行</p>
<pre><code class="language-php">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 &quot;PATH=\$PATH:/usr/local/go/bin&quot; &gt;&gt; /etc/profile
echo &quot;PATH=\$PATH:/usr/local/go/bin&quot; &gt;&gt; ~/.bashrc
source /etc/profile
go version
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct</code></pre>
</li>
<li><p>下载代码</p>
<p> 在任意目录 git clone <a href="https://github.com/taoshihan1991/go-fly.git">https://github.com/taoshihan1991/go-fly.git</a></p>
<p> 进入go-fly 目录</p>
</li>
<li><p>导入数据库 go run go-fly.go install</p>
</li>
<li><p>源码运行 go run go-fly.go server</p>
</li>
<li><p>源码打包 go build -o kefu 会生成kefu可以执行文件</p>
</li>
<li><p>二进制文件运行</p>
<p> linux: ./kefu server [可选 -p 8082 -d]</p>
<p> windows: kefu.exe server [可选 -p 8082 -d]</p>
</li>
<li><p>关闭程序</p>
<p> killall kefu</p>
</li>
</ul>
<p>程序正常运行后监听端口8081可以直接ip+端口8081访问</p>
<p>也可以配置域名访问反向代理到8081端口就能隐藏端口号</p>
<h3 id="客服对接">客服对接</h3>
<p>聊天链接</p>
<p><a href="http://127.0.0.1:8081/chatIndex?kefu_id=kefu2">http://127.0.0.1:8081/chatIndex?kefu_id=kefu2</a></p>
<p>弹窗使用</p>
<pre><code> (function(a, b, c, d) {
let h = b.getElementsByTagName(&#39;head&#39;)[0];let s = b.createElement(&#39;script&#39;);
s.type = &#39;text/javascript&#39;;s.src = c+&quot;/static/js/kefu-front.js&quot;;s.onload = s.onreadystatechange = function () {
if (!this.readyState || this.readyState === &quot;loaded&quot; || this.readyState === &quot;complete&quot;) d(c);
};h.appendChild(s);
})(window, document,&quot;http://127.0.0.1:8081&quot;,function(u){
KEFU.init({
KEFU_URL:u,
KEFU_KEFU_ID: &quot;kefu2&quot;,
})
});
</code></pre>
<h3 id="版权声明">版权声明</h3>
<p>当前项目是完整功能代码 , 但是仍然仅支持个人演示测试 , 不包含线上使用 ,禁止一切商用行为。
使用本软件时,请遵守当地法律法规,任何违法用途一切后果请自行承担.</p>
</div>
<script type='text/javascript'>
(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",
})
});
</script>
</body>
</html>