diff --git a/pages/index/aiStore.vue b/pages/index/aiStore.vue index c09b4bb..3f1e367 100644 --- a/pages/index/aiStore.vue +++ b/pages/index/aiStore.vue @@ -113,7 +113,7 @@ 店铺等级 - LV.{{ shopSummary.level || 0 }} + {{ shopSummary.level || 0 }} @@ -305,7 +305,7 @@ const agencyTime = String(it?.agencyTime || '').trim(); const dateOnly = agencyTime ? agencyTime.split('T')[0].split(' ')[0] : ''; return { - id: it?.skuId ?? '', + skuId: it?.skuId ?? '', name: it?.aiShopCommodityName ?? '', createTime: dateOnly, progress: 0, diff --git a/pages/index/components/aistore_tab2.vue b/pages/index/components/aistore_tab2.vue index dd8fdfd..6b95521 100644 --- a/pages/index/components/aistore_tab2.vue +++ b/pages/index/components/aistore_tab2.vue @@ -69,13 +69,11 @@ const shopId = item?.id ?? ''; const skuId = item?.skuId ?? ''; const name = item?.name ?? ''; - const cover = item?.cover ?? ''; const url = '/pages/index/listRecord' + `?skuId=${encodeURIComponent(String(skuId))}` + `&shopId=${encodeURIComponent(String(shopId))}` + - `&name=${encodeURIComponent(String(name))}` + - `&cover=${encodeURIComponent(String(cover))}`; + `&name=${encodeURIComponent(String(name))}`; uni.navigateTo({ url }); }; diff --git a/pages/index/listRecord.vue b/pages/index/listRecord.vue index 9976f1d..2e30216 100644 --- a/pages/index/listRecord.vue +++ b/pages/index/listRecord.vue @@ -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);