- 新增epay v2、v3、v3new版本的支付类库及证书文件 - 新增cos云存储类库文件 - 调整文件上传保存格式为按分类存储 - 修复会员、规则、类目等语言翻译键名 - 新增小程序图标等静态资源文件
194 行
3.8 KiB
Vue
194 行
3.8 KiB
Vue
<template>
|
||
<view class="drawer-mask" v-if="visible" @tap="close">
|
||
<view class="drawer-sheet" @tap.stop>
|
||
<!-- 标题栏(左对齐大字加粗,右侧关闭叉) -->
|
||
<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>
|
||
|
||
<!-- 品牌网格 -->
|
||
<scroll-view class="drawer-body" scroll-y="true">
|
||
<view class="logistics-grid">
|
||
<view
|
||
class="logistics-card clickable-hover"
|
||
v-for="name in companyList"
|
||
:key="name"
|
||
:class="{ active: currentName === name }"
|
||
@tap="selectCompany(name)"
|
||
>
|
||
<text class="lc-name">{{ name }}</text>
|
||
<view class="lc-dot-active" v-if="currentName === name">
|
||
<image class="lc-check-icon" src="/static/icons/check-white.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
visible: { type: Boolean, default: false },
|
||
currentName: { type: String, default: '' }
|
||
});
|
||
|
||
const emit = defineEmits(['update:visible', 'select']);
|
||
|
||
const companyList = [
|
||
'顺丰速运',
|
||
'德邦快递',
|
||
'京东物流',
|
||
'中通快递',
|
||
'圆通速递',
|
||
'申通快递',
|
||
'韵达快递',
|
||
'极兔速递',
|
||
'跨越速运',
|
||
'安能物流',
|
||
'壹米滴答',
|
||
'同城专线物流',
|
||
'厂家专车配送',
|
||
'送货上门无需物流'
|
||
];
|
||
|
||
function selectCompany(name) {
|
||
emit('select', name);
|
||
close();
|
||
}
|
||
|
||
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(30rpx + env(safe-area-inset-bottom));
|
||
max-height: 75vh;
|
||
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: 24rpx;
|
||
}
|
||
|
||
.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 {
|
||
max-height: 580rpx;
|
||
padding: 16rpx 0;
|
||
}
|
||
|
||
.logistics-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, 1fr);
|
||
gap: 16rpx;
|
||
}
|
||
|
||
.logistics-card {
|
||
padding: 24rpx 16rpx;
|
||
background: #F8F8F8;
|
||
border: 2rpx solid transparent;
|
||
border-radius: 12rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
text-align: center;
|
||
position: relative;
|
||
transition: all 0.18s ease;
|
||
}
|
||
|
||
.logistics-card.active {
|
||
background: #FFF8F2;
|
||
border-color: #F0710D;
|
||
}
|
||
|
||
.lc-name {
|
||
font-size: 28rpx;
|
||
color: #333333;
|
||
}
|
||
|
||
.logistics-card.active .lc-name {
|
||
color: #F0710D;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.lc-dot-active {
|
||
position: absolute;
|
||
bottom: 0;
|
||
right: 0;
|
||
width: 32rpx;
|
||
height: 28rpx;
|
||
background: #F0710D;
|
||
border-top-left-radius: 12rpx;
|
||
border-bottom-right-radius: 10rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.lc-check-icon {
|
||
width: 18rpx;
|
||
height: 18rpx;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
opacity: 0.85;
|
||
}
|
||
</style>
|