- 新增epay v2、v3、v3new版本的支付类库及证书文件 - 新增cos云存储类库文件 - 调整文件上传保存格式为按分类存储 - 修复会员、规则、类目等语言翻译键名 - 新增小程序图标等静态资源文件
199 行
4.4 KiB
Vue
199 行
4.4 KiB
Vue
<template>
|
||
<view class="drawer-mask" v-if="visible" @tap="close">
|
||
<view class="drawer-sheet" @tap.stop>
|
||
<!-- 标题栏(参考 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>
|
||
|
||
<!-- 费用明细列表(参考 frame_006 1:1 视觉排版) -->
|
||
<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>
|
||
|
||
<!-- 优惠券抵扣(带圆形红包图标与红色加粗负值) -->
|
||
<view class="fee-row">
|
||
<view class="coupon-label-wrap">
|
||
<image class="coupon-red-icon" src="/static/icons/coupon-tag.svg" mode="aspectFit" />
|
||
<text class="fee-label">优惠券</text>
|
||
</view>
|
||
<text class="fee-value discount">- ¥{{ discountAmount || '0.00' }}</text>
|
||
</view>
|
||
|
||
<!-- 实付合计 -->
|
||
<view class="fee-row total-divider">
|
||
<text class="total-label">预计实付</text>
|
||
<text class="total-val">¥{{ payAmount }}</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.6);
|
||
backdrop-filter: blur(2px);
|
||
z-index: 999;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-end;
|
||
animation: drawerFadeIn 0.22s ease-out;
|
||
}
|
||
|
||
@keyframes drawerFadeIn {
|
||
from { opacity: 0; }
|
||
to { opacity: 1; }
|
||
}
|
||
|
||
.drawer-sheet {
|
||
background: #FFFFFF;
|
||
border-top-left-radius: 28rpx;
|
||
border-top-right-radius: 28rpx;
|
||
padding: 36rpx 36rpx calc(40rpx + env(safe-area-inset-bottom));
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
animation: drawerSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
|
||
box-shadow: 0 -8rpx 32rpx rgba(0, 0, 0, 0.08);
|
||
}
|
||
|
||
@keyframes drawerSlideUp {
|
||
from { transform: translateY(100%); }
|
||
to { transform: translateY(0); }
|
||
}
|
||
|
||
.drawer-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding-bottom: 30rpx;
|
||
}
|
||
|
||
.dh-title {
|
||
font-size: 34rpx;
|
||
font-weight: 700;
|
||
color: #1A1A1A;
|
||
letter-spacing: 0.5rpx;
|
||
}
|
||
|
||
.dh-close {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.dh-close-img {
|
||
width: 32rpx;
|
||
height: 32rpx;
|
||
opacity: 0.75;
|
||
}
|
||
|
||
.drawer-body {
|
||
padding: 10rpx 0;
|
||
}
|
||
|
||
.fee-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 24rpx 0;
|
||
}
|
||
|
||
.fee-label {
|
||
font-size: 32rpx;
|
||
color: #222222;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.fee-value {
|
||
font-size: 34rpx;
|
||
font-weight: 700;
|
||
color: #1A1A1A;
|
||
}
|
||
|
||
.coupon-label-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 14rpx;
|
||
}
|
||
|
||
.coupon-red-icon {
|
||
width: 38rpx;
|
||
height: 38rpx;
|
||
}
|
||
|
||
.fee-value.discount {
|
||
color: #E02020;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.total-divider {
|
||
border-top: 1rpx solid #F2F2F2;
|
||
margin-top: 16rpx;
|
||
padding-top: 30rpx;
|
||
}
|
||
|
||
.total-label {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1A1A1A;
|
||
}
|
||
|
||
.total-val {
|
||
font-size: 44rpx;
|
||
font-weight: 800;
|
||
color: #F0710D;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
opacity: 0.85;
|
||
}
|
||
</style>
|