aa
This commit is contained in:
@@ -120,6 +120,7 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
||||
params := make(map[string]interface{})
|
||||
params["timestamp"] = time.Now().Unix()
|
||||
params["app_id"] = a.appID
|
||||
// params["access_token"] = "token_nH_IlcWQKAkZBqklwItNRw"
|
||||
params = utils.MergeMaps(params, bizParams)
|
||||
imgData := params[KeyImgData]
|
||||
if imgData != nil {
|
||||
|
||||
@@ -19,35 +19,13 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
// api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "")
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "")
|
||||
|
||||
// 果园
|
||||
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "")
|
||||
|
||||
// api.SetCookie("_lx_utm", "utm_source%3D60066")
|
||||
// api.SetCookie("_lxsdk", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E")
|
||||
// api.SetCookie("_lxsdk_cuid", "16b8c52943fc8-0f5c424b19a108-2d604637-3d10d-16b8c52943f24")
|
||||
// api.SetCookie("_lxsdk_s", "16b8c529302-353-107-d17%7C%7C11")
|
||||
// api.SetCookie("au_trace_key_net", "default")
|
||||
// api.SetCookie("cssVersion", "b05eaa31")
|
||||
// api.SetCookie("iuuid", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E")
|
||||
// api.SetCookie("mt_c_token", "2Q-NiXyFZ6UViMatiHdP86YpX2QAAAAAqAgAABf6QG4n-W8Zy_l_WLbUUKNmy238OkBp9Fx7rVcqZH6aod8hhhyB3JjfYkOv-7024A")
|
||||
// api.SetCookie("oops", "2Q-NiXyFZ6UViMatiHdP86YpX2QAAAAAqAgAABf6QG4n-W8Zy_l_WLbUUKNmy238OkBp9Fx7rVcqZH6aod8hhhyB3JjfYkOv-7024A")
|
||||
// api.SetCookie("openh5_uuid", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E")
|
||||
// api.SetCookie("showTopHeader", "show")
|
||||
// api.SetCookie("token", "2Q-NiXyFZ6UViMatiHdP86YpX2QAAAAAqAgAABf6QG4n-W8Zy_l_WLbUUKNmy238OkBp9Fx7rVcqZH6aod8hhhyB3JjfYkOv-7024A")
|
||||
// api.SetCookie("w_token", "2Q-NiXyFZ6UViMatiHdP86YpX2QAAAAAqAgAABf6QG4n-W8Zy_l_WLbUUKNmy238OkBp9Fx7rVcqZH6aod8hhhyB3JjfYkOv-7024A")
|
||||
// api.SetCookie("userFace", "")
|
||||
// api.SetCookie("userId", "69979334")
|
||||
// api.SetCookie("userName", "thepool")
|
||||
// api.SetCookie("uuid", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E")
|
||||
// api.SetCookie("wm_order_channel", "default")
|
||||
// api.SetCookie("w_utmz", "utm_campaign=(direct)&utm_source=5000&utm_medium=(none)&utm_content=(none)&utm_term=(none)")
|
||||
// api.SetCookie("w_visitid", "c2d0e4c9-3ab8-4163-b94f-a3dbfd9d7a94")
|
||||
// api.SetCookie("w_actual_lng", "104076656")
|
||||
// api.SetCookie("w_actual_lat", "30665696")
|
||||
// api.SetCookie("w_latlng", "30702250,104052315")
|
||||
// api = New("4123", "df2c88338b85f830cebce2a9eab56628", "")
|
||||
|
||||
//商超
|
||||
// api = New("5873", "41c479790a76f86326f89e8048964739", "") //token_nH_IlcWQKAkZBqklwItNRw
|
||||
cookieStr := `
|
||||
acctId=62884810; token=0_0_vJux6rcmm0XIzoI885_aew-gnfofUw9SR-a-QkLw*; brandId=-1; wmPoiId=-1;
|
||||
`
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mtwmapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -50,7 +51,7 @@ func TestOrderReceived(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderConfirm(t *testing.T) {
|
||||
err := api.OrderConfirm(25236872740350976)
|
||||
err := api.OrderConfirm(27058923254735296)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -80,7 +81,7 @@ func TestOrderLogisticsStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderBatchPullPhoneNumber(t *testing.T) {
|
||||
result, err := api.OrderBatchPullPhoneNumber(testPoiCode, 0, MaxBatchPullPhoneNumberLimit)
|
||||
result, err := api.OrderBatchPullPhoneNumber("5873_2705892", 0, MaxBatchPullPhoneNumberLimit)
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -135,3 +136,37 @@ func TestGetOrderIdByDaySeqSingle(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrderRefundReject(t *testing.T) {
|
||||
err := api.OrderRefundReject(27058923254735296, "测试")
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrderRefundAgree(t *testing.T) {
|
||||
err := api.OrderRefundAgree(27058922456066076, "测试")
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrderCancel(t *testing.T) {
|
||||
err := api.OrderCancel(27058922397679200, "取消", 1)
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAa2(t *testing.T) {
|
||||
time := time.Now().Unix()
|
||||
fmt.Println(api.signParams(apiURL+"/oauth/authorize?", map[string]interface{}{
|
||||
"timestamp": time,
|
||||
"app_id": "5873",
|
||||
"app_poi_code": "5873_2705892",
|
||||
"response_type": "token",
|
||||
}), time)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestPoiGetIDs(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPoiMGet(t *testing.T) {
|
||||
result, err := api.PoiMGet([]string{"10414069"})
|
||||
result, err := api.PoiMGet([]string{"8675995"})
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user