登录页面调整

This commit is contained in:
2024-03-15 14:02:39 +08:00
parent 43b5ea640e
commit 3ce85e2396
8 changed files with 103 additions and 150 deletions

View File

@@ -0,0 +1,77 @@
<template>
<tabbar :titles='["全部","未使用","已使用"]' :indicator-color='"#D95554"' @change='args => {}' />
<scroll-view :scroll-y='true' class='content'>
<coupon-item v-for='item in coupons' :item='item' />
</scroll-view>
</template>
<script lang='ts' setup>
import CouponItem from './components/coupon-item.vue';
import { getCouponList } from '@/api/user';
const coupons = ref([{
id: 1,
title: '优惠券',
desc: '满100减10',
price: 100,
threshold: 10,
priceDesc: '满100减10',
useTime: '2021-12-31',
status: 1,
useStatus: '未使用'
}, {
id: 1,
title: '优惠券',
desc: '满100减10',
price: 200,
threshold: 80,
priceDesc: '满100减10',
useTime: '2021-01-01',
status: 1,
useStatus: '未使用'
}, {
id: 1,
title: '优惠券',
desc: '满100减10',
price: 300,
threshold: 60,
priceDesc: '满100减10',
useTime: '2023-12-31',
status: '0',
useStatus: '未使用'
}, {
id: 1,
title: '优惠券',
desc: '满100减10',
price: 50,
threshold: 50,
priceDesc: '满100减10',
useTime: '2021-10-31',
status: 0,
useStatus: '未使用'
}, {
id: 1,
title: '优惠券',
desc: '满1000减30',
price: 200,
threshold: 30,
priceDesc: '满100减10',
useTime: '2024-12-31',
status: 0,
useStatus: '未使用'
}]);
onLoad(async () => {
const { data } = await getCouponList({
obj: {
memberId: item?.id, status: 0
}, pageNum: 1, pageSize: 1000
});
coupons.value = data.list;
});
</script>
<style lang='scss' scoped>
</style>