From fdec7494202182d0c2a76379bbaf1f719e511948 Mon Sep 17 00:00:00 2001 From: Agent Date: Mon, 30 Mar 2026 14:18:48 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DgetCategoryAttributes?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=93=8D=E5=BA=94=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/product.js b/src/api/product.js index 51f1430..f15343e 100644 --- a/src/api/product.js +++ b/src/api/product.js @@ -86,7 +86,8 @@ export default { method: 'GET', header: { 'Authorization': token ? `Bearer ${token}` : '' }, success: (res) => { - if (res.data.code === 0) resolve(res.data.data) + if (res.data && res.data.code === 0) resolve(res.data.data || []) + else if (Array.isArray(res.data)) resolve(res.data) else reject(res.data) }, fail: reject