zyejMAll-mobile/sheep/components/s-coupon-card/s-coupon-card.vue

85 lines
1.9 KiB
Vue
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
<!-- 装修用户组件用户卡券 -->
<template>
2024-08-07 21:40:27 +08:00
<view class="ss-coupon-menu-wrap ss-flex ss-col-center">
<view
class="menu-item ss-flex-col ss-row-center ss-col-center"
v-for="item in props.list"
:key="item.title"
@tap="sheep.$router.go(item.path, { type: item.type })"
:class="item.type === 'all' ? 'menu-wallet' : 'ss-flex-1'"
>
<image class="item-icon" :src="sheep.$url.static(item.icon)" mode="aspectFit"></image>
<view class="menu-title ss-m-t-28">{{ item.title }}</view>
</view>
</view>
2024-08-07 10:31:42 +08:00
</template>
<script setup>
2024-08-07 21:40:27 +08:00
/**
* 装修组件 - 优惠券菜单
*/
import sheep from '@/sheep';
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
// 接收参数
const props = defineProps({
list: {
type: Array,
default() {
return [
{
title: '已领取',
value: '0',
icon: '/static/img/shop/order/nouse_coupon.png',
path: '/pages/coupon/list',
type: 'geted',
},
{
title: '已使用',
value: '0',
icon: '/static/img/shop/order/useend_coupon.png',
path: '/pages/coupon/list',
type: 'used',
},
{
title: '已失效',
value: '0',
icon: '/static/img/shop/order/out_coupon.png',
path: '/pages/coupon/list',
type: 'expired',
},
{
title: '领券中心',
value: '0',
icon: '/static/img/shop/order/all_coupon.png',
path: '/pages/coupon/list',
type: 'all',
},
];
},
},
});
2024-08-07 10:31:42 +08:00
</script>
<style lang="scss" scoped>
2024-08-07 21:40:27 +08:00
.ss-coupon-menu-wrap {
.menu-item {
height: 160rpx;
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.menu-title {
font-size: 24rpx;
line-height: 24rpx;
color: #333333;
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.item-icon {
width: 44rpx;
height: 44rpx;
}
}
2024-08-07 10:31:42 +08:00
2024-08-07 21:40:27 +08:00
.menu-wallet {
width: 144rpx;
}
}
</style>