|
@@ -4,7 +4,6 @@ import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
"io/ioutil"
|
|
|
- "log"
|
|
|
"net/http"
|
|
|
"qfw/util"
|
|
|
"strconv"
|
|
@@ -67,14 +66,14 @@ func weixinOauth(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
start, end := strings.LastIndex(uri, "/"), strings.Index(uri, "?")
|
|
|
action := uri[start+1 : end]
|
|
|
- log.Println("action", action)
|
|
|
+ //log.Println("action", action)
|
|
|
//
|
|
|
r.ParseForm()
|
|
|
code, _ := r.Form["code"][0], r.Form["state"][0]
|
|
|
|
|
|
//取得openid
|
|
|
url := fmt.Sprintf(OPENAUTH_URLTPL, AppId, AppSecret, code)
|
|
|
- log.Println("request url:", url)
|
|
|
+ //log.Println("request url:", url)
|
|
|
resp, err := http.Get(url)
|
|
|
defer resp.Body.Close()
|
|
|
if err == nil {
|