Browse Source

增加调试解析openid

master v0.3.1
guzeng 3 years ago
parent
commit
72a419de81
4 changed files with 6 additions and 3 deletions
  1. +2
    -0
      miniapp_openid.client.go
  2. +1
    -1
      send_subscribe_message.client_test.go
  3. +1
    -1
      send_uniform_message.client_test.go
  4. +2
    -1
      sign.go

+ 2
- 0
miniapp_openid.client.go View File

@ -2,6 +2,7 @@ package weixinrpc
import (
"encoding/json"
"log"
"strconv"
"time"
@ -71,6 +72,7 @@ func HandleMiniAppOpenid(res *Response) (*MiniAppOpenidRes, error) {
err = json.Unmarshal([]byte(res_data_de), &res_arr)
if err != nil {
log.Println(err, res_data_de)
return nil, err
}


+ 1
- 1
send_subscribe_message.client_test.go View File

@ -10,7 +10,7 @@ func Test_SendMiniSubscribeMessage(t *testing.T) {
site_id := "1101832"
appid := "wx7b72dc719ad1f6d3"
secret := "b8ae6d64605a963056ff067cceffefd2"
touser := "oDTib5GULMfLSGZcMz7vB2xToxG4"
touser := "osxVD5S0PAh82gyIXSiXCJzM_k6s"
temp_id := "0Qbw6nuzj3X4kvOqGbGgD-dlu06NF6u9_ZYIiw0TY4Y"
page := "pages/order/order"
miniprogram_state := ""


+ 1
- 1
send_uniform_message.client_test.go View File

@ -10,7 +10,7 @@ func Test_SendUniformMessage(t *testing.T) {
site_id := "1101832"
appid := "wx7b72dc719ad1f6d3"
secret := "b8ae6d64605a963056ff067cceffefd2"
touser := "oDTib5GULMfLSGZcMz7vB2xToxG4"
touser := "oDTib5GULMfLSGZcMz7vB2xToxG4" //"oDTib5KC5uX5rVivTnbK-sFkrC2Q" //
mp_appid := "wx056995d61ca222f5"
temp_id := "6xgj_65KivigMvwdJgiveR4wLXJLDpzsT2-hShczLmU"
url := ""


+ 2
- 1
sign.go View File

@ -5,6 +5,7 @@ import (
"encoding/hex"
"encoding/json"
"errors"
"log"
"strconv"
"strings"
"time"
@ -84,7 +85,7 @@ func HandleRes(res *Response) (*WxApiRes, error) {
//解密
res_data_de, err := GetOrgData(res)
log.Println("res_data_de", res_data_de)
if err != nil {
return nil, err
}


Loading…
Cancel
Save