- 新增epay v2、v3、v3new版本的支付类库及证书文件 - 新增cos云存储类库文件 - 调整文件上传保存格式为按分类存储 - 修复会员、规则、类目等语言翻译键名 - 新增小程序图标等静态资源文件
249 行
5.5 KiB
Vue
249 行
5.5 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>
|
||
|
||
<!-- 精致模式卡片(纯净无多余文字说明) -->
|
||
<view class="drawer-body">
|
||
<!-- 一口价下单 -->
|
||
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'fixed' }" @tap="select('fixed')">
|
||
<view class="mc-left">
|
||
<view class="mc-icon-wrap">
|
||
<image class="mc-icon" src="/static/icons/mode-coin.svg" mode="aspectFit" />
|
||
</view>
|
||
<text class="mc-title">一口价下单</text>
|
||
</view>
|
||
<view class="mc-radio" :class="{ on: currentMode === 'fixed' }">
|
||
<image class="check-icon" v-if="currentMode === 'fixed'" src="/static/icons/check-white.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 报价下单 -->
|
||
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'quote' }" @tap="select('quote')">
|
||
<view class="mc-left">
|
||
<view class="mc-icon-wrap">
|
||
<image class="mc-icon" src="/static/icons/order-active.svg" mode="aspectFit" />
|
||
</view>
|
||
<text class="mc-title">师傅报价下单</text>
|
||
</view>
|
||
<view class="mc-radio" :class="{ on: currentMode === 'quote' }">
|
||
<image class="check-icon" v-if="currentMode === 'quote'" src="/static/icons/check-white.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 自己定价 -->
|
||
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'custom' }" @tap="select('custom')">
|
||
<view class="mc-left">
|
||
<view class="mc-icon-wrap">
|
||
<image class="mc-icon" src="/static/icons/role-switch.svg" mode="aspectFit" />
|
||
</view>
|
||
<text class="mc-title">自己定价下单</text>
|
||
</view>
|
||
<view class="mc-radio" :class="{ on: currentMode === 'custom' }">
|
||
<image class="check-icon" v-if="currentMode === 'custom'" src="/static/icons/check-white.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 底部取消按钮 -->
|
||
<view class="drawer-foot">
|
||
<view class="cancel-btn clickable-hover" @tap="close">
|
||
<text class="cancel-txt">取消</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
visible: { type: Boolean, default: false },
|
||
currentMode: { type: String, default: 'fixed' }
|
||
});
|
||
|
||
const emit = defineEmits(['update:visible', 'select']);
|
||
|
||
function select(mode) {
|
||
emit('select', mode);
|
||
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.2s 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));
|
||
box-sizing: border-box;
|
||
animation: drawerSlideUp 0.24s 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;
|
||
}
|
||
|
||
.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;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16rpx;
|
||
}
|
||
|
||
.mode-card {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
height: 110rpx;
|
||
padding: 0 28rpx;
|
||
border-radius: 16rpx;
|
||
background: #F8F9FA;
|
||
border: 2rpx solid transparent;
|
||
transition: all 0.18s ease;
|
||
}
|
||
|
||
.mode-card.active {
|
||
background: #FFF9F5;
|
||
border-color: #F0710D;
|
||
}
|
||
|
||
.mc-left {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20rpx;
|
||
}
|
||
|
||
.mc-icon-wrap {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
border-radius: 12rpx;
|
||
background: #FFFFFF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||
}
|
||
|
||
.mc-icon {
|
||
width: 36rpx;
|
||
height: 36rpx;
|
||
}
|
||
|
||
.mc-title {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #222222;
|
||
}
|
||
|
||
.mode-card.active .mc-title {
|
||
color: #F0710D;
|
||
}
|
||
|
||
.mc-radio {
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
border-radius: 50%;
|
||
border: 2rpx solid #D1D5DB;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: #FFFFFF;
|
||
transition: all 0.18s ease;
|
||
}
|
||
|
||
.mc-radio.on {
|
||
background: #F0710D;
|
||
border-color: #F0710D;
|
||
}
|
||
|
||
.check-icon {
|
||
width: 24rpx;
|
||
height: 24rpx;
|
||
}
|
||
|
||
.drawer-foot {
|
||
padding-top: 36rpx;
|
||
}
|
||
|
||
.cancel-btn {
|
||
height: 88rpx;
|
||
background: #F4F5F7;
|
||
border-radius: 12rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: background 0.15s ease, transform 0.1s ease;
|
||
}
|
||
|
||
.cancel-btn:active {
|
||
background: #E5E7EB;
|
||
transform: scale(0.99);
|
||
}
|
||
|
||
.cancel-txt {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #4B5563;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
opacity: 0.85;
|
||
}
|
||
</style>
|