pull/23/head
630892807@qq.com 4 years ago
commit 7e14c092c6

@ -143,7 +143,32 @@ PRIMARY KEY (`id`),
UNIQUE KEY `page` (`page`) UNIQUE KEY `page` (`page`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8| ) ENGINE=InnoDB DEFAULT CHARSET=utf8|
INSERT INTO `about` (`id`, `title_cn`, `title_en`, `keywords_cn`, `keywords_en`, `desc_cn`, `desc_en`, `css_js`, `html_cn`, `html_en`, `page`) VALUES INSERT INTO `about` (`id`, `title_cn`, `title_en`, `keywords_cn`, `keywords_en`, `desc_cn`, `desc_en`, `css_js`, `html_cn`, `html_en`, `page`) VALUES
(NULL, '免费开源客服系统GOFLY0.3.6-演示页', 'Free Customer Live Chat GOFLY0.3.6-demo', 'GOFLYGO-FLY', 'GOFLYGO-FLY', '一款开箱即用的在线客服系统', 'HELLO GOFLY LIVE CHAT !', '<style>body{color: #333;padding-left: 40px;}h1{font-size: 6em;}h2{font-size: 3em;font-weight: normal;}a{color: #333;}</style>','<h1>:)</h1><h2>HELLO <a href="https://gofly.sopans.com">GOFLY</a> LIVE CHAT !</h2><h3><a href="/login">Administrator</a>&nbsp;<a href="/index_en">English</a>&nbsp;<a href="/index_cn">中文</a></h3>','<h1>:)</h1><h2>HELLO <a href="https://gofly.sopans.com">GOFLY</a> LIVE CHAT !</h2><h3><a href="/login">Administrator</a>&nbsp;<a href="/index_en">English</a>&nbsp;<a href="/index_cn">中文</a></h3>','index')| (NULL, '免费开源客服系统GOFLY0.3.7-演示页',
'Free Customer Live Chat GOFLY0.3.7-demo',
'GOFLYGO-FLY',
'GOFLYGO-FLY',
'一款开箱即用的在线客服系统',
'a free customer live chat',
'<style>body{color: #333;padding-left: 40px;}h1{font-size: 6em;}h2{font-size: 3em;font-weight: normal;}a{color: #333;}</style>',
'<script src="/static/js/gofly-front.js?v=1"></script><script>
GOFLY.init({
GOFLY_URL:"",
GOFLY_KEFU_ID: "kefu2",
GOFLY_BTN_TEXT: "GOFLY 在线客服!",
GOFLY_LANG:"cn",
})
</script>
<h1>:)</h1><h2> <a href="https://gofly.sopans.com">GOFLY0.3.7</a> 线 !</h2><h3><a href="/login">Administrator</a>&nbsp;<a href="/index_en">English</a>&nbsp;<a href="/index_cn"></a></h3>',
'<script src="/static/js/gofly-front.js?v=1"></script><script>
GOFLY.init({
GOFLY_URL:"",
GOFLY_KEFU_ID: "kefu2",
GOFLY_BTN_TEXT: "GOFLY LIVE CHAT!",
GOFLY_LANG:"en",
})
</script>
<h1>:)</h1><h2>HELLO <a href="https://gofly.sopans.com">GOFLY0.3.7</a> LIVE CHAT !</h2><h3><a href="/login">Administrator</a>&nbsp;<a href="/index_en">English</a>&nbsp;<a href="/index_cn"></a></h3>',
'index')|
DROP TABLE IF EXISTS `reply_group`| DROP TABLE IF EXISTS `reply_group`|
CREATE TABLE `reply_group` ( CREATE TABLE `reply_group` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
@ -152,6 +177,7 @@ CREATE TABLE `reply_group` (
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `user_id` (`user_id`) KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8| ) ENGINE=InnoDB DEFAULT CHARSET=utf8|
INSERT INTO `reply_group` (`id`, `group_name`, `user_id`) VALUES (NULL, '常见问题', 'kefu2')|
DROP TABLE IF EXISTS `reply_item`| DROP TABLE IF EXISTS `reply_item`|
CREATE TABLE `reply_item` ( CREATE TABLE `reply_item` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
@ -163,6 +189,7 @@ CREATE TABLE `reply_item` (
KEY `user_id` (`user_id`), KEY `user_id` (`user_id`),
KEY `group_id` (`group_id`) KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8| ) ENGINE=InnoDB DEFAULT CHARSET=utf8|
INSERT INTO `reply_item` (`id`, `content`, `group_id`, `user_id`, `item_name`) VALUES (NULL, '在这里[官网]link[https://gofly.sopans.com]!','1','kefu2', '官方地址在哪?')|
DROP TABLE IF EXISTS `land_page`| DROP TABLE IF EXISTS `land_page`|
CREATE TABLE `land_page` ( CREATE TABLE `land_page` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,

@ -27,6 +27,4 @@ func InitViewRouter(engine *gin.Engine) {
engine.GET("/setting_config", tmpl.PageConfig) engine.GET("/setting_config", tmpl.PageConfig)
engine.GET("/mail_list", tmpl.PageMailList) engine.GET("/mail_list", tmpl.PageMailList)
engine.GET("/roles_list", tmpl.PageRoleList) engine.GET("/roles_list", tmpl.PageRoleList)
engine.GET("/webjs", tmpl.PageWebJs)
engine.GET("/webcss", tmpl.PageWebCss)
} }

@ -1,5 +0,0 @@
.chatBtn{
position: fixed;
right: 10px;
bottom: 10px;
}

@ -1,54 +0,0 @@
var loadJs=function(url,callback){
var script = document.createElement('script'), fn = callback || function(){};
script.type = 'text/javascript';
if(script.readyState){
script.onreadystatechange = function(){
if( script.readyState == 'loaded' || script.readyState == 'complete' ){
script.onreadystatechange = null;
fn();
}
};
}else{
script.onload = function(){
fn();
};
}
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
};
loadJs("https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js",function(){
loadJs("https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js" ,function () {
$(function () {
var goflyKefuId="";
if(typeof GOFLY_KEFU_ID!="undefined"){
var goflyKefuId=GOFLY_KEFU_ID;
}
var div =document.createElement('div');
div.id ='goflyKefu';
div.className +='goflyKefu';
document.body.appendChild(div);
var w =document.getElementById('goflyKefu');
w.innerHTML='<div style="border-radius:5px;position: fixed;right: 10px;bottom: 10px;background: #66b1ff;padding: 10px 30px;color: #fff;cursor: pointer;">在线咨询</div>';
$("#goflyKefu").click(function () {
$("#goflyKefu").hide();
layer.open({
type: 2,
title: '在线咨询',
shadeClose: true,
shade: false,
maxmin: true,
area: ['660px', '600px'],
content: ['http://gofly.sopans.com/chat_page?kefu_id='+goflyKefuId,'no'],
end: function(){
$("#goflyKefu").show();
}
});
});
//END
})
});
});

@ -1,4 +1,3 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -8,28 +7,9 @@
<title>{{.Title}}</title> <title>{{.Title}}</title>
<meta name="keywords" content="{{.Keywords}}" /> <meta name="keywords" content="{{.Keywords}}" />
<meta name="description" content="{{.Desc}}" /> <meta name="description" content="{{.Desc}}" />
{{.CssJs}} {{.CssJs}}
</head> </head>
<body> <body>
{{.Content}} {{.Content}}
<!--对接客服代码,安装完成后更改成自己的域名或IP下面js文件路径以及GOFLY_URL都要改-->
<script src="/static/js/gofly-front.js?v=1"></script>
<script>
GOFLY.init({
GOFLY_URL:"",
GOFLY_KEFU_ID: "kefu2",
GOFLY_BTN_TEXT: "{{.OnlineChat}}",
GOFLY_LANG:"{{.Lang}}",
GOFLY_AUTO_OPEN:true,
})
</script>
<!--//对接客服代码-->
</body> </body>
</html> </html>

@ -45,15 +45,6 @@ func PageSettingDeploy(c *gin.Context) {
}) })
} }
//前台js部署
func PageWebJs(c *gin.Context) {
c.HTML(http.StatusOK, "chat_web.js", nil)
}
//前台css部署
func PageWebCss(c *gin.Context) {
c.HTML(http.StatusOK, "chat_web.css", nil)
}
func PageKefuList(c *gin.Context) { func PageKefuList(c *gin.Context) {
c.HTML(http.StatusOK, "setting_kefu_list.html", gin.H{ c.HTML(http.StatusOK, "setting_kefu_list.html", gin.H{
"tab_index": "3-2", "tab_index": "3-2",

Loading…
Cancel
Save