Commit ad2d45e8 by yemin

no message

parent 2eb7aa7e
package auth
package smapro
import (
"encoding/json"
......
package phonenumber
package smapro
import (
"encoding/json"
......@@ -44,4 +44,4 @@ type PhoneInfoResponse struct {
type WatermarkResponse struct {
Timestamp int32 `json:"timestamp"`
Appid string `json:"appid"`
}
\ No newline at end of file
}
......@@ -2,27 +2,26 @@ package test
import (
"fmt"
"git.168cad.top/go/wechat-client-sdk/miniprogram/auth"
"git.168cad.top/go/wechat-client-sdk/miniprogram/phonenumber"
"git.168cad.top/go/wechat-client-sdk/smapro"
"log"
"testing"
)
func TestCode2Session(t *testing.T) {
r,err:=auth.Code2Session("033DEr0w36huoZ2Ga22w3wXeTR1DEr0g","","")
r,err:=smapro.Code2Session("033DEr0w36huoZ2Ga22w3wXeTR1DEr0g","","")
log.Println(err)
log.Println(fmt.Sprintf("%+v\n", *r))
}
func TestNewAccessToken(t *testing.T) {
r,err := auth.NewAccessToken("","")
r,err := smapro.NewAccessToken("","")
log.Println(err)
log.Println(fmt.Sprintf("%+v\n", *r))
}
func TestGetUserPhoneNumber(t *testing.T) {
accessToken := "61_uqRWPGxxveyZnFoqCsddx9uY5w6uTZtHckodV8sS80OKtEBKJHM1udwD8ImlOa8UXnO_o3A4Qi3cwNtBvoC_fXSFnmXzJaD1cw-dMwaRGoz7XxTLhxvAeA_Bou4TWqPAmXnmmTknNwe9mU3_PVPiAGAZFZ"
r,err := phonenumber.GetUserPhoneNumber("fa46d5412a1c7053de2f930a043fa92b4d253eb83ce4e23d0fe0304bef65ded1", accessToken)
r,err := smapro.GetUserPhoneNumber("fa46d5412a1c7053de2f930a043fa92b4d253eb83ce4e23d0fe0304bef65ded1", accessToken)
log.Println(err)
log.Println(fmt.Sprintf("%+v\n", *r))
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment