diff --git a/config/go-fly.sql b/config/go-fly.sql index c0fbebd..3a410a2 100644 --- a/config/go-fly.sql +++ b/config/go-fly.sql @@ -158,7 +158,7 @@ INSERT INTO `about` (`id`, `title_cn`, `title_en`, `keywords_cn`, `keywords_en`, GOFLY_LANG:"cn", }) -

:)

你好 GOFLY0.3.8 在线客服系统 !

Administrator English 中文

', +

:)

你好 GOFLY0.3.9 在线客服系统 !

Administrator English 中文

', ' -

:)

HELLO GOFLY0.3.8 LIVE CHAT !

Administrator English 中文

', +

:)

HELLO GOFLY0.3.9 LIVE CHAT !

Administrator English 中文

', 'index')| DROP TABLE IF EXISTS `reply_group`| CREATE TABLE `reply_group` ( diff --git a/config/language.go b/config/language.go deleted file mode 100644 index 83117fa..0000000 --- a/config/language.go +++ /dev/null @@ -1,47 +0,0 @@ -package config - -type Language struct { - WebCopyRight string - MainIntro string - Send string - Notice, Maintech, NowAsk, LaterAsk string - IndexSubIntro, IndexVisitors, IndexAgent, IndexDocument, IndexOnlineChat string -} - -func CreateLanguage(lang string) *Language { - var language *Language - - if lang == "en" { - language = &Language{ - WebCopyRight: "TaoShihan", - MainIntro: "Simple and Powerful Go language online customer chat system", - IndexSubIntro: "GO-FLY, a Vue 2.0-based online customer service instant messaging system for PHP engineers and Golang engineers", - IndexDocument: "API Documents", - IndexVisitors: "Visitors Here", - IndexAgent: "Agents Here", - IndexOnlineChat: "Let’s chat. - We're online", - Send: "Send", - Notice: "Hello and welcome to go-fly - how can we help?", - Maintech: "Main technical architecture", - NowAsk: "Start Chat", - LaterAsk: "Chat Later", - } - } - if lang == "cn" { - language = &Language{ - WebCopyRight: "陶士涵的菜地版权所有", - MainIntro: "极简强大的Go语言在线客服系统", - IndexSubIntro: "GO-FLY,一套为PHP工程师、Golang工程师准备的基于 Vue 2.0的在线客服即时通讯系统", - IndexVisitors: "访客入口", - IndexAgent: "客服入口", - IndexDocument: "接口文档", - IndexOnlineChat: "真人在线-点击与我交流", - Send: "发送", - Notice: "欢迎您访问go-fly!有什么我能帮助您的?", - Maintech: "主要技术架构", - NowAsk: "现在咨询", - LaterAsk: "稍后再说", - } - } - return language -} diff --git a/config/language.json b/config/language.json deleted file mode 100644 index e40e6e5..0000000 --- a/config/language.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "En":{ - "WebCopyRight": "TaoShihan", - "MainIntro": "Simple and Powerful Go language online customer chat system", - "IndexSubIntro": "GO-FLY, a Vue 2.0-based online customer service instant messaging system for PHP engineers and Golang engineers", - "IndexDocument":"API Documents", - "IndexVisitors":"Visitors Here", - "IndexAgent":"Agents Here", - "IndexOnlineChat":"Let’s chat. - We're online" - }, - "Cn":{ - "WebCopyRight": "陶士涵的菜地版权所有", - "MainIntro":"极简强大的Go语言在线客服系统", - "IndexSubIntro":"GO-FLY,一套为PHP工程师、Golang工程师准备的基于 Vue 2.0的在线客服即时通讯系统", - "IndexVisitors":"访客入口", - "IndexAgent":"客服入口", - "IndexDocument":"接口文档", - "IndexOnlineChat":"在线咨询" - } -} diff --git a/static/html/setting_bottom.html b/static/html/setting_bottom.html index b689bab..9c3684f 100644 --- a/static/html/setting_bottom.html +++ b/static/html/setting_bottom.html @@ -285,6 +285,10 @@ if (valid) { this.sendAjax("/kefuinfo","POST",_this.kefuForm,function(result){ _this.kefuDialog=false; + _this.$message({ + message: "修改后台账户名后,后台需重新登录", + type: 'success' + }); _this.sendAjax("/kefulist","get",{},function(result){ _this.kefuList=result; }); diff --git a/static/js/chat-page.js b/static/js/chat-page.js index d8d0b5f..1a16c89 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -191,7 +191,7 @@ new Vue({ var to_id=KEFU_ID; if(obj){ visitor_id=obj.visitor_id; - to_id=obj.to_id; + //to_id=obj.to_id; } let _this=this; var extra=getQuery("extra"); diff --git a/tmpl/chat.go b/tmpl/chat.go index 6985c72..56722ab 100644 --- a/tmpl/chat.go +++ b/tmpl/chat.go @@ -2,7 +2,6 @@ package tmpl import ( "github.com/gin-gonic/gin" - "github.com/taoshihan1991/imaptool/config" "net/http" ) @@ -10,7 +9,6 @@ import ( func PageChat(c *gin.Context) { kefuId := c.Query("kefu_id") lang, _ := c.Get("lang") - language := config.CreateLanguage(lang.(string)) refer := c.Query("refer") if refer == "" { refer = c.Request.Referer() @@ -20,7 +18,6 @@ func PageChat(c *gin.Context) { } c.HTML(http.StatusOK, "chat_page.html", gin.H{ "KEFU_ID": kefuId, - "SendBtn": language.Send, "Lang": lang.(string), "Refer": refer, }) diff --git a/tmpl/common.go b/tmpl/common.go index d7b5435..6051d98 100644 --- a/tmpl/common.go +++ b/tmpl/common.go @@ -2,7 +2,6 @@ package tmpl import ( "github.com/gin-gonic/gin" - "github.com/taoshihan1991/imaptool/config" "github.com/taoshihan1991/imaptool/models" "github.com/taoshihan1991/imaptool/tools" "html" @@ -53,7 +52,6 @@ func PageIndex(c *gin.Context) { c.Redirect(302, "/install") } lang, _ := c.Get("lang") - language := config.CreateLanguage(lang.(string)) about := models.FindAboutByPageLanguage("index", lang.(string)) cssJs := html.UnescapeString(about.CssJs) title := about.TitleCn @@ -67,16 +65,12 @@ func PageIndex(c *gin.Context) { content = html.UnescapeString(about.HtmlEn) } c.HTML(http.StatusOK, "index.html", gin.H{ - "OnlineChat": language.IndexOnlineChat, - "Notice": language.Notice, - "NowAsk": language.NowAsk, - "LaterAsk": language.LaterAsk, - "Lang": lang, - "Title": title, - "Keywords": keywords, - "Desc": desc, - "Content": template.HTML(content), - "CssJs": template.HTML(cssJs), + "Lang": lang, + "Title": title, + "Keywords": keywords, + "Desc": desc, + "Content": template.HTML(content), + "CssJs": template.HTML(cssJs), }) }