aa
This commit is contained in:
@@ -27,8 +27,8 @@ func init() {
|
||||
//商超
|
||||
// api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_tE0txRtx7CRuPIOjh2BH4w") //token_nH_IlcWQKAkZBqklwItNRw
|
||||
cookieStr := `
|
||||
uuid=e8034a4d222c4b51b81c.1574126611.1.0.0; _ga=GA1.2.827950563.1574128001; _lxsdk_cuid=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; _lxsdk=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; t_lxid=1719bfe9d5e30-0cf08957b60ff-3d375b01-15f900-1719bfe9d5fc8-tid; lsu=; mtcdn=K; _source=PC; virtual=0; vacctId=0; acctName=null; terminal=bizCenter; logan_custom_report=; igateApp=shangouepc; uuid_update=true; wpush_server_url=wss://wpush.meituan.com; shopCategory=market; device_uuid=!3fb10fb5-cd78-41e2-afd6-4d656136a3fc; e_u_id_3299326472=e5ae16afe444349d24af7d33b66620a1; token=06eu5I1k0_C9L1O__0BB-PWk8mqIpagIL3aKWuTPz8t8*; acctId=57396785; bsid=40I5kUwAJ5uq67jA3bNkn3hT3xpZCkAwhPCq5bGnfIXlBpdbIR9Zz-waWJqJYX6jIe6yK7KCsl4Q_ickenwIcA; wmPoiId=7169838; _lxsdk_s=1787cb12bac-7cd-4f6-eb2%7C%7C378; logan_session_token=1yndau3dxtsh4kg3znsl
|
||||
`
|
||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
`
|
||||
api.SetCookieWithStr(cookieStr)
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ var (
|
||||
"reuse/sc/product/retail/r/getStandardProductListWithCond": orderURL,
|
||||
"api/sg/promotion/invite/centerList": actURL,
|
||||
"api/invite/detail": actURL,
|
||||
"v2/logon/setToken": orderURL,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -105,6 +106,10 @@ func (a *API) AccessUserPage(subURL string, params map[string]interface{}) (retV
|
||||
return a.AccessUserPage2(subURL, params, true)
|
||||
}
|
||||
|
||||
func (a *API) AccessUserPage3(subURL string, params map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
return a.AccessUserPage2(subURL, params, false)
|
||||
}
|
||||
|
||||
func (a *API) GetStoreList(lng, lat float64) (shopList []*ListShopItem, err error) {
|
||||
params := map[string]interface{}{
|
||||
"sortId": 1,
|
||||
@@ -438,3 +443,20 @@ func (a *API) GetStandardProductListWithCond(upc string) (getStandardProductList
|
||||
}
|
||||
return getStandardProductListWithCondResult, err
|
||||
}
|
||||
|
||||
func (a *API) SetTokenPage() (err error) {
|
||||
params := map[string]interface{}{
|
||||
"acctId": 57396785,
|
||||
"wmPoiId": -1,
|
||||
"bsid": "y-5VaK3uFxP705tpXsnJPee2sJc9dJ23LmGwYmg2kCO81d9EjD7TJrUeflcJRrqRxg9DFCNGhrJSaWYSCgXvxg",
|
||||
"device_uuid": "!ac34e5d7-5472-47fd-b7c4-029c1f7e7576",
|
||||
"token": "1bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*",
|
||||
"region_version": 0,
|
||||
"region_id": "",
|
||||
}
|
||||
a.SetCookieWithStr(`
|
||||
uuid=350a86177dd64c43b875.1619071312.1.0.0; _lxsdk_cuid=178f88ba3cec8-0db6e384ebfa36-5b1f321a-1fa400-178f88ba3cec8; _lxsdk=178f88ba3cec8-0db6e384ebfa36-5b1f321a-1fa400-178f88ba3cec8; uuid_update=true; _ga=GA1.2.2092976141.1619502287; pushToken=04OVj3PayJdT62H_Irz4BXYfNQHh9N33gDO_WFnGaovs*; device_uuid=!ac34e5d7-5472-47fd-b7c4-029c1f7e7576; mtcdn=K; lsu=; e_u_id_3299326472=e5ae16afe444349d24af7d33b66620a1; wpush_server_url=wss://wpush.meituan.com; shopCategory=food; _lxsdk_s=17b15442f31-e81-89b-533%7C%7C187
|
||||
`)
|
||||
_, err = a.AccessUserPage3("v2/logon/setToken", params)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -49,3 +49,11 @@ func TestGetStandardProductListWithCond(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestSetTokenPage(t *testing.T) {
|
||||
err := api.SetTokenPage()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
//t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user