diff --git a/server.go b/server.go index e892a04..1fb8f71 100644 --- a/server.go +++ b/server.go @@ -53,6 +53,9 @@ func main() { engine.GET("/setting", tmpl.PageSetting) //设置mysql engine.GET("/setting_mysql", tmpl.PageSettingMysql) + //网页部署 + engine.GET("/setting_deploy", tmpl.PageSettingDeploy) + engine.GET("/mysql",middleware.JwtApiMiddleware,middleware.CasbinACL, controller.MysqlGetConf) engine.POST("/mysql",middleware.JwtApiMiddleware,middleware.CasbinACL, controller.MysqlSetConf) engine.GET("/visitor",middleware.JwtApiMiddleware, controller.GetVisitor) diff --git a/static/html/setting_bottom.html b/static/html/setting_bottom.html index 60d2a52..f688e1b 100644 --- a/static/html/setting_bottom.html +++ b/static/html/setting_bottom.html @@ -142,7 +142,7 @@ _this.mysql.port=result.Port; }); } - if(ACTION=="setting_kefu_list"){ + if(ACTION=="setting_kefu_list"||ACTION=="setting_deploy"){ this.sendAjax("/kefulist","get",{},function(result){ _this.kefuList=result; }); @@ -229,6 +229,14 @@ _this.kefuList=result; }); }); + }, + //生成部署js + createDeployJs(){ + let domain=window.location.host; + this.$alert('