|
@ -8,12 +8,18 @@ |
|
|
<view class="service-items-list"> |
|
|
<view class="service-items-list"> |
|
|
<view class="service-item" v-for="(item, index) in items" :key="index"> |
|
|
<view class="service-item" v-for="(item, index) in items" :key="index"> |
|
|
<view class="item-header"> |
|
|
<view class="item-header"> |
|
|
<view class="item-id">{{item.id}}</view> |
|
|
|
|
|
<view class="item-name">{{item.name}}</view> |
|
|
|
|
|
|
|
|
<view class="item-id">{{item.day}}</view> |
|
|
|
|
|
<text style="margin: 0 10rpx;">|</text> |
|
|
|
|
|
<view class="item-name"> |
|
|
|
|
|
<text>{{ item.itemsText[0] }}</text> |
|
|
|
|
|
<text v-if="item.itemsText.length >= 2"> |
|
|
|
|
|
{{ item.itemsText[0] }}+{{ item.itemsText[item.itemsText.length - 1] }}{{ item.itemsText.length }}项 |
|
|
|
|
|
</text> |
|
|
|
|
|
</view> |
|
|
<view class="item-price-action"> |
|
|
<view class="item-price-action"> |
|
|
<view class="item-price">¥{{item.price.toFixed(2)}}</view> |
|
|
<view class="item-price">¥{{item.price.toFixed(2)}}</view> |
|
|
<!-- 展开按钮 --> |
|
|
<!-- 展开按钮 --> |
|
|
<view class="expand-btn" @click="toggleExpand(index)" v-if="item.pet || (item.customServices && item.customServices.length > 0)"> |
|
|
|
|
|
|
|
|
<view class="expand-btn" @click="toggleExpand(index)" v-if="item.pet || (item.pets && item.pets.length > 0)"> |
|
|
<!-- <text>{{ expandedItems.includes(index) ? '收起' : '展开' }}</text> --> |
|
|
<!-- <text>{{ expandedItems.includes(index) ? '收起' : '展开' }}</text> --> |
|
|
<view class="expand-icon" :class="{'expanded': expandedItems.includes(index)}"> |
|
|
<view class="expand-icon" :class="{'expanded': expandedItems.includes(index)}"> |
|
|
<text class="icon-arrow">{{ expandedItems.includes(index) ? '∧' : '∨' }}</text> |
|
|
<text class="icon-arrow">{{ expandedItems.includes(index) ? '∧' : '∨' }}</text> |
|
@ -23,22 +29,24 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 详细信息区域 --> |
|
|
<!-- 详细信息区域 --> |
|
|
<view class="detail-area" v-show="expandedItems.includes(index)"> |
|
|
|
|
|
<!-- 宠物名称和头像 --> |
|
|
|
|
|
<view class="item-pet" v-if="item.pet"> |
|
|
|
|
|
<view class="pet-avatar"> |
|
|
|
|
|
<image :src="item.petAvatar || '/static/images/default-pet.png'" mode="aspectFill"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<text>{{item.pet}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 定制服务 --> |
|
|
|
|
|
<view class="custom-services" v-if="item.customServices && item.customServices.length > 0"> |
|
|
|
|
|
<view class="custom-service-item" v-for="(service, serviceIndex) in item.customServices" :key="serviceIndex"> |
|
|
|
|
|
<view class="service-name">{{service.name}}</view> |
|
|
|
|
|
<view class="service-price">¥{{service.price.toFixed(2)}} × {{service.quantity}} 次</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="detail-area" v-if="expandedItems.includes(index)"> |
|
|
|
|
|
<view class="detail-area-item" v-for="(pet, petIndex) in item.pets" :key="petIndex"> |
|
|
|
|
|
<!-- 宠物名称和头像 --> |
|
|
|
|
|
<view class="item-pet" v-if="pet"> |
|
|
|
|
|
<view class="pet-avatar"> |
|
|
|
|
|
<image :src="pet.photo" mode="aspectFill"></image> |
|
|
|
|
|
</view> |
|
|
|
|
|
<text>{{pet.name}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 定制服务 --> |
|
|
|
|
|
<view class="custom-services-list" v-if="pet.itemList && pet.itemList.length > 0"> |
|
|
|
|
|
<view class="custom-service-item" v-for="(t, itemIndex) in pet.itemList" :key="itemIndex"> |
|
|
|
|
|
<view class="service-name">{{t.productName}}</view> |
|
|
|
|
|
<view class="service-price">¥{{ t.salePrice && t.salePrice.toFixed(2) }} × {{t.quantity}} 次</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -119,7 +127,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.card-title { |
|
|
.card-title { |
|
|
font-size: 32rpx; |
|
|
|
|
|
|
|
|
font-size: 30rpx; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
color: #333; |
|
|
color: #333; |
|
|
margin-bottom: 20rpx; |
|
|
margin-bottom: 20rpx; |
|
@ -153,14 +161,14 @@ |
|
|
|
|
|
|
|
|
.item-id { |
|
|
.item-id { |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
color: #999; |
|
|
|
|
|
margin-right: 10rpx; |
|
|
margin-right: 10rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.item-name { |
|
|
.item-name { |
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
font-size: 24rpx; |
|
|
color: #333; |
|
|
color: #333; |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
|
|
|
display: flex; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.item-price-action { |
|
|
.item-price-action { |
|
@ -170,7 +178,6 @@ |
|
|
|
|
|
|
|
|
.item-price { |
|
|
.item-price { |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
color: #FF5252; |
|
|
|
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -207,34 +214,69 @@ |
|
|
|
|
|
|
|
|
// 详细信息区域 |
|
|
// 详细信息区域 |
|
|
.detail-area { |
|
|
.detail-area { |
|
|
padding: 15rpx; |
|
|
|
|
|
animation: fadeIn 0.3s ease; |
|
|
animation: fadeIn 0.3s ease; |
|
|
background-color: #F8F8F8; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
gap: 10rpx; |
|
|
|
|
|
.detail-area-item{ |
|
|
|
|
|
background-color: #F8F8F8; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
padding: 15rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.item-pet { |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.pet-avatar { |
|
|
|
|
|
width: 80rpx; |
|
|
|
|
|
height: 80rpx; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
margin-right: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.custom-services-list { |
|
|
|
|
|
.custom-service-item { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding: 15rpx 0; |
|
|
|
|
|
border-bottom: 1px solid #F0F0F0; |
|
|
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
|
border-bottom: none; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.service-name { |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.service-price { |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
color: #999; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.item-pet { |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
color: #666; |
|
|
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.pet-avatar { |
|
|
|
|
|
width: 40rpx; |
|
|
|
|
|
height: 40rpx; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
margin-right: 10rpx; |
|
|
|
|
|
border: 1px solid #EEEEEE; |
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.custom-services { |
|
|
.custom-services { |
|
|
padding: 10rpx 0 10rpx 20rpx; |
|
|
padding: 10rpx 0 10rpx 20rpx; |
|
|