statte
This commit is contained in:
@@ -19,10 +19,10 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "")
|
||||
// api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "")
|
||||
|
||||
// 果园
|
||||
// api = New("4123", "df2c88338b85f830cebce2a9eab56628", "")
|
||||
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "")
|
||||
|
||||
// api.SetCookie("_lx_utm", "utm_source%3D60066")
|
||||
// api.SetCookie("_lxsdk", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E")
|
||||
@@ -49,7 +49,7 @@ func init() {
|
||||
// api.SetCookie("w_latlng", "30702250,104052315")
|
||||
|
||||
cookieStr := `
|
||||
_lxsdk_cuid=172a6a9e89ec8-0876fd0b210a31-4e714511-15f900-172a6a9e89fc8; _lxsdk=172a6a9e89ec8-0876fd0b210a31-4e714511-15f900-172a6a9e89fc8; uuid_update=true; uuid=5b4e9f8306750ebf8e90.1591946010.1.0.0; device_uuid=!70f39cee-3c20-44c6-abe9-a8fa18a21c76; pushToken=0Sb28aO1nitSaWX-84LbCTjl7bicdYDWnpH40cGbBUs4*; wpush_server_url=wss://wpush.meituan.com; acctId=57396785; token=0fBG5UnxFzlome3nu69bmHcCMx-DGLJLhPhJHOlO9ruI*; brandId=-1; wmPoiId=-1; isOfflineSelfOpen=0; city_id=0; isChain=1; existBrandPoi=true; ignore_set_router_proxy=true; region_id=; region_version=0; newCategory=true; bsid=NBAQe-PcrcnMcSj4-6j85fnmomQBL_uiEvSZNlmjiaGPY4Hhn4FH22x_KvWicqy_wMz23p8JE5kgdxrsKwSqxw; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; shopCategory=food; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; igateApp=shangouepc; pharmacistAccount=0; JSESSIONID=gqmw35bsdy3hw3otz7yu2d9k; _lxsdk_s=174062b4c68-df9-15f-cd9%7C%7C30
|
||||
acctId=62884810; token=0_0_vJux6rcmm0XIzoI885_aew-gnfofUw9SR-a-QkLw*; brandId=-1; wmPoiId=-1;
|
||||
`
|
||||
api.SetCookieWithStr(cookieStr)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ func TestOrderViewStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail(24617130273189791, false)
|
||||
result, err := api.OrderGetOrderDetail(93475541926981203, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -27,7 +27,7 @@ func TestOrderGetOrderDetail(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail2(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail2(24617130273189791, false)
|
||||
result, err := api.OrderGetOrderDetail2(93475541926981203, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -35,7 +35,7 @@ func TestOrderGetOrderDetail2(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetPartRefundFoods(t *testing.T) {
|
||||
result, err := api.OrderGetPartRefundFoods(25236870562694625)
|
||||
result, err := api.OrderGetPartRefundFoods(93475541926981203)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func TestOrderConfirm(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderApplyPartRefund(t *testing.T) {
|
||||
err := api.OrderApplyPartRefund(25236872740350976, "缺货", []*RefundSku{
|
||||
err := api.OrderApplyPartRefund(93495654059392270, "缺货", []*RefundSku{
|
||||
&RefundSku{
|
||||
AppFoodCode: "30831",
|
||||
Count: 1,
|
||||
|
||||
@@ -40,10 +40,11 @@ type ListShopItem struct {
|
||||
|
||||
var (
|
||||
actionHostMap = map[string]string{
|
||||
"v2/order/receive/processed/w/distribute/tipAmount/v2": orderURL,
|
||||
"v2/order/receive/processed/r/distribute/list/v2": orderURL,
|
||||
"reuse/sc/product/packageprice/w/update": orderURL,
|
||||
"reuse/sc/product/packageprice/r/get": orderURL,
|
||||
"v2/order/receive/processed/w/distribute/tipAmount/v2": orderURL,
|
||||
"v2/order/receive/processed/r/distribute/list/v2": orderURL,
|
||||
"reuse/sc/product/packageprice/w/update": orderURL,
|
||||
"reuse/sc/product/packageprice/r/get": orderURL,
|
||||
"reuse/sc/product/retail/r/getStandardProductListWithCond": orderURL,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -140,3 +141,14 @@ func (a *API) GetStoreInfo(storeID string) (storeInfo map[string]interface{}, er
|
||||
retVal, err := a.AccessUserPage("openh5/poi/info", params)
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
//https://shangoue.meituan.com/reuse/sc/product/retail/r/getStandardProductListWithCond
|
||||
func (a *API) GetStandardProductListWithCond(upc string) (err error) {
|
||||
params := map[string]interface{}{
|
||||
"keyword": upc,
|
||||
"pageNo": 1,
|
||||
"pageSize": 20,
|
||||
}
|
||||
_, err = a.AccessUserPage("reuse/sc/product/retail/r/getStandardProductListWithCond", params)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -41,3 +41,11 @@ func TestGetStoreInfo(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetStandardProductListWithCond(t *testing.T) {
|
||||
err := api.GetStandardProductListWithCond("6925436710085")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user