|
|
@ -54,15 +54,8 @@ func index(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
|
|
|
|
//输出列表
|
|
|
|
//输出列表
|
|
|
|
func list(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func list(w http.ResponseWriter, r *http.Request) {
|
|
|
|
values := r.URL.Query()
|
|
|
|
fid:=tools.GetUrlArg(r,"fid")
|
|
|
|
fid := ""
|
|
|
|
currentPage, _ :=strconv.Atoi(tools.GetUrlArg(r,"page"))
|
|
|
|
currentPage := 0
|
|
|
|
|
|
|
|
if len(values["fid"]) != 0 {
|
|
|
|
|
|
|
|
fid = values["fid"][0]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(values["page"]) != 0 {
|
|
|
|
|
|
|
|
currentPage, _ = strconv.Atoi(values["page"][0])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if fid == "" {
|
|
|
|
if fid == "" {
|
|
|
|
fid = "INBOX"
|
|
|
|
fid = "INBOX"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -77,26 +70,14 @@ func list(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
|
|
|
|
//详情界面
|
|
|
|
//详情界面
|
|
|
|
func view(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func view(w http.ResponseWriter, r *http.Request) {
|
|
|
|
values := r.URL.Query()
|
|
|
|
fid:=tools.GetUrlArg(r,"fid")
|
|
|
|
fid := ""
|
|
|
|
id, _ :=strconv.Atoi(tools.GetUrlArg(r,"id"))
|
|
|
|
if len(values["fid"]) != 0 {
|
|
|
|
|
|
|
|
fid = values["fid"][0]
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
fid = "INBOX"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var id uint32
|
|
|
|
|
|
|
|
if len(values["id"]) != 0 {
|
|
|
|
|
|
|
|
i, _ := strconv.Atoi(values["id"][0])
|
|
|
|
|
|
|
|
id = uint32(i)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
id = 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//mailServer:=tools.GetMailServerFromCookie(r)
|
|
|
|
//mailServer:=tools.GetMailServerFromCookie(r)
|
|
|
|
//var wg sync.WaitGroup
|
|
|
|
//var wg sync.WaitGroup
|
|
|
|
var render = new(tools.ViewData)
|
|
|
|
var render = new(tools.ViewData)
|
|
|
|
render.Fid = fid
|
|
|
|
render.Fid = fid
|
|
|
|
render.Id = id
|
|
|
|
render.Id = uint32(id)
|
|
|
|
//wg.Add(1)
|
|
|
|
//wg.Add(1)
|
|
|
|
//go func() {
|
|
|
|
//go func() {
|
|
|
|
// defer wg.Done()
|
|
|
|
// defer wg.Done()
|
|
|
|