From cf05552796b9753a0c6050aeaec2de85b0dd01ec Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Wed, 8 Jul 2020 19:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BD=91=E9=A1=B5=E9=83=A8?= =?UTF-8?q?=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.go | 3 +++ static/html/setting_bottom.html | 10 +++++++++- static/html/setting_deploy.html | 29 +++++++++++++++++++++++++++++ static/html/setting_left.html | 1 + tmpl/setting.go | 7 +++++++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 static/html/setting_deploy.html 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('