This commit is contained in:
邹宗楠
2023-04-06 18:25:24 +08:00
parent 18572ce050
commit 88e7b96fec
10 changed files with 457 additions and 18 deletions

View File

@@ -20,13 +20,13 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
// api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw
api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw
cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
`
@@ -60,7 +60,7 @@ func TestGetAccessToken(t *testing.T) {
}
func TestGetAccessToken2(t *testing.T) {
result, err := api.GetAccessToken2("16708848") //refresh_token_pLG7Jw7g9mu7oOzNSuJIUg
result, err := api.GetAccessToken2("17371124") //refresh_token_pLG7Jw7g9mu7oOzNSuJIUg
if err != nil {
t.Fatal(err)
}
@@ -69,7 +69,7 @@ func TestGetAccessToken2(t *testing.T) {
}
func TestRefreshAccessToken(t *testing.T) {
result, err := api.RefreshAccessToken("refresh_token_jOp7ekeHrzjBUvLdVuZHIg") //token_qbAyE3ajWYT8ecwoI-FMjw
result, err := api.RefreshAccessToken("refresh_token_jajfdTMzYvB28v-3q4RFgQ") //token_qbAyE3ajWYT8ecwoI-FMjw
if err != nil {
t.Fatal(err)
}