From 99c751af74cbaf7ad68e720786fd4e234eda2cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 15 Mar 2021 17:00:58 +0800 Subject: [PATCH] aa --- platformapi/jdapi/jdapi_test.go | 4 +- platformapi/mtwmapi/mtwmapi_test.go | 6 +- platformapi/mtwmapi/user_page.go | 285 +++++++++++++++++++++++- platformapi/mtwmapi/user_page_test.go | 4 +- platformapi/weixinapi/cgibin_test.go | 2 +- platformapi/weixinapi/sns_test.go | 4 +- platformapi/weixinapi/weixinapi_test.go | 2 +- 7 files changed, 294 insertions(+), 13 deletions(-) diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index d0298d33..ead25298 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -34,7 +34,9 @@ func init() { // api.SetJdCookie(cookieValue) // api.SetCookie("user", "VCQUVHVJI4ELNGFZOYMCDYDUSHEJMPXZRZXSNBRB4MVBNENP72REAAZR3R4SGDJ5ZI4FLYLLN5EGBBMTFCWHZVESIWBNLKZPLHWD6UIBTPXOF5IXM6AVA3V6TUNZD5UJS43AROJ2IRPZWEN5AGZYBUEGD3MSKKBKBSRP3DSEQXLITYNBLFZCHXCA7L4KGOSJRMM7R5IQP7QGLGRQB27AOE4YMLRJ3UPTZADPWJOYB3UZ7UZHLBVZRREEX647O3WQUU4BYXUOFZPIPRR77W3PQV543E") api.SetCookieWithStr(` - lsp-store1.jddj.com=HV2JJVZZQ6GR2IFIXNHJQ3BYHOBPYDTUNNOHXCB6VRVUN5AXDNZO3IZPU2644VM3AF245ANGSYECAFHE2UHA24SEHUKWICOUKR6Y2I7FH6WZLLU5AUEB6WKRZRXDQOBFGP2GJTHFOFCJKXMD53HMJOB27P66RIDPAYXG3SW3ETE24CXEBBXOQUL64DZ2IXTFHHPQMQJI7AQQ7C4T2AHH3BRMPFB6MLBRRIMFX2BLBI7ETJN7WKM7KXTGZLDDVQK6JOU24WJL4PVF3PPYDNTOLLXDABUFAZSE6C6CNOMI6L2TAK43JJIJQRQAQUQSU537ZFLVPGBYFDJYY; josl-privilege1.jddj.com=HV2JJVZZQ6GR2IFIXNHJQ3BYHOBPYDTUNNOHXCB6VRVUN5AXDNZO3IZPU2644VM3AF245ANGSYECAFHE2UHA24SEHUKWICOUKR6Y2I7FH6WZLLU5AUEB6WKRZRXDQOBFGP2GJTHFOFCJKXMD53HMJOB27M4SOMJLKNYFFFFTUF5P4QS236I6D3HP36UWFIO6CIPJOTBVNOAOY4FI3JYA3ZAZIZ26MPENH7FCZTN3MJHBMCW7DVNX7IVZ2SO6XHKGNIGHVIWTECERMEGUTJT3I7IEGVF2TLSZFPR6UXN57ANWNZNO4MAGQUDGITYLYJVZRDZPKMBLTNFFB5BCNIBJBWT3K6PVKOCSAJXJPUY; o2o-stock1.jddj.com=HV2JJVZZQ6GR2IFIXNHJQ3BYHOBPYDTUNNOHXCB6VRVUN5AXDNZO3IZPU2644VM3AF245ANGSYECAFHE2UHA24SEHUKWICOUKR6Y2I7FH6WZLLU5AUEB6WKRZRXDQOBFGP2GJTHFOFCJKXMD53HMJOB27PIARY34I25TBOK2IYW2F6EJ3WS6D3HP36UWFIO6CIPJOTBVNOAOYLT5MMMPGDWB22GHTB2BD3TJIE4PMG6IKZMBVLP327PEE3OQRFBS3CT2IVMA3GEVFVZYDHM4R25SUY; o2o-pms1.jddj.com=HV2JJVZZQ6GR2IFIXNHJQ3BYHOBPYDTUNNOHXCB6VRVUN5AXDNZO3IZPU2644VM3AF245ANGSYECAFHE2UHA24SEHUKWICOUKR6Y2I7FH6WZLLU5AUEB6WKRZRXDQOBFGP2GJTHFOFCJKXMD53HMJOB27OCJ6Q6AC3TQET62Z476QQI4QNB6D3HP36UWFIO6CIPJOTBVNOAOZNHKRY423STTEFH7HYGJVNJG6NEPMG6IKZMBVLP327PEE3OQRFBS3CT2IVMA3GEVFVZYDHM4R25SUY; UM_distinctid=17815ffb82137d-031b594e0e0c26-43734711-15f900-17815ffb822609; jdO2OOpenPortalSessionId=9659CA06C76DB319167D311362118A3F.s1; JSESSIONID=1B3DBA2E032A131FA156481A9FA0CA41.s1`) + lsp-store1.jddj.com=ZRQ5RVE32D7ZRDH2FJUG5E2D42VYH5X2TT7PEYWWKEXOKG36MFGO3IZPU2644VM3AF245ANGSYECBEH6E2NYG4RO5MMOFGWNJFIVY3Z7SIWRIHVZJQZYXVAXFD3ZALXJ7LF7IXV2EIDQKACPO2QSMLXCK4BDVECTARS7I5ZWPB6ELIAI7GMGZB2PZLDOSGLJW3RSIFQATZFJXORN62Q47W7WFNA643UOAKVGBBBS5VZ3BNPFDHBYX5DNYB3TVGLKZDFAKRRXECTQQRZFGSOTYYIE4FXN7FSC2NHYJWBRIIRMP6W44EDED2ZMUGIFYVUY5JBXDO6GUFM74; josl-privilege1.jddj.com=ZRQ5RVE32D7ZRDH2FJUG5E2D42VYH5X2TT7PEYWWKEXOKG36MFGO3IZPU2644VM3AF245ANGSYECBEH6E2NYG4RO5MMOFGWNJFIVY3Z7SIWRIHVZJQZYXVAXFD3ZALXJ7LF7IXV2EIDQKACPO2QSMLXCK4BDVECTARS7I5ZWPB6ELIAI7GML3B5KRWVANMUE6CJHQ26ZEPPPZTZMVVEU7XFAU6BZUEDYJPXO4OZS5VZ3BNPFDHBYX5DNYB3TVGLKAPQZF3RP5BL22FN742XTFXEYFEVXQ34S6GZHMC5NGAXZ7AZ4DU2LILQOALXSO3ZBU5Q2RZJH2BMPIU3CGHF22D5GNS3U7O2AN3PH5TI; store_deviceid=89a38e81dfbb776fa5f866f74ed437a3; o2o-stock1.jddj.com=ZRQ5RVE32D7ZRDH2FJUG5E2D42VYH5X2TT7PEYWWKEXOKG36MFGO3IZPU2644VM3AF245ANGSYECBEH6E2NYG4RO5MMOFGWNJFIVY3Z7SIWRIHVZJQZYXVAXFD3ZALXJ7LF7IXV2EIDQKACPO2QSMLXCK4BDVECTARS7I5ZWPB6ELIAI7GMIMHXH2NJVBANI3UEOER5UPD2A4XBKD6W7VQRYOKUOI7PJTIXBNSW5P2G2MT3U6I3527NQFMAFLHXB5OQS4MGVQTJRQMJMGHBEQ4XGJ3I3LLXBHRXRG55NZQUW72XT7LTQ; o2o-pms1.jddj.com=ZRQ5RVE32D7ZRDH2FJUG5E2D42VYH5X2TT7PEYWWKEXOKG36MFGO3IZPU2644VM3AF245ANGSYECBEH6E2NYG4RO5MMOFGWNJFIVY3Z7SIWRIHVZJQZYXVAXFD3ZALXJ7LF7IXV2EIDQKACPO2QSMLXCK4BDVECTARS7I5ZWPB6ELIAI7GMBWJVC6XWTFZEWX37V5RK7T6TGKWWM446A6EOGP3IMZQ2UJX4CHBW5P2G2MT3U6I3527NQFMAFLHXB5OQS4MGVQTJRQMJMGHBEQ4XGJ3I3LLXBHRXRG55NZQUW72XT7LTQ; jdO2OOpenPortalSessionId=1A99B807FB56A966864E52BA7A488462.s1; JSESSIONID=2E7B224AAEAAD98F3598A86312ADF8E8.s1 + + `) } func TestTest(t *testing.T) { diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 8e3f6ed6..50aa6ada 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -19,15 +19,15 @@ func init() { baseapi.Init(sugarLogger) // 菜市 - // api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") + api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") // 果园 // api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //商超 - api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw + // api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw cookieStr := ` - acctId=62884810; token=0_0_vJux6rcmm0XIzoI885_aew-gnfofUw9SR-a-QkLw*; brandId=-1; wmPoiId=-1; + __mta=188489239.1577327492709.1577327492709.1577327492709.1; uuid=e8034a4d222c4b51b81c.1574126611.1.0.0; _ga=GA1.2.827950563.1574128001; uuid_update=true; _lxsdk_cuid=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; _lxsdk=16eb02a8a02c8-0a92cb9af9798c-3d375b01-15f900-16eb02a8a02c8; device_uuid=!aaa93749-2445-4e1e-b178-956ac0ea5e45; t_lxid=1719bfe9d5e30-0cf08957b60ff-3d375b01-15f900-1719bfe9d5fc8-tid; pushToken=0-AQeAm60pIt3VbpGu3MbPpMfRVaeCxP9tacRSFq7lmI*; lsu=; mtcdn=K; wpush_server_url=wss://wpush.meituan.com; e_u_id_3299326472=e5ae16afe444349d24af7d33b66620a1; acctId=57396785; token=05dB_LgouAsXUZyajkn4BYPNqwhsIKOlpJVj8bCpWU_k*; 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=u1QwYRWkS6s4UbPe51pD2yxb39UkgViO2fo-eOwBX5KneNsBZsAPYAbAnl7IiE0b-MqLwRQRt7QwwU79IkPepA; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; JSESSIONID=on9wehapo37eso6i98ot3p97; shopCategory=food; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; cacheTimeMark=2021-03-15; pharmacistAccount=0; _lxsdk_s=17834f8e90f-c8b-674-c89%7C%7C19 ` api.SetCookieWithStr(cookieStr) } diff --git a/platformapi/mtwmapi/user_page.go b/platformapi/mtwmapi/user_page.go index 50e9663a..71e52d9a 100644 --- a/platformapi/mtwmapi/user_page.go +++ b/platformapi/mtwmapi/user_page.go @@ -142,13 +142,292 @@ func (a *API) GetStoreInfo(storeID string) (storeInfo map[string]interface{}, er return retVal, err } +type GetStandardProductListWithCondResult struct { + IsMedicare bool `json:"isMedicare"` + SpVideoVo interface{} `json:"spVideoVo"` + LockStatus int `json:"lockStatus"` + LockTips interface{} `json:"lockTips"` + SpPicContent string `json:"spPicContent"` + ExistInPoi bool `json:"existInPoi"` + MonthSale int `json:"monthSale"` + Skus []struct { + ShelfNum string `json:"shelfNum"` + ItemNum string `json:"itemNum"` + LimitStock int `json:"limitStock"` + Sequence int `json:"sequence"` + Weight float64 `json:"weight"` + Price interface{} `json:"price"` + WeightUnit string `json:"weightUnit"` + SkuAttrs interface{} `json:"skuAttrs"` + Spec string `json:"spec"` + Stock interface{} `json:"stock"` + MinOrderCount int `json:"minOrderCount"` + Unit string `json:"unit"` + UpcCode string `json:"upcCode"` + BizValue interface{} `json:"bizValue"` + ProductName interface{} `json:"productName"` + BoxPrice float64 `json:"boxPrice"` + BoxNum int `json:"boxNum"` + ID int `json:"id"` + } `json:"skus"` + CategoryAttrMap struct { + Num1200000088 struct { + SupportFilter int `json:"supportFilter"` + Application string `json:"application"` + OptionMaxSize int `json:"optionMaxSize"` + TextMaxLength int `json:"textMaxLength"` + CharacterType string `json:"characterType"` + SupportExtend string `json:"supportExtend"` + AttrName string `json:"attrName"` + Sequence int `json:"sequence"` + Level int `json:"level"` + InputType int `json:"inputType"` + WmPoiID int `json:"wmPoiId"` + CategoryID int `json:"categoryId"` + IsLeaf int `json:"isLeaf"` + SpuID int `json:"spuId"` + ValueList []struct { + Sequence int `json:"sequence"` + Text interface{} `json:"text"` + IsLeaf int `json:"isLeaf"` + ValueID int `json:"valueId"` + ValueIDPath string `json:"valueIdPath"` + ValuePath string `json:"valuePath"` + Selected int `json:"selected"` + Value string `json:"value"` + } `json:"valueList"` + AttrID int `json:"attrId"` + AttrType int `json:"attrType"` + TemplateID int `json:"templateId"` + IsRequired int `json:"isRequired"` + ID int `json:"id"` + } `json:"1200000088"` + Num1200000094 struct { + SupportFilter int `json:"supportFilter"` + Application string `json:"application"` + OptionMaxSize int `json:"optionMaxSize"` + TextMaxLength int `json:"textMaxLength"` + CharacterType string `json:"characterType"` + SupportExtend string `json:"supportExtend"` + AttrName string `json:"attrName"` + Sequence int `json:"sequence"` + Level int `json:"level"` + InputType int `json:"inputType"` + WmPoiID int `json:"wmPoiId"` + CategoryID int `json:"categoryId"` + IsLeaf int `json:"isLeaf"` + SpuID int `json:"spuId"` + ValueList []struct { + Sequence int `json:"sequence"` + Text interface{} `json:"text"` + IsLeaf int `json:"isLeaf"` + ValueID int `json:"valueId"` + ValueIDPath string `json:"valueIdPath"` + ValuePath string `json:"valuePath"` + Selected int `json:"selected"` + Value string `json:"value"` + } `json:"valueList"` + AttrID int `json:"attrId"` + AttrType int `json:"attrType"` + TemplateID int `json:"templateId"` + IsRequired int `json:"isRequired"` + ID int `json:"id"` + } `json:"1200000094"` + Num1200000135 struct { + SupportFilter int `json:"supportFilter"` + Application string `json:"application"` + OptionMaxSize int `json:"optionMaxSize"` + TextMaxLength int `json:"textMaxLength"` + CharacterType string `json:"characterType"` + SupportExtend string `json:"supportExtend"` + AttrName string `json:"attrName"` + Sequence int `json:"sequence"` + Level int `json:"level"` + InputType int `json:"inputType"` + WmPoiID int `json:"wmPoiId"` + CategoryID int `json:"categoryId"` + IsLeaf int `json:"isLeaf"` + SpuID int `json:"spuId"` + ValueList []struct { + Sequence int `json:"sequence"` + Text interface{} `json:"text"` + IsLeaf int `json:"isLeaf"` + ValueID int `json:"valueId"` + ValueIDPath interface{} `json:"valueIdPath"` + ValuePath interface{} `json:"valuePath"` + Selected int `json:"selected"` + Value string `json:"value"` + } `json:"valueList"` + AttrID int `json:"attrId"` + AttrType int `json:"attrType"` + TemplateID int `json:"templateId"` + IsRequired int `json:"isRequired"` + ID int `json:"id"` + } `json:"1200000135"` + Num1200000210 struct { + SupportFilter int `json:"supportFilter"` + Application string `json:"application"` + OptionMaxSize int `json:"optionMaxSize"` + TextMaxLength int `json:"textMaxLength"` + CharacterType string `json:"characterType"` + SupportExtend string `json:"supportExtend"` + AttrName string `json:"attrName"` + Sequence int `json:"sequence"` + Level int `json:"level"` + InputType int `json:"inputType"` + WmPoiID int `json:"wmPoiId"` + CategoryID int `json:"categoryId"` + IsLeaf int `json:"isLeaf"` + SpuID int `json:"spuId"` + ValueList []struct { + Sequence int `json:"sequence"` + Text interface{} `json:"text"` + IsLeaf int `json:"isLeaf"` + ValueID int `json:"valueId"` + ValueIDPath interface{} `json:"valueIdPath"` + ValuePath interface{} `json:"valuePath"` + Selected int `json:"selected"` + Value string `json:"value"` + } `json:"valueList"` + AttrID int `json:"attrId"` + AttrType int `json:"attrType"` + TemplateID int `json:"templateId"` + IsRequired int `json:"isRequired"` + ID int `json:"id"` + } `json:"1200000210"` + } `json:"categoryAttrMap"` + SpuSaleAttrMap interface{} `json:"spuSaleAttrMap"` + OriginName string `json:"originName"` + SetOrigin bool `json:"setOrigin"` + SetWeightUnit bool `json:"setWeightUnit"` + AvgPrice int `json:"avgPrice"` + SetAvgPrice bool `json:"setAvgPrice"` + SetEan bool `json:"setEan"` + SetShelfStatus bool `json:"setShelfStatus"` + ShelfStatus int `json:"shelfStatus"` + RefCount int `json:"refCount"` + SetRefCount bool `json:"setRefCount"` + IsReceipt int `json:"is_receipt"` + SetPic bool `json:"setPic"` + CheckerID int `json:"checkerId"` + SetCheckerID bool `json:"setCheckerId"` + CheckerName string `json:"checkerName"` + SetCheckerName bool `json:"setCheckerName"` + CheckRemark interface{} `json:"checkRemark"` + SetCheckRemark bool `json:"setCheckRemark"` + CheckTime int `json:"checkTime"` + SetCheckTime bool `json:"setCheckTime"` + IsMulitEan int `json:"isMulitEan"` + SetIsMulitEan bool `json:"setIsMulitEan"` + SetCategoryNamePath bool `json:"setCategoryNamePath"` + CategoryIDPath string `json:"categoryIdPath"` + SetCategoryIDPath bool `json:"setCategoryIdPath"` + SetBrandNamePath bool `json:"setBrandNamePath"` + SuggestedPrice int `json:"suggestedPrice"` + SetSuggestedPrice bool `json:"setSuggestedPrice"` + SetRiseMax bool `json:"setRiseMax"` + SetDropMax bool `json:"setDropMax"` + ExpPeriod int `json:"expPeriod"` + SetExpPeriod bool `json:"setExpPeriod"` + ExpUnit int `json:"expUnit"` + SetExpUnit bool `json:"setExpUnit"` + SuppleFact string `json:"suppleFact"` + SetSuppleFact bool `json:"setSuppleFact"` + SubOrigin int `json:"subOrigin"` + SetSubOrigin bool `json:"setSubOrigin"` + SalePriceWeight int `json:"salePriceWeight"` + SetSalePriceWeight bool `json:"setSalePriceWeight"` + SrcPic string `json:"srcPic"` + SetSrcPic bool `json:"setSrcPic"` + BrandZhName interface{} `json:"brandZhName"` + SetBrandZhName bool `json:"setBrandZhName"` + BrandEnName interface{} `json:"brandEnName"` + SetBrandEnName bool `json:"setBrandEnName"` + SetIsReceipt bool `json:"setIs_receipt"` + ReceiptorID int `json:"receiptorId"` + SetReceiptorID bool `json:"setReceiptorId"` + SpecNew float64 `json:"specNew"` + SetSpecNew bool `json:"setSpecNew"` + SpecUnit string `json:"specUnit"` + SetSpecUnit bool `json:"setSpecUnit"` + SpecCount int `json:"specCount"` + SetSpecCount bool `json:"setSpecCount"` + SpecCountUnit string `json:"specCountUnit"` + SetSpecCountUnit bool `json:"setSpecCountUnit"` + IsBigSpec int `json:"isBigSpec"` + SetIsBigSpec bool `json:"setIsBigSpec"` + WeightNew float64 `json:"weightNew"` + SetWeightNew bool `json:"setWeightNew"` + Description string `json:"description"` + Sequence int `json:"sequence"` + SetSize bool `json:"setSize"` + Source int `json:"source"` + Origin int `json:"origin"` + OriginType int `json:"originType"` + SetName bool `json:"setName"` + SetID bool `json:"setId"` + Weight int `json:"weight"` + SetWeight bool `json:"setWeight"` + Valid int `json:"valid"` + BrandID int `json:"brandId"` + CategoryName string `json:"categoryName"` + CategoryID int `json:"categoryId"` + WeightUnit interface{} `json:"weightUnit"` + Pic string `json:"pic"` + Spec string `json:"spec"` + Ctime int `json:"ctime"` + EanList []string `json:"eanList"` + CategoryNamePath string `json:"categoryNamePath"` + Utime int `json:"utime"` + Unit string `json:"unit"` + IsSp int `json:"isSp"` + Ean string `json:"ean"` + CheckStatus int `json:"checkStatus"` + SpName string `json:"spName"` + BrandNamePath string `json:"brandNamePath"` + Cuid int `json:"cuid"` + RiseMax int `json:"riseMax"` + DropMax int `json:"dropMax"` + SetSpName bool `json:"setSpName"` + SetOriginType bool `json:"setOriginType"` + SetIsSp bool `json:"setIsSp"` + SetBrandID bool `json:"setBrandId"` + SetCheckStatus bool `json:"setCheckStatus"` + EanListSize int `json:"eanListSize"` + EanListIterator []string `json:"eanListIterator"` + SetEanList bool `json:"setEanList"` + SetCategoryID bool `json:"setCategoryId"` + SetSpec bool `json:"setSpec"` + Muid int `json:"muid"` + SetMuid bool `json:"setMuid"` + SetSource bool `json:"setSource"` + SetUnit bool `json:"setUnit"` + SetSequence bool `json:"setSequence"` + SetCtime bool `json:"setCtime"` + SetUtime bool `json:"setUtime"` + SetValid bool `json:"setValid"` + SetDescription bool `json:"setDescription"` + Cuname interface{} `json:"cuname"` + SetCuname bool `json:"setCuname"` + Muname interface{} `json:"muname"` + SetMuname bool `json:"setMuname"` + SetCuid bool `json:"setCuid"` + SetCategoryName bool `json:"setCategoryName"` + Name string `json:"name"` + ID int `json:"id"` + Size string `json:"size"` +} + //https://shangoue.meituan.com/reuse/sc/product/retail/r/getStandardProductListWithCond -func (a *API) GetStandardProductListWithCond(upc string) (err error) { +func (a *API) GetStandardProductListWithCond(upc string) (getStandardProductListWithCondResult *GetStandardProductListWithCondResult, err error) { params := map[string]interface{}{ "keyword": upc, "pageNo": 1, "pageSize": 20, } - _, err = a.AccessUserPage("reuse/sc/product/retail/r/getStandardProductListWithCond", params) - return err + result, err := a.AccessUserPage("reuse/sc/product/retail/r/getStandardProductListWithCond", params) + if err == nil { + utils.Map2StructByJson(result["list"].([]interface{})[0], &getStandardProductListWithCondResult, false) + } + return getStandardProductListWithCondResult, err } diff --git a/platformapi/mtwmapi/user_page_test.go b/platformapi/mtwmapi/user_page_test.go index eeb56aa1..772c9327 100644 --- a/platformapi/mtwmapi/user_page_test.go +++ b/platformapi/mtwmapi/user_page_test.go @@ -43,9 +43,9 @@ func TestGetStoreInfo(t *testing.T) { } func TestGetStandardProductListWithCond(t *testing.T) { - err := api.GetStandardProductListWithCond("6925436710085") + result, err := api.GetStandardProductListWithCond("6925436710085") if err != nil { t.Fatal(err) } - // t.Log(utils.Format4Output(result, false)) + t.Log(utils.Format4Output(result, false)) } diff --git a/platformapi/weixinapi/cgibin_test.go b/platformapi/weixinapi/cgibin_test.go index d664e020..e15123f0 100644 --- a/platformapi/weixinapi/cgibin_test.go +++ b/platformapi/weixinapi/cgibin_test.go @@ -44,7 +44,7 @@ func TestCBUpdateRemark(t *testing.T) { } func TestCBGetUserInfo(t *testing.T) { - userInfo, err := api.CBGetUserInfo("oYN_usv1RPvrSxCvo1WsbwI8lZa0") + userInfo, err := api.CBGetUserInfo("oUSjx58hW3ZeCcUfxW1HEHRnagiI") if err != nil { t.Fatal(err) } diff --git a/platformapi/weixinapi/sns_test.go b/platformapi/weixinapi/sns_test.go index 3ed0bdc6..3ac4aa9d 100644 --- a/platformapi/weixinapi/sns_test.go +++ b/platformapi/weixinapi/sns_test.go @@ -3,7 +3,7 @@ package weixinapi import "testing" func TestSNSRetrieveToken(t *testing.T) { - result, err := api.SNSRetrieveToken("013vRK0006IzAK1xRM100WPcXB1vRK0k") + result, err := api.SNSRetrieveToken("071GLDkl2GTdG64RyXll2GXXe54GLDkc") if err != nil { t.Fatal(err.Error()) } @@ -31,7 +31,7 @@ func TestSNSDecodeMiniProgramData(t *testing.T) { } func TestSNSGetUserInfo(t *testing.T) { - result, err := api.SNSGetUserInfo("38_l84lcm8hNHIByEaC2JZkBz4F1Lu6xWkADYMVUQ3e3psrTaWS7cz8EgZpvAn5xUwLTLZZZez4oCkVQ9RW0C8BFscWKJhMSnQq0bG287iEUyQ", "oRrdQt6IBtfUSN1oG7Cls4wl7gkk") + result, err := api.SNSGetUserInfo("38_l84lcm8hNHIByEaC2JZkBz4F1Lu6xWkADYMVUQ3e3psrTaWS7cz8EgZpvAn5xUwLTLZZZez4oCkVQ9RW0C8BFscWKJhMSnQq0bG287iEUyQ", "071GLDkl2GTdG64RyXll2GXXe54GLDkc") if err != nil { t.Fatal(err.Error()) } diff --git a/platformapi/weixinapi/weixinapi_test.go b/platformapi/weixinapi/weixinapi_test.go index 5979fdd3..bbea10b2 100644 --- a/platformapi/weixinapi/weixinapi_test.go +++ b/platformapi/weixinapi/weixinapi_test.go @@ -27,7 +27,7 @@ func init() { //weixinapp api = New("wx18111a41fd17f24f", "c79ac6e1b2d6d7968e72a9658a8b6715") - // api.CBSetToken("36_un9YOYENTdiNi4TVoDfrb2oiiU9XSugSgbm0B-uJ4TbhVk543aOi5UcBgYcujsCZ1gyCIMDbaKCON7oWMHtHRLCg1P2KzjRhxU3KoVbNZ04PPzdDOXStnigkoSLTxv-y9pbenFP0kHYHUeRHQEUeAHAJXN") + // api.CBSetToken("43_ZotOV6kJJjqc4H9blBhwxbXpSmY1LMOv13lxYRL44FQ1icX0nnnAGt5-pNWDVSuaVK3IrYoxR1xY6AGeY5XHsjCgwymwT009y6uDyo7mB8suHrSUP-2vCWHk8Q0Ff8FQHVsTnxBo8NicLeUAPYJjAEASBM") } func handleError(t *testing.T, err error) {