master
taoshihan 2 months ago
parent ac9f730f5e
commit f9de0f1f43

@ -1,26 +1,28 @@
### 郑重提示 ### Important Notice
禁止将本项目用于含病毒、木马、色情、赌博、诈骗、违禁用品、假冒产品、虚假信息、数字货币、金融等违法违规业务 The use of this project for illegal or non-compliant purposes, including but not limited to viruses, trojans, pornography, gambling, fraud, prohibited items, counterfeit products, false information, cryptocurrencies, and financial violations, is strictly prohibited.
当前项目仅供个人学习测试,禁止一切线上商用行为,禁止一切违法使用!!! This project is intended solely for personal learning and testing purposes. Any commercial use or illegal activities are explicitly forbidden!!!
---
### Project Overview
An open-source customer service system developed in Golang, utilizing the following technologies:
- Backend: `gin`, `jwt-go`, `websocket`, `go.uuid`, `gorm`, `cobra`
- Frontend: `VueJS`, `ElementUI`
- Database: `MySQL`
---
### 项目简介 ### Installation & Usage
Golang语言开源客服系统主要使用了gin + jwt-go + websocket + go.uuid + gorm + cobra + VueJS + ElementUI + MySQL等技术 #### 1. Set Up MySQL Database
- Install and run MySQL (version ≥ 5.5).
- Create a database:
```sql
CREATE DATABASE gofly CHARSET utf8mb4;
* Configure Database Connection
### 安装使用 Edit mysql.json in the config directory:
* 先安装和运行mysql数据库 ,版本>=5.5 ,创建数据库
```
create database gofly charset utf8mb4;
```
* 配置数据库链接信息在config目录mysql.json中
```php ```php
{ {
"Server":"127.0.0.1", "Server":"127.0.0.1",
@ -30,7 +32,8 @@ Golang语言开源客服系统主要使用了gin + jwt-go + websocket + go.uu
"Password":"go-fly" "Password":"go-fly"
} }
``` ```
* 安装配置Golang运行环境请参照下面的命令去执行 * Install and Configure Golang
Run the following commands:
```php ```php
wget https://studygolang.com/dl/golang/go1.20.2.linux-amd64.tar.gz 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 tar -C /usr/local -xvf go1.20.2.linux-amd64.tar.gz
@ -42,38 +45,45 @@ go version
go env -w GO111MODULE=on go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://goproxy.cn,direct
``` ```
* 下载代码 * Download the Source Code
在任意目录 git clone https://github.com/taoshihan1991/go-fly.git
进入go-fly 目录 Clone the repository in any directory:
```php
* 导入数据库 go run go-fly.go install git clone https://github.com/taoshihan1991/go-fly.git
cd go-fly
* 源码运行 go run go-fly.go server ```
* Initialize the Database
* 源码打包 go build -o kefu 会生成kefu可以执行文件 ```php
go run go-fly.go install
* 二进制文件运行 ```
* Run the Application
```php
go run go-fly.go server
```
* Build executable
```php
go build -o kefu
```
* Run binary:
linux: ./kefu server [可选 -p 8082 -d] Linux: ./kefu server (optional flags: -p 8082 -d)
windows: kefu.exe server [可选 -p 8082 -d] Windows: kefu.exe server (optional flags: -p 8082 -d)
* 关闭程序 * Terminate the Process
killall kefu killall kefu
程序正常运行后监听端口8081可以直接ip+端口8081访问 Once running, the service listens on port 8081. Access via http://[your-ip]:8081.
也可以配置域名访问反向代理到8081端口就能隐藏端口号 For domain access, configure a reverse proxy to port 8081 to hide the port number.
### 客服对接 ### Customer Service Integration
聊天链接 Chat Link
http://127.0.0.1:8081/chatIndex?kefu_id=kefu2 http://127.0.0.1:8081/chatIndex?kefu_id=kefu2
弹窗使用 Popup Integration
``` ```
(function(a, b, c, d) { (function(a, b, c, d) {
@ -89,7 +99,7 @@ http://127.0.0.1:8081/chatIndex?kefu_id=kefu2
}); });
``` ```
### 版权声明 ### Copyright Notice
This project provides full-featured code but is intended only for personal demonstration and testing. Commercial use is strictly prohibited.
当前项目是完整功能代码 , 但是仍然仅支持个人演示测试 , 不包含线上使用 ,禁止一切商用行为。 By using this software, you agree to comply with all applicable local laws and regulations. You are solely responsible for any legal consequences arising from misuse.
使用本软件时,请遵守当地法律法规,任何违法用途一切后果请自行承担.
Loading…
Cancel
Save