parent
6541df948f
commit
add3f563ea
@ -0,0 +1,11 @@
|
|||||||
|
package controller
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/taoshihan1991/imaptool/tmpl"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
//聊天主界面
|
||||||
|
func ActionChatMain(w http.ResponseWriter, r *http.Request){
|
||||||
|
render:=tmpl.NewRender(w)
|
||||||
|
render.Display("chat_main",nil)
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package tmpl
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
type FolderHtml struct {
|
||||||
|
*CommonHtml
|
||||||
|
CurrentPage int
|
||||||
|
Fid string
|
||||||
|
}
|
||||||
|
func NewFolderHtml(w http.ResponseWriter)*FolderHtml{
|
||||||
|
obj:=new(FolderHtml)
|
||||||
|
parent:=NewRender(w)
|
||||||
|
obj.CommonHtml=parent
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package tmpl
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/taoshihan1991/imaptool/tools"
|
|
||||||
"html/template"
|
|
||||||
"net/http"
|
|
||||||
)
|
|
||||||
|
|
||||||
func RenderList(w http.ResponseWriter, render interface{}) {
|
|
||||||
header := tools.FileGetContent("html/header.html")
|
|
||||||
html := tools.FileGetContent("html/list.html")
|
|
||||||
t, _ := template.New("list").Parse(html)
|
|
||||||
render.(*tools.IndexData).Header=template.HTML(header)
|
|
||||||
t.Execute(w, render)
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in new issue