1
This commit is contained in:
@@ -23,10 +23,10 @@ func init() {
|
||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_hGnQOvCSkfrCOXFLHA1NMQ")
|
||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_n49KrTnbe-Qatd-80sFOnQ")
|
||||
//cookieStr := `
|
||||
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
//`
|
||||
@@ -53,7 +53,7 @@ func TestGetOAuthCode(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPreparationMealComplete(t *testing.T) {
|
||||
api.PreparationMealComplete(900658760944919842)
|
||||
api.PreparationMealComplete(3901564910320888932)
|
||||
}
|
||||
|
||||
func TestGetAccessToken(t *testing.T) {
|
||||
|
||||
@@ -31,7 +31,7 @@ func getTimeFromTimestamp(timeStamp int64) time.Time {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail(2001521861299113073, false)
|
||||
result, err := api.OrderGetOrderDetail(5401564660946475322, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -24,16 +25,30 @@ func TestPoiGetIDs(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test1111(t *testing.T) {
|
||||
result, err := api.PoiMGet([]string{"17821732"})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
storeIds := []int64{
|
||||
12524795,
|
||||
}
|
||||
for _, v := range result {
|
||||
if strings.Contains(v.Name, "京西") {
|
||||
data := fmt.Sprintf("%s %s ", v.AppPoiCode, v.Name) + fmt.Sprintf("<table><img src=%s height=100 width=100></table>", v.PicURL)
|
||||
fmt.Println(data)
|
||||
|
||||
for k, v := range storeIds {
|
||||
result, err := api.PoiMGet([]string{utils.Int64ToStr(v)})
|
||||
if err != nil {
|
||||
fmt.Println(k)
|
||||
continue
|
||||
}
|
||||
if result == nil || len(result) == 0 {
|
||||
fmt.Println(k)
|
||||
continue
|
||||
}
|
||||
for _, v2 := range result {
|
||||
if strings.Contains(v2.Name, "京西") {
|
||||
fmt.Println(fmt.Sprintf("<table><img src=%s height=100 width=100></table>", v2.PicURL))
|
||||
} else {
|
||||
fmt.Println(k)
|
||||
}
|
||||
}
|
||||
time.Sleep(200 * time.Microsecond)
|
||||
}
|
||||
|
||||
}
|
||||
func TestPoiMGet(t *testing.T) {
|
||||
result, err := api.PoiMGet([]string{"17821732"})
|
||||
|
||||
Reference in New Issue
Block a user