This commit is contained in:
杨鹏
2025-10-11 16:06:53 +08:00
parent 0f450c6691
commit 09f8815234
24 changed files with 926 additions and 832 deletions
+22 -21
View File
@@ -1,6 +1,9 @@
<!-- 装修用户组件用户订单 -->
<template>
<view class="ss-order-menu-wrap ss-flex ss-col-center" :style="[style, { marginLeft: `${data.space}px` }]">
<view
class="ss-order-menu-wrap ss-flex ss-col-center"
:style="[style, { marginLeft: `${data.space}px` }]"
>
<view
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
v-for="item in orderMap"
@@ -31,7 +34,7 @@
{
title: '待付款',
value: '1',
icon: '/static/img/shop/order/no_pay.png',
icon: 'https://puton.huimeimeta.com/imgs/no_pay.png',
path: '/pages/order/list',
type: 'unpaid',
count: 'unpaidCount',
@@ -39,7 +42,7 @@
{
title: '待收货',
value: '3',
icon: '/static/img/shop/order/no_take.png',
icon: 'https://puton.huimeimeta.com/imgs/no_take.png',
path: '/pages/order/list',
type: 'noget',
count: 'deliveredCount',
@@ -47,7 +50,7 @@
{
title: '待评价',
value: '4',
icon: '/static/img/shop/order/no_comment.png',
icon: 'https://puton.huimeimeta.com/imgs/no_comment.png',
path: '/pages/order/list',
type: 'nocomment',
count: 'uncommentedCount',
@@ -55,7 +58,7 @@
{
title: '售后单',
value: '0',
icon: '/static/img/shop/order/change_order.png',
icon: 'https://puton.huimeimeta.com/imgs/change_order.png',
path: '/pages/order/aftersale/list',
type: 'aftersale',
count: 'afterSaleCount',
@@ -63,35 +66,33 @@
{
title: '全部订单',
value: '0',
icon: '/static/img/shop/order/all_order.png',
icon: 'https://puton.huimeimeta.com/imgs/all_order.png',
path: '/pages/order/list',
},
];
// 接收参数
const props = defineProps({
// 装修数据
data: {
type: Object,
default: () => ({}),
},
// 装修样式
styles: {
type: Object,
default: () => ({}),
},
// 装修数据
data: {
type: Object,
default: () => ({}),
},
// 装修样式
styles: {
type: Object,
default: () => ({}),
},
});
// 设置角标
const numData = computed(() => sheep.$store('user').numData);
// 设置背景样式
const style = computed(() => {
// 直接从 props.styles 解构
const { bgType, bgImg, bgColor } = props.styles;
const { bgType, bgImg, bgColor } = props.styles;
// 根据 bgType 返回相应的样式
return {
background: bgType === 'img'
? `url(${bgImg}) no-repeat top center / 100% 100%`
: bgColor
};
background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor,
};
});
</script>