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

预售

parent d5bcedf7
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</text> </text>
</scroll-view> </scroll-view>
</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" /> <img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view> <view>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text> <text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
...@@ -205,7 +205,6 @@ onMounted(async () => { ...@@ -205,7 +205,6 @@ onMounted(async () => {
getPresaleProd(); getPresaleProd();
presaleSortList(); presaleSortList();
chooseTab('3287'); chooseTab('3287');
choice(0, '3292');
}); });
// 预售板块轮播图 // 预售板块轮播图
const getPresale = () => { const getPresale = () => {
...@@ -254,7 +253,16 @@ const getPresaleProd = () => { ...@@ -254,7 +253,16 @@ const getPresaleProd = () => {
}; };
// 二级分类点击事件 // 二级分类点击事件
const choice = (index, categoryId) => { 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; 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