From 6cb51f5b70045ade372583e72ae48d783496a162 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Wed, 27 May 2020 19:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E6=9D=BF=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.go | 4 +- static/html/nav.html | 9 ++++ static/html/view.html | 67 +----------------------------- static/html/write.html | 93 ++++++++++++++++++++++++++---------------- tmpl/common.go | 27 ++++++++++++ tmpl/index.go | 8 +--- tmpl/view.go | 82 +++++-------------------------------- tmpl/write.go | 9 ++++ tools/types.go | 1 + 9 files changed, 119 insertions(+), 181 deletions(-) create mode 100644 static/html/nav.html create mode 100644 tmpl/common.go create mode 100644 tmpl/write.go diff --git a/server.go b/server.go index b107822..c4d0294 100644 --- a/server.go +++ b/server.go @@ -80,7 +80,7 @@ func view(w http.ResponseWriter, r *http.Request) { // //mailServer:=tools.GetMailServerFromCookie(r) //var wg sync.WaitGroup - var render = new(tools.ViewData) + var render = new(tmpl.ViewHtml) render.Fid = fid render.Id = uint32(id) //wg.Add(1) @@ -110,7 +110,7 @@ func login(w http.ResponseWriter, r *http.Request) { } //写信界面 func write(w http.ResponseWriter, r *http.Request) { - render:=new(tools.ViewHtml) + render:=new(tmpl.CommonHtml) tmpl.RenderWrite(w, render) } //验证接口 diff --git a/static/html/nav.html b/static/html/nav.html new file mode 100644 index 0000000..8d37479 --- /dev/null +++ b/static/html/nav.html @@ -0,0 +1,9 @@ + + + 收信 + + 写信 + 退出 + \ No newline at end of file diff --git a/static/html/view.html b/static/html/view.html index 8585e46..62fb161 100644 --- a/static/html/view.html +++ b/static/html/view.html @@ -1,71 +1,8 @@ - - - - - - - GO-IMAP网页版邮箱imap工具 - - - - - - - - +{{.Header}}