【发布时间】:2021-12-23 16:26:02
【问题描述】:
如何更改下面的代码以便进行此查询 (http://localhost:3009/api/get-products/?keywords=underwear) ?我已经尝试了所有能找到的代码 sn-ps ????
app.get("/api/get-products/",async (req, res) => {
client.execute('aliexpress.affiliate.product.query', {
'app_signature':'maarifahmall',
// 'category_ids':'111,222,333',
'fields':'commission_rate,sale_price',
'keywords':'beauty',
'max_sale_price':'100',
'min_sale_price':'15',
'page_no':'1',
'page_size':'50',
'platform_product_type':'ALL',
'sort':'SALE_PRICE_ASC',
'target_currency':'USD',
'target_language':'EN',
'tracking_id':'maarifahmall',
'ship_to_country':'US',
'delivery_days':'3'
},
function(error, response) {
if (!error) {
res.send(response['resp_result']);
// ['result']['products']['product']
} else {
res.send(error);
}
})
});
【问题讨论】:
标签: node.js reactjs express xmlhttprequest