소스 검색

adapt to exported AvatarCacheURL function.

master
Patrick Peng Sun 8 년 전
부모
커밋
d21caded6f
2개의 변경된 파일28개의 추가작업 그리고 3개의 파일을 삭제
  1. +3
    -3
      procGetBasicUserInfo.go
  2. +25
    -0
      spaEdit.go

+ 3
- 3
procGetBasicUserInfo.go 파일 보기

@@ -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 파일 보기

@@ -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")

}

Loading…
취소
저장