- 新增多个功能图标(箭头、盾牌、位置等) - 优化全局按钮、标签、输入框等组件样式 - 修复导航栏高度计算逻辑,适配微信小程序 - 优化消息页、订单页、个人中心等页面布局 - 修复微信支付配置及通知接口问题
166 行
3.7 KiB
Vue
166 行
3.7 KiB
Vue
<template>
|
||
<view class="drawer-mask" v-if="visible" @tap="close">
|
||
<view class="drawer-sheet" @tap.stop>
|
||
<!-- 标题栏(1:1 复刻 frame_006:左对齐“费用明细”,右侧关闭叉) -->
|
||
<view class="drawer-head">
|
||
<text class="dh-title">费用明细</text>
|
||
<view class="dh-close clickable-hover" @tap="close">
|
||
<image class="dh-close-img" src="/static/icons/close.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 费用明细列表(1:1 复刻 frame_006) -->
|
||
<view class="drawer-body">
|
||
<!-- 商品总价 -->
|
||
<view class="fee-row">
|
||
<text class="fee-label">商品总价</text>
|
||
<text class="fee-value">¥{{ baseAmount }}</text>
|
||
</view>
|
||
|
||
<!-- 增项服务 -->
|
||
<view class="fee-row" v-if="Number(addonAmount) > 0">
|
||
<text class="fee-label">增项服务费</text>
|
||
<text class="fee-value">¥{{ addonAmount }}</text>
|
||
</view>
|
||
|
||
<!-- 楼层上楼费 -->
|
||
<view class="fee-row" v-if="Number(floorAmount) > 0">
|
||
<text class="fee-label">步梯搬运费</text>
|
||
<text class="fee-value">¥{{ floorAmount }}</text>
|
||
</view>
|
||
|
||
<!-- 加急费 -->
|
||
<view class="fee-row" v-if="Number(urgentAmount) > 0">
|
||
<text class="fee-label">加急服务费</text>
|
||
<text class="fee-value">¥{{ urgentAmount }}</text>
|
||
</view>
|
||
|
||
<!-- 优惠券抵扣(红底白字“券”徽章 + 红色负值,1:1 复刻 frame_006) -->
|
||
<view class="fee-row">
|
||
<view class="coupon-label-wrap">
|
||
<view class="quan-badge">券</view>
|
||
<text class="fee-label">优惠券</text>
|
||
</view>
|
||
<text class="fee-value discount">- ¥{{ discountAmount || '0.00' }}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
visible: { type: Boolean, default: false },
|
||
baseAmount: { type: [Number, String], default: '0.00' },
|
||
addonAmount: { type: [Number, String], default: '0.00' },
|
||
floorAmount: { type: [Number, String], default: '0.00' },
|
||
urgentAmount: { type: [Number, String], default: '0.00' },
|
||
discountAmount: { type: [Number, String], default: '0.00' },
|
||
payAmount: { type: [Number, String], default: '0.00' }
|
||
});
|
||
|
||
const emit = defineEmits(['update:visible']);
|
||
|
||
function close() {
|
||
emit('update:visible', false);
|
||
}
|
||
</script>
|
||
|
||
<style scoped>
|
||
.drawer-mask {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(0, 0, 0, 0.55);
|
||
z-index: 999;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.drawer-sheet {
|
||
background: #FFFFFF;
|
||
border-top-left-radius: 24rpx;
|
||
border-top-right-radius: 24rpx;
|
||
padding: 32rpx 32rpx calc(48rpx + env(safe-area-inset-bottom));
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.drawer-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding-bottom: 24rpx;
|
||
}
|
||
|
||
.dh-title {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.dh-close {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.dh-close-img {
|
||
width: 30rpx;
|
||
height: 30rpx;
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.drawer-body {
|
||
padding: 8rpx 0;
|
||
}
|
||
|
||
.fee-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 22rpx 0;
|
||
}
|
||
|
||
.fee-label {
|
||
font-size: 30rpx;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.fee-value {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.coupon-label-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12rpx;
|
||
}
|
||
|
||
.quan-badge {
|
||
width: 36rpx;
|
||
height: 36rpx;
|
||
border-radius: 6rpx;
|
||
background: #E8331B;
|
||
color: #FFFFFF;
|
||
font-size: 22rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.fee-value.discount {
|
||
color: #E8331B;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
opacity: 0.85;
|
||
}
|
||
</style>
|