| func (m crmdLead) getBasicUserInfoPhoto() (ret sendNewsArticle) { | func (m crmdLead) getBasicUserInfoPhoto() (ret sendNewsArticle) { | ||||
| a := sendNewsArticle{} | a := sendNewsArticle{} | ||||
| a.Description = "" | a.Description = "" | ||||
| a.PicURL = m.avatarCacheURL() | |||||
| a.PicURL = m.AvatarCacheURL() | |||||
| a.Title = m.Name | a.Title = m.Name | ||||
| a.URL = m.avatarCacheURL() | |||||
| a.URL = m.AvatarCacheURL() | |||||
| log.Println(a.URL) | log.Println(a.URL) | ||||
| return a | return a | ||||
| } | } | ||||
| a.Description = "" | a.Description = "" | ||||
| a.PicURL = "" | a.PicURL = "" | ||||
| a.Title = "点击这里编辑您的资料" | a.Title = "点击这里编辑您的资料" | ||||
| a.URL = "https://google.com.au" | |||||
| a.URL = "http://192.168.1.39:65500/spa/editprofile" | |||||
| return a | return a | ||||
| } | } |
| package main | |||||
| import ( | |||||
| "html/template" | |||||
| "io/ioutil" | |||||
| "log" | |||||
| "net/http" | |||||
| ) | |||||
| func spaEditProfile(w http.ResponseWriter, r *http.Request) { | |||||
| tTest := template.New("spaEditProfile") | |||||
| str, err := ioutil.ReadFile("spa/edit.html") | |||||
| log.Println(string(str)) | |||||
| log.Println(err) | |||||
| tTest, err = tTest.Parse(string(str)) | |||||
| log.Println(err) | |||||
| id := "595a323d4d639d84d" | |||||
| lead, err := crmGetLead(id) | |||||
| log.Println(err) | |||||
| err = tTest.Execute(w, lead) | |||||
| log.Println(err) | |||||
| //http.ServeFile(w, r, "spa/edit.html") | |||||
| } |