feat: 修改店铺当即展示
This commit is contained in:
@@ -65,7 +65,6 @@
|
||||
onLoad((query) => {
|
||||
skuId.value = query?.skuId ?? query?.shopId ?? '';
|
||||
name.value = query?.name ?? '';
|
||||
cover.value = query?.cover ?? '';
|
||||
fetchList(true);
|
||||
});
|
||||
|
||||
@@ -137,6 +136,11 @@
|
||||
}).catch(() => ({ code: -1 }));
|
||||
if (res?.code !== 0) return;
|
||||
const list = Array.isArray(res?.data?.list) ? res.data.list : [];
|
||||
if (!cover.value && list.length) {
|
||||
const firstItem = Array.isArray(list?.[0]?.items) ? list[0].items[0] : null;
|
||||
const picUrl = firstItem?.picUrl || '';
|
||||
if (picUrl) cover.value = sheep.$url.cdn(picUrl);
|
||||
}
|
||||
const mapped = list.map(mapOrderToRecord);
|
||||
if (reset) recordList.value = [];
|
||||
recordList.value = recordList.value.concat(mapped);
|
||||
|
||||
Reference in New Issue
Block a user