文件
yjyf/yjyf-app/components/ModePickerDrawer.vue
MiAn fafddceaf2 feat: 新增发票抬头、晒单、钱包日志等模型及后台管理功能
- 新增 invoice_title、showcase、wallet_log 模型及对应语言包
- 新增后台控制器、视图及搜索字段配置
- 修复服务类目删除保护逻辑
- 优化后台登录页面文案及样式
- 新增前端角色切换逻辑及页面拦截
- 新增 SVG 图标及样式变量
- 修复接口权限及下拉框默认值问题
2026-11-11 17:02:35 +08:00

240 行
5.2 KiB
Vue

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<template>
<view class="drawer-mask" v-if="visible" @tap="close">
<view class="drawer-sheet" @tap.stop>
<!-- 标题栏(对标图一:居中加粗「请选择下单模式」+ 右上角关闭叉) -->
<view class="drawer-head">
<view class="dh-side"></view>
<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">
<!-- 1. 一口价下单 -->
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'fixed' }" @tap="select('fixed')">
<view class="mc-content">
<view class="mc-info">
<text class="mc-main-title">全国统一参考价,成本可控</text>
<text class="mc-sub-desc">支付后,师傅立即接单预约客户上门服务</text>
</view>
<view class="mc-action-btn">
<text class="mab-txt">一口价下单</text>
</view>
</view>
</view>
<!-- 2. 报价下单 -->
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'quote' }" @tap="select('quote')">
<view class="mc-content">
<view class="mc-info">
<text class="mc-main-title">多个师傅报价,择优选择</text>
<text class="mc-sub-desc">免费发布,选定师傅支付,师傅上门服务</text>
</view>
<view class="mc-action-btn">
<text class="mab-txt">报价下单</text>
</view>
</view>
</view>
<!-- 3. 自己定价 -->
<view class="mode-card clickable-hover" :class="{ active: currentMode === 'custom' }" @tap="select('custom')">
<view class="mc-content">
<view class="mc-info">
<text class="mc-main-title">价格自己定,更省钱</text>
<text class="mc-sub-desc">支付后,师傅立即接单预约客户上门服务</text>
</view>
<view class="mc-action-btn">
<text class="mab-txt">自己定价</text>
</view>
</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.55);
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: 32rpx 28rpx calc(32rpx + 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: 28rpx;
}
.dh-side {
width: 56rpx;
height: 56rpx;
}
.dh-title {
font-size: 32rpx;
font-weight: 700;
color: #1F1F1F;
text-align: center;
}
.dh-close {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.dh-close-img {
width: 34rpx;
height: 34rpx;
opacity: 0.7;
}
.drawer-body {
display: flex;
flex-direction: column;
gap: 24rpx;
}
.mode-card {
position: relative;
border-radius: 20rpx;
background: #FFFFFF;
border: 2rpx solid #F0F0F2;
overflow: hidden;
transition: all 0.18s ease;
}
.mode-card.active {
border-color: #F0710D;
background: #FFF7F0;
box-shadow: 0 4rpx 16rpx rgba(240, 113, 13, 0.08);
}
.mc-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 36rpx 26rpx 36rpx 28rpx;
gap: 20rpx;
}
.mc-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 10rpx;
}
.mc-main-title {
font-size: 30rpx;
font-weight: 700;
color: #1F1F1F;
line-height: 1.25;
}
.mc-sub-desc {
font-size: 24rpx;
color: #888888;
line-height: 1.35;
}
.mc-action-btn {
flex-shrink: 0;
width: 196rpx;
height: 68rpx;
border-radius: 34rpx;
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
display: flex;
align-items: center;
justify-content: center;
}
.mab-txt {
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
line-height: 1;
}
.drawer-foot {
padding-top: 28rpx;
}
.cancel-btn {
height: 88rpx;
background: #F5F6F8;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
}
.cancel-txt {
font-size: 30rpx;
font-weight: 600;
color: #444444;
line-height: 1;
}
.clickable-hover:active {
opacity: 0.85;
}
</style>