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 @@