饿百爆品也查不了了
This commit is contained in:
@@ -1036,16 +1036,16 @@ func (a *API) ModifyTip4OrderWaybill(orderID, elemeOrderID string, tip, zhongBao
|
||||
|
||||
//查询饿百门店橱窗商品信息
|
||||
func (a *API) GetStoresShowWindowSkus(baiduShopID int64) (storeShowWindowList []*StoreShowWindowSkuList, err error) {
|
||||
params := map[string]interface{}{
|
||||
"wid": baiduShopID,
|
||||
}
|
||||
result, err := a.AccessStorePage("crm/shop/getcurrshopwindow", "", params, true)
|
||||
if err == nil {
|
||||
err2 := utils.Map2StructByJson(result["sku_list"], &storeShowWindowList, false)
|
||||
if err2 != nil {
|
||||
return storeShowWindowList, err
|
||||
}
|
||||
}
|
||||
// params := map[string]interface{}{
|
||||
// "wid": baiduShopID,
|
||||
// }
|
||||
// result, err := a.AccessStorePage("crm/shop/getcurrshopwindow", "", params, true)
|
||||
// if err == nil {
|
||||
// err2 := utils.Map2StructByJson(result["sku_list"], &storeShowWindowList, false)
|
||||
// if err2 != nil {
|
||||
// return storeShowWindowList, err
|
||||
// }
|
||||
// }
|
||||
return storeShowWindowList, err
|
||||
}
|
||||
|
||||
|
||||
8
platformapi/mtwmapi/im.go
Normal file
8
platformapi/mtwmapi/im.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package mtwmapi
|
||||
|
||||
//获取长连接的token
|
||||
//https://developer.waimai.meituan.com/home/docDetail/461
|
||||
func (a *API) GetConnectionToken() (err error) {
|
||||
_, err = a.AccessAPI("wm/IM/getConnectionToken", false, nil)
|
||||
return err
|
||||
}
|
||||
13
platformapi/mtwmapi/im_test.go
Normal file
13
platformapi/mtwmapi/im_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package mtwmapi
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetConnectionToken(t *testing.T) {
|
||||
err := api.GetConnectionToken()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
@@ -49,9 +49,7 @@ func init() {
|
||||
// api.SetCookie("w_latlng", "30702250,104052315")
|
||||
|
||||
cookieStr := `
|
||||
_lxsdk_cuid=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; _lxsdk=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; device_uuid=!aaa93749-2445-4e1e-b178-956ac0ea5e45; pushToken=0sMxJkF87HeJFNGInMgnpvQ3ohIqeo_UMZ8VDif29S6s*; _lx_utm=utm_source%3DBaidu%26utm_medium%3Dorganic; wpush_server_url=wss://wpush.meituan.com; acctId=26599188; token=0o7UnNs2yauqdj86R145ow78W9cT9krlWpKPmCan2z7Q*; brandId=-1; wmPoiId=-1; isOfflineSelfOpen=0; city_id=0; isChain=1; existBrandPoi=true; ignore_set_router_proxy=true; region_id=; region_version=0; newCategory=false; bsid=PgNahlgfXvqnBiqv9tIi9zg7LDWtV8n70tkl_GhfueXgrLxV9BEb1rP9emUMnUUKPI6rANs_Y-chSdYLZS3KCA; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; JSESSIONID=uht6v2iau9s6fx86r1ue6vzd; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; igateApp=shangouepc; LX_SC_CONSTANT=c_nehoktcu; shopCategory=food; _lxsdk_s=16f40af4486-049-a66-a48%7C26337904%7C37
|
||||
|
||||
|
||||
_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
|
||||
`
|
||||
api.SetCookieWithStr(cookieStr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user