This commit is contained in:
2024-03-25 14:44:38 +08:00
parent 4fb648f003
commit 91af869899
10 changed files with 103 additions and 37 deletions

View File

@@ -6,16 +6,16 @@
</view>
<scroll-view class='scroll-view'>
<view class='c-flex-column' v-for='(item, index) in 10' :key='index'>
<view class='c-flex-column' v-for='(item, index) in groupbuyList' :key='index'>
<view class='item c-flex-row' @click.stop='goPath("/pages/common/groupbuy/detail")'>
<image class='goods-image' :src='assetsUrl("test_bg.png")' />
<image class='goods-image' :src='JSON.parse(item.content)[0].images' />
<view class='c-flex-column' style='flex: 1'>
<view class='goods-name'>女童夏装套装洋气装短袖阔腿裤短</view>
<view class='goods-name'>{{ item.name }}</view>
<view class='middle-view c-flex-row'>
<text>原价56</text>
<text>原价{{ item.payPrice }}</text>
<view class='decline c-flex-row'>
<image :src='assetsUrl("ic_decline.png")' />
<text>直降15</text>
<text>直降{{ item.offsetPrice }}</text>
</view>
<text>即将恢复</text>
</view>
@@ -38,10 +38,26 @@ import { getGroupBuyList } from '@/api/groupbuy';
import { goPath } from '@/utils';
const tabIndex = ref(0);
const groupbuyList = ref([]);
onLoad((e) => {
getGroupBuyList();
fetchData();
});
watch(() => tabIndex.value, () => {
fetchData();
});
const fetchData = async () => {
const { list } = await getGroupBuyList({
pageNum: 1,
pageSize: 100,
obj: {
status: tabIndex.value
}
});
groupbuyList.value = list;
};
</script>
<style lang='scss' scoped>