Commit 649dea1b authored by 张娇(东信)'s avatar 张娇(东信)

预售

parent d5bcedf7
......@@ -47,7 +47,7 @@
</text>
</scroll-view>
</view>
<view class="tab-list" v-for="(item, index) in sortDataList" :key="index" @tap="toDetail">
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail">
<img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
......@@ -205,7 +205,6 @@ onMounted(async () => {
getPresaleProd();
presaleSortList();
chooseTab('3287');
choice(0, '3292');
});
// 预售板块轮播图
const getPresale = () => {
......@@ -254,7 +253,16 @@ const getPresaleProd = () => {
};
// 二级分类点击事件
const choice = (index, categoryId) => {
sortDataList.value = tabsData.value[index];
getPresaleProdList({ current: 1, size: 10, categoryId }).then((res) => {
res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
buyList.value = res.data.records;
if (index === 0) {
chooseTab('3287');
choice(0, '3273');
}
});
light.value = index;
};
// 左侧数据列表
......
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 to comment