diff --git a/static/html/chat.html b/static/html/chat.html new file mode 100644 index 0000000..1484000 --- /dev/null +++ b/static/html/chat.html @@ -0,0 +1,21 @@ + + + + + + + 聊天界面 + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/static/html/login.html b/static/html/login.html index b399bb3..b5a1622 100644 --- a/static/html/login.html +++ b/static/html/login.html @@ -4,7 +4,7 @@ - GO-IMAP网页版邮箱imap工具登录页 + GO-FLY登录页 @@ -30,11 +30,11 @@ padding-bottom: 40px; background-color: #f5f5f5; } - .form-signin { + .signin { width: 100%; max-width: 400px; padding: 20px; - margin: auto; + margin:0 auto; background: #fff; -webkit-box-shadow: 0 1px 2px 0 rgba(101,129,156,.08); box-shadow: 0 1px 2px 0 rgba(101,129,156,.08); @@ -43,24 +43,42 @@ -
+
@@ -69,6 +87,8 @@ new Vue({ el: '#app', data: { + window:window, + activeName:"first", loading:false, ruleForm:{ server:'', diff --git a/tools/imap.go b/tools/imap.go index a35ec1e..e83597c 100644 --- a/tools/imap.go +++ b/tools/imap.go @@ -166,7 +166,7 @@ func GetMessage(server string, email string, password string, folder string, id seqSet.AddNum(id) // Get the whole message body - var section imap.BodySectionName + section:= &imap.BodySectionName{} items := []imap.FetchItem{section.FetchItem()} messages := make(chan *imap.Message, 1) @@ -181,23 +181,21 @@ func GetMessage(server string, email string, password string, folder string, id log.Fatal("Server didn't returned message") } - r := msg.GetBody(§ion) + r := msg.GetBody(section) + if r == nil { log.Fatal("Server didn't returned message body") } var mailitem = new(MailItem) // Create a new mail reader - mr, err := mail.CreateReader(r) + mr, _ := mail.CreateReader(r) - if err != nil { - return mailitem - } // Print some info about the message header := mr.Header date, _ := header.Date() - log.Println("Date:", date) + mailitem.Date = date.String() var f string