优化
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user