From ea9d8fc4574fa080ea2404bbf0ee45429a30c7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B6=E5=A3=AB=E6=B6=B5?= <630892807@qq.com> Date: Thu, 28 May 2020 22:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/main.go | 10 ++++++++++ controller/setting.go | 11 +++++++++++ server.go | 6 ++++++ static/html/header.html | 4 ++++ static/html/list.html | 9 --------- static/html/main.html | 28 +++++++++++++++++++++++++++ static/html/nav.html | 11 ++++++----- static/html/setting.html | 41 ++++++++++++++++++++++++++++++++++++++++ static/html/view.html | 1 - static/html/write.html | 1 - 10 files changed, 106 insertions(+), 16 deletions(-) create mode 100644 controller/main.go create mode 100644 controller/setting.go create mode 100644 static/html/main.html create mode 100644 static/html/setting.html diff --git a/controller/main.go b/controller/main.go new file mode 100644 index 0000000..1ed26ce --- /dev/null +++ b/controller/main.go @@ -0,0 +1,10 @@ +package controller + +import ( + "github.com/taoshihan1991/imaptool/tmpl" + "net/http" +) +func ActionMain(w http.ResponseWriter, r *http.Request){ + render:=tmpl.NewRender(w) + render.Display("main",render) +} diff --git a/controller/setting.go b/controller/setting.go new file mode 100644 index 0000000..767286c --- /dev/null +++ b/controller/setting.go @@ -0,0 +1,11 @@ +package controller + +import ( + "github.com/taoshihan1991/imaptool/tmpl" + "net/http" +) + +func ActionSetting(w http.ResponseWriter, r *http.Request){ + render:=tmpl.NewRender(w) + render.Display("setting",render) +} diff --git a/server.go b/server.go index c4d0294..f24a301 100644 --- a/server.go +++ b/server.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "fmt" + "github.com/taoshihan1991/imaptool/controller" "github.com/taoshihan1991/imaptool/tmpl" "github.com/taoshihan1991/imaptool/tools" "io/ioutil" @@ -32,6 +33,10 @@ func main() { http.HandleFunc("/view", view) //写信界面 http.HandleFunc("/write", write) + //框架界面 + http.HandleFunc("/main", controller.ActionMain) + //设置界面 + http.HandleFunc("/setting", controller.ActionSetting) //发送邮件接口 http.HandleFunc("/send", send) //监听端口 @@ -113,6 +118,7 @@ func write(w http.ResponseWriter, r *http.Request) { render:=new(tmpl.CommonHtml) tmpl.RenderWrite(w, render) } + //验证接口 func check(w http.ResponseWriter, r *http.Request) { email := r.PostFormValue("email") diff --git a/static/html/header.html b/static/html/header.html index 8b8854d..9cef85c 100644 --- a/static/html/header.html +++ b/static/html/header.html @@ -41,6 +41,10 @@ margin-left: 10px; margin-bottom: 60px; } + .mainIframe{ + width: 100%; + height: 100%; + } .el-card__body{ cursor: pointer; } diff --git a/static/html/list.html b/static/html/list.html index ffcca5b..1ad8e9f 100644 --- a/static/html/list.html +++ b/static/html/list.html @@ -2,15 +2,6 @@