Ver código fonte

adapt to exported AvatarCacheURL function.

master
Patrick Peng Sun 8 anos atrás
pai
commit
d21caded6f
2 arquivos alterados com 28 adições e 3 exclusões
  1. +3
    -3
      procGetBasicUserInfo.go
  2. +25
    -0
      spaEdit.go

+ 3
- 3
procGetBasicUserInfo.go Ver arquivo

@@ -64,9 +64,9 @@ func (m *getBasicUserInfoDef) intro(ss *openIDSessionData, in *InWechatMsg) {
func (m crmdLead) getBasicUserInfoPhoto() (ret sendNewsArticle) {
a := sendNewsArticle{}
a.Description = ""
a.PicURL = m.avatarCacheURL()
a.PicURL = m.AvatarCacheURL()
a.Title = m.Name
a.URL = m.avatarCacheURL()
a.URL = m.AvatarCacheURL()
log.Println(a.URL)
return a
}
@@ -102,6 +102,6 @@ func (m crmdLead) getBasicUserInfoEditButton() (ret sendNewsArticle) {
a.Description = ""
a.PicURL = ""
a.Title = "点击这里编辑您的资料"
a.URL = "https://google.com.au"
a.URL = "http://192.168.1.39:65500/spa/editprofile"
return a
}

+ 25
- 0
spaEdit.go Ver arquivo

@@ -0,0 +1,25 @@
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")

}

Carregando…
Cancelar
Salvar