准备客服管理

pull/30/head
taoshihan1991 4 years ago
parent 1c08303e13
commit f7be76dd92

@ -51,6 +51,7 @@ func main() {
engine.POST("/mysql",middleware.JwtApiMiddleware,middleware.CasbinACL, controller.MysqlSetConf) engine.POST("/mysql",middleware.JwtApiMiddleware,middleware.CasbinACL, controller.MysqlSetConf)
engine.GET("/visitor",middleware.JwtApiMiddleware, controller.GetVisitor) engine.GET("/visitor",middleware.JwtApiMiddleware, controller.GetVisitor)
engine.GET("/visitors",middleware.JwtApiMiddleware, controller.GetVisitors) engine.GET("/visitors",middleware.JwtApiMiddleware, controller.GetVisitors)
engine.GET("/setting_kefu_list",tmpl.PageKefuList)
//------------------old code----------------------------- //------------------old code-----------------------------
mux := &http.ServeMux{} mux := &http.ServeMux{}
//根路径 //根路径

@ -65,6 +65,7 @@
<body> <body>
<div id="app"> <div id="app">
<template> <template>
<el-container v-loading.fullscreen.lock="fullscreenLoading">
<el-row :gutter="2"> <el-row :gutter="2">
<el-col :span="6"> <el-col :span="6">
<div class="chatBg chatLeft"> <div class="chatBg chatLeft">
@ -142,6 +143,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-container>
</template> </template>
</div> </div>
</body> </body>
@ -348,9 +350,9 @@
type: 'error' type: 'error'
}); });
} }
_this.fullscreenLoading=false;
} }
}).then(function(data){ }).then(function(data){
}); });
}, },
//获取客服信息 //获取客服信息

@ -1,4 +1,7 @@
{{define "setting_bottom"}} {{define "setting_bottom"}}
<script>
var ACTION="{{.action}}";
</script>
<script> <script>
var app=new Vue({ var app=new Vue({
el: '#app', el: '#app',
@ -112,8 +115,8 @@
}, },
//初始化数据 //初始化数据
initInfo(){ initInfo(){
{{if eq .action "setting_mysql"}}
let _this=this; let _this=this;
if(ACTION=="setting_mysql"){
$.ajax({ $.ajax({
type:"get", type:"get",
url:"/mysql", url:"/mysql",
@ -134,14 +137,18 @@
type: 'error' type: 'error'
}); });
} }
_this.fullscreenLoading=false;
} }
}); });
}
{{end}}
} }
}, },
created: function () { created: function () {
if(ACTION=="setting"){
this.showNotice(); this.showNotice();
}
this.initInfo(); this.initInfo();
} }
}) })

@ -0,0 +1,18 @@
{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-container v-loading.fullscreen.lock="fullscreenLoading">
<el-aside>
{{template "setting_left" .}}
</el-aside>
<el-main class="mainMain">
ss
</el-main>
</el-container>
</template>
</div>
</body>
{{template "setting_bottom" .}}

@ -3,13 +3,23 @@
<el-submenu index="1"> <el-submenu index="1">
<template slot="title"> <template slot="title">
<i class="el-icon-s-custom"></i> <i class="el-icon-s-custom"></i>
<span>账户中心</span> <span>账户设置</span>
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<el-menu-item index="1-1">设置smtp</el-menu-item> <el-menu-item index="1-1" v-on:click="">智能回复</el-menu-item>
<el-menu-item index="1-2">设置imap</el-menu-item> <el-menu-item index="1-2" v-on:click="openUrl('/setting_kefu_list')">客服管理</el-menu-item>
<el-menu-item index="1-3" v-on:click="openUrl('/setting')">设置登陆账号</el-menu-item> </el-menu-item-group>
<el-menu-item index="1-4" v-on:click="openUrl('/setting_mysql')">设置mysql</el-menu-item> </el-submenu>
<el-submenu index="2">
<template slot="title">
<i class="el-icon-s-tools"></i>
<span>系统设置</span>
</template>
<el-menu-item-group>
<el-menu-item index="2-1">设置smtp</el-menu-item>
<el-menu-item index="2-2">设置imap</el-menu-item>
<el-menu-item index="2-3" v-on:click="openUrl('/setting')">设置登陆账号</el-menu-item>
<el-menu-item index="2-4" v-on:click="openUrl('/setting_mysql')">设置mysql</el-menu-item>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
</el-menu> </el-menu>

@ -7,17 +7,23 @@ import (
//设置界面 //设置界面
func PageSetting(c *gin.Context) { func PageSetting(c *gin.Context) {
c.HTML(http.StatusOK, "setting.html", gin.H{ c.HTML(http.StatusOK, "setting.html", gin.H{
"tab_index":"1-3", "tab_index":"2-3",
"action":"setting", "action":"setting",
}) })
} }
//设置mysql //设置mysql
func PageSettingMysql(c *gin.Context) { func PageSettingMysql(c *gin.Context) {
c.HTML(http.StatusOK, "setting_mysql.html", gin.H{ c.HTML(http.StatusOK, "setting_mysql.html", gin.H{
"tab_index":"1-4", "tab_index":"2-4",
"action":"setting_mysql", "action":"setting_mysql",
}) })
} }
func PageKefuList(c *gin.Context) {
c.HTML(http.StatusOK, "setting_kefu_list.html", gin.H{
"tab_index":"1-2",
"action":"setting_kefu_list",
})
}
type SettingHtml struct { type SettingHtml struct {
*CommonHtml *CommonHtml
Username, Password string Username, Password string

Loading…
Cancel
Save