Commit b2060a0b by 朱继来

调整商品数据格式

parent a7d0b0a6
Showing with 1 additions and 1 deletions
...@@ -252,7 +252,7 @@ function getSelfStock($goods_id) ...@@ -252,7 +252,7 @@ function getSelfStock($goods_id)
$response = json_decode(curlApi($url, $data, 'POST'), true); $response = json_decode(curlApi($url, $data, 'POST'), true);
if ($response['errcode'] == 0) { if ($response['errcode'] == 0) {
return $response['data']['stock']; return isset($response['data'][$goods_id]['stock']) ? $response['data'][$goods_id]['stock'] : 0;
} else { } else {
return '未找SKU信息'; return '未找SKU信息';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment