feat:完善首页会员优选、我的社员ui重构

This commit is contained in:
2026-06-05 15:21:02 +08:00
parent 311f380dbc
commit f51892b9c5
9 changed files with 59 additions and 33 deletions
+10 -5
View File
@@ -27,7 +27,7 @@
<view class="m-b-12 size24 h_52" v-for="(item, i) in v.items" :key="i">
<view class="flex1 flex-center ju-between h_52 bg18 radius8 p-l-8 p-r-16">
<view class="lineOne c19">
{{item?.properties.length > 1? item?.properties.reduce((items2, items) => items2.valueName + ' ' + items.valueName,): item?.properties[0].valueName}}
{{ formatSkuProperties(item?.properties) }}
</view>
<view class="flex-center">
<view class="c19">x{{ item.count }}</view>
@@ -41,9 +41,7 @@
</view>
</view>
<view class="flex-row ju-between" :class="{ 'm-t-8': props.type == 3 }" v-else>
<view class="valueName size28" :class="{ c19: props.theme == 2 }">{{
v.properties.map((property) => property.valueName).join(' ')
}}</view>
<view class="valueName size28" :class="{ c19: props.theme == 2 }">{{ formatSkuProperties(v.properties) }}</view>
<view class="shrink size28 c_333" :class="{ c0: props.theme == 2 }">{{
`x${v.count}`
}}</view>
@@ -75,6 +73,13 @@
import sheep from '@/sheep';
const { proxy } = getCurrentInstance() as any;
let emit = defineEmits(['getOrderDetail']);
const formatSkuProperties = (properties: any) => {
const list = Array.isArray(properties) ? properties : [];
return list
.map((property) => property?.valueName)
.filter(Boolean)
.join(' ');
};
const props = defineProps({
data: {
type: Object,
@@ -160,4 +165,4 @@
.btnItem1 {
background: #F2F2F2;
}
</style>
</style>