// 获取accessToken
const response = await axios.get('https://api.weixin.qq.com/cgi-bin/token', {
params: {
grant_type: 'client_credential',
appid: APPID, //小店appId
secret: APPSECRET //小店APPSECRET
}
});
// 查询商品列表
const response = await axios.post(`https://api.weixin.qq.com/product/spu/get_list?access_token=${accessToken}`, {
page,
page_size: pageSize,
status
});
云端日志报错如下:Response RequestId: 9640ed1b-3ac7-49ba-ba30-00c662199d98 RetMsg:
{
"success": true,
"data": {
"errcode": 48001,
"errmsg": "api unauthorized rid: 69a6a55e-2408ca7d-404be75d"
}
}
