文件
yjyf/yjyf-app/components/master/MasterHallView.vue
YuanWen 68ac7876fd chore: 优化上传分类规则并新增分享功能
- 新增上传分类归一化处理,统一白名单校验规则
- 新增COS存储记录同步逻辑
- 新增分享功能支持,配置多页面分享参数
- 新增订单案例分享按钮
- 新增订单自动校验和回收命令
- 新增测试脚本和图片同步脚本
- 优化后台上传分类配置,统一分类映射
2026-11-07 09:54:41 +08:00

1214 行
27 KiB
Vue

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

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

<template>
<view class="hall-view">
<!-- 1. 顶部沉浸式师傅状态与听单控制台(标准 135deg 橙色渐变) -->
<view class="hall-hero">
<view class="hero-circle c1"></view>
<view class="hero-circle c2"></view>
<YjyfNavBar theme="transparent" title="抢单大厅" :fixed="false" />
<view class="hall-header-body">
<view class="header-main">
<view class="h-user">
<view class="name-line">
<text class="h-name">{{ info ? info.realname : '认证师傅' }}</text>
<view class="level-badge" v-if="info">
<text class="level-txt">Lv{{ info.level }}</text>
</view>
<view class="city-badge" v-if="info && info.city">
<image class="city-ico" src="/static/icons/location-pin.svg" mode="aspectFit" />
<text class="city-txt">{{ info.city }}</text>
</view>
</view>
<text class="h-stats" v-if="info">
综合评分 {{ info.score }} 分 · 累计履约 {{ info.order_count }} 单
</text>
</view>
<view class="work-toggle clickable-hover" :class="{ paused: info && info.work_status === 'off' }" @tap="toggleWork">
<view class="dot"></view>
<text class="toggle-txt">{{ info && info.work_status === 'off' ? '已暂停' : '听单中' }}</text>
</view>
</view>
<!-- 接单技能范围与待履约工单快捷栏 -->
<view class="hero-quick-bar" v-if="info">
<view class="hq-item clickable-hover" @tap="goSkills">
<image class="hq-ico" src="/static/icons/master/hall-skill-setting.svg" mode="aspectFit" />
<text class="hq-txt">接单技能:已认证 {{ skillsCount }} 项</text>
<text class="hq-link">设置 ›</text>
</view>
<view class="hq-divider"></view>
<view class="hq-item clickable-hover" @tap="goMyOrders">
<text class="hq-txt">待处理工单:</text>
<text class="hq-num">{{ info.todo_count || 0 }}</text>
<text class="hq-link">去履约 ›</text>
</view>
</view>
</view>
</view>
<!-- 2. 跑马灯实时工单广播条 -->
<view class="broadcast-bar" v-if="broadcastList.length">
<image class="broadcast-ico" src="/static/icons/master/hall-broadcast.svg" mode="aspectFit" />
<swiper class="broadcast-swiper" :vertical="true" :autoplay="true" :interval="3500" :circular="true">
<swiper-item class="swiper-item" v-for="(item, idx) in broadcastList" :key="idx">
<text class="broadcast-txt">{{ item }}</text>
</swiper-item>
</swiper>
</view>
<!-- 3. 吸顶双层筛选与排序导航栏 -->
<view class="filter-sticky">
<view class="type-tabs">
<view
v-for="t in typeTabs"
:key="t.key"
class="t-tab clickable-hover"
:class="{ on: type === t.key }"
@tap="switchType(t.key)"
>
<text class="t-txt">{{ t.name }}</text>
<view class="t-count" v-if="counts[t.key] > 0" :class="{ active: type === t.key }">
<text class="t-count-txt">{{ counts[t.key] }}</text>
</view>
</view>
</view>
<view class="sort-bar">
<view class="sort-tabs">
<view
v-for="s in sortTabs"
:key="s.key"
class="s-tab clickable-hover"
:class="{ on: sort === s.key }"
@tap="switchSort(s.key)"
>
<text class="s-tab-txt">{{ s.name }}</text>
</view>
</view>
<view class="refresh-pill clickable-hover" @tap="load">
<image class="refresh-ico" src="/static/icons/master/hall-refresh.svg" mode="aspectFit" />
<text class="refresh-txt">刷新</text>
</view>
</view>
</view>
<!-- 4. 骨架屏加载态(Zero-Blank 规范) -->
<view class="skeleton-list" v-if="loading && !list.length">
<view class="sk-card" v-for="n in 3" :key="n">
<view class="sk-hd">
<view class="sk-line w60"></view>
<view class="sk-line w25"></view>
</view>
<view class="sk-bd">
<view class="sk-thumb"></view>
<view class="sk-col">
<view class="sk-line w80"></view>
<view class="sk-line w90"></view>
<view class="sk-line w50"></view>
</view>
</view>
</view>
</view>
<!-- 5. 抢单卡片列表(左图右文高密度布局) -->
<view class="list" v-else-if="list.length">
<view class="order-card clickable-hover" v-for="o in list" :key="o.id" @tap="goDetail(o)">
<!-- 卡片头部:服务标题 + 计价/金额 -->
<view class="card-hd">
<view class="hd-left">
<text class="tag-urgent" v-if="Number(o.urgent)">急单</text>
<text class="tag-svc-type" :class="{ repair: o.service_type_tag === '维修' }">
{{ o.service_type_tag || '安装' }}
</text>
<text class="svc-title">{{ o.service_name }}</text>
</view>
<view class="hd-right">
<template v-if="o.price_type === 'quote'">
<text class="quote-slogan">报价快,中选高</text>
<text class="quote-label">师傅竞价</text>
</template>
<template v-else>
<text class="price-mode-tag" :class="o.price_type">
{{ o.price_type === 'custom' ? '用户定价' : '一口价' }}
</text>
<view class="amt-box">
<text class="amt-symbol">¥</text>
<text class="amt-val">{{ o.pay_amount }}</text>
</view>
</template>
</view>
</view>
<!-- 卡片主体:左侧真实商品实拍图 + 右侧核心履约要素 -->
<view class="card-bd">
<view class="thumb-wrap" v-if="o.service_image">
<image class="goods-thumb" :src="o.service_image" mode="aspectFill" />
<view class="thumb-badge">
<text class="thumb-badge-txt">共{{ o.goods_num || 1 }}套</text>
</view>
</view>
<view class="info-col">
<!-- 商品与规格行 -->
<view class="goods-line">
<text class="goods-count">共{{ o.goods_num || 1 }}套商品</text>
<text class="goods-divider">·</text>
<text class="goods-name">{{ o.goods_model || o.goods_name || o.service_name }}</text>
</view>
<!-- 地址与真实距离行 -->
<view class="info-row">
<image class="row-icon" src="/static/icons/master/order-loc.svg" mode="aspectFit" />
<text class="row-txt addr-txt">{{ o.address }}</text>
<view class="dist-pill" v-if="o.distance_text">
<image class="dist-ico" src="/static/icons/master/hall-distance.svg" mode="aspectFit" />
<text class="dist-txt">{{ o.distance_text }}</text>
</view>
</view>
<!-- 期望上门时间行 -->
<view class="info-row">
<image class="row-icon" src="/static/icons/master/order-time.svg" mode="aspectFit" />
<text class="row-txt">期望上门:{{ o.appoint_text }}</text>
</view>
<!-- 楼层电梯与增项服务微标签 -->
<view class="badge-row">
<text class="cond-badge">楼层 {{ o.floor }} 层</text>
<text class="cond-badge">{{ Number(o.has_elevator) ? '有电梯' : '步梯无电梯' }}</text>
<text class="cond-badge addon" v-if="o.addon_services">{{ o.addon_services }}</text>
</view>
</view>
</view>
<!-- 客户工单要求备注 -->
<view class="remark-row" v-if="o.remark">
<text class="remark-tag">工单要求</text>
<text class="remark-txt">{{ o.remark }}</text>
</view>
<!-- 卡片底部:时效/名额提醒 + 唯一主操作按钮 -->
<view class="card-ft" @tap.stop>
<view class="ft-meta">
<template v-if="o.price_type === 'quote'">
<text class="quote-slot-txt">
{{ o.quote_count > 0 ? (o.quote_count + ' 位师傅已报价 · ') : '' }}只剩
</text>
<text class="quote-slot-num">{{ o.remaining_quote_slots ?? 4 }}</text>
<text class="quote-slot-txt">个报价名额</text>
</template>
<template v-else>
<image class="cd-ico" src="/static/icons/master/hall-countdown.svg" mode="aspectFit" />
<text class="left-label">有效倒计时:</text>
<text class="left-val" :class="{ urgent: o.left_seconds <= 1800 }">
{{ countdown(o.left_seconds) }}
</text>
</template>
</view>
<view class="ft-btns">
<view class="quote-btn clickable-hover" v-if="o.price_type === 'quote'" @tap="goDetail(o)">
<text class="btn-txt">立即报价</text>
</view>
<view class="grab-btn clickable-hover" v-else @tap="openGrabConfirm(o)">
<text class="btn-txt">{{ o.price_type === 'custom' ? '按此价接单' : '立即抢单' }}</text>
</view>
</view>
</view>
</view>
</view>
<!-- 6. 友好空状态 -->
<view class="empty-state" v-else>
<image class="empty-img" src="/static/icons/master/empty-orders.svg" mode="aspectFit" />
<text class="empty-title">当前筛选下暂无待接工单</text>
<text class="empty-sub">保持“听单中”状态或扩展认证技能,可获取更多同城好单</text>
<view class="empty-actions">
<view class="refresh-cta clickable-hover" @tap="load">刷新抢单大厅</view>
<view class="skill-cta clickable-hover" @tap="goSkills">扩展接单技能</view>
</view>
</view>
<!-- 7. 抢单防误点二次确认弹窗 -->
<view class="confirm-mask" v-if="selectedOrder" @tap="selectedOrder = null">
<view class="confirm-dialog" @tap.stop>
<text class="cd-title">抢单确认提示</text>
<view class="cd-summary">
<text class="cd-svc">{{ selectedOrder.service_name }}</text>
<text class="cd-addr">{{ selectedOrder.address }}</text>
<text class="cd-price">工单报酬:¥{{ selectedOrder.pay_amount }}</text>
</view>
<text class="cd-content">
请确认已了解订单服务要求、商品数量及服务地址。抢单成功后需在 2 小时内联系客户约定上门时间,无故弃单将影响您的派单优先级。
</text>
<view class="cd-actions">
<view class="cd-btn cancel clickable-hover" @tap="selectedOrder = null">
<text class="cd-btn-txt cancel">再看看</text>
</view>
<view class="cd-btn ok clickable-hover" :class="{ disabled: grabbing }" @tap="confirmGrab">
<text class="cd-btn-txt ok">{{ grabbing ? '抢单中...' : '确认抢单' }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import api from '@/utils/api.js';
import { isLogin, toLogin } from '@/utils/request.js';
import YjyfNavBar from '@/components/YjyfNavBar.vue';
const list = ref([]);
const info = ref(null);
const skillsCount = ref(0);
const counts = ref({ all: 0, fixed: 0, quote: 0, custom: 0 });
const loading = ref(false);
const type = ref('all');
const sort = ref('new');
const selectedOrder = ref(null);
const grabbing = ref(false);
const typeTabs = [
{ key: 'all', name: '全部订单' },
{ key: 'fixed', name: '一口价' },
{ key: 'quote', name: '师傅竞价' },
{ key: 'custom', name: '用户定价' }
];
const sortTabs = [
{ key: 'new', name: '最新发布' },
{ key: 'amount', name: '报酬最高' },
{ key: 'urgent', name: '急单优先' },
{ key: 'time', name: '时效最近' }
];
// 基于真实订单列表动态生成走马灯播报
const broadcastList = computed(() => {
if (!list.value.length) return [];
return list.value.slice(0, 6).map((o) => {
const region = o.district || o.city || '同城';
const priceDesc = o.price_type === 'quote' ? '开放竞价中' : `工费 ¥${o.pay_amount}`;
return `${region}业主发布【${o.service_name}】工单,${priceDesc},距离 ${o.distance_text || '附近'}`;
});
});
function switchType(k) {
if (type.value === k) return;
type.value = k;
load();
}
function switchSort(k) {
if (sort.value === k) return;
sort.value = k;
load();
}
function countdown(sec) {
const s = Number(sec) || 0;
if (s <= 0) return '尽快接单';
const d = Math.floor(s / 86400);
const h = Math.floor((s % 86400) / 3600);
const m = Math.floor((s % 3600) / 60);
if (d > 0) {
return `${d}天${h}小时`;
}
if (h > 0) {
return `${h}小时${m}分`;
}
return `${Math.max(1, m)}分钟`;
}
function goDetail(o) {
uni.navigateTo({ url: '/pages/master/detail?id=' + o.id });
}
function goSkills() {
uni.navigateTo({ url: '/pages/master/skills' });
}
function goMyOrders() {
uni.redirectTo({
url: '/pages/master/orders',
fail: () => uni.navigateTo({ url: '/pages/master/orders' })
});
}
function openGrabConfirm(o) {
selectedOrder.value = o;
}
async function confirmGrab() {
if (grabbing.value || !selectedOrder.value) return;
grabbing.value = true;
const o = selectedOrder.value;
try {
const res = await api.masterGrab({ order_id: o.id });
selectedOrder.value = null;
uni.showToast({ title: '抢单成功!', icon: 'success' });
setTimeout(() => {
uni.navigateTo({
url: `/pages/master/success?order_id=${o.id}&mobile=${res.user_mobile || ''}`
});
}, 450);
} catch (e) {
uni.showToast({ title: e.msg || '手慢了,该订单已被接走', icon: 'none' });
} finally {
grabbing.value = false;
}
}
async function load() {
if (!isLogin()) {
toLogin();
return;
}
loading.value = true;
try {
const [hallRes, meRes] = await Promise.all([
api.masterHall({ limit: 20, type: type.value, sort: sort.value }),
api.masterInfo()
]);
if (hallRes) {
list.value = hallRes.list || [];
if (hallRes.counts) {
counts.value = hallRes.counts;
}
}
if (meRes) {
info.value = meRes.applied ? meRes.master : null;
skillsCount.value = (meRes.skills || []).length;
}
} catch (e) {
} finally {
loading.value = false;
}
}
async function toggleWork() {
if (!info.value) return;
const next = info.value.work_status === 'off' ? 'on' : 'off';
try {
await api.masterToggle({ work_status: next });
info.value.work_status = next;
uni.showToast({ title: next === 'on' ? '已开启接单听单' : '已暂停接单', icon: 'none' });
} catch (e) {}
}
onMounted(() => {
load();
});
defineExpose({
load
});
</script>
<style scoped>
.hall-view {
min-height: 100vh;
background: #F5F6F8;
padding-bottom: 32rpx;
}
/* 1. 顶部沉浸式师傅状态区(标准 135deg 橙色渐变) */
.hall-hero {
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
position: relative;
overflow: hidden;
}
.hero-circle {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.12);
pointer-events: none;
}
.c1 {
width: 280rpx;
height: 280rpx;
right: -80rpx;
top: -100rpx;
}
.c2 {
width: 160rpx;
height: 160rpx;
left: -60rpx;
bottom: -50rpx;
}
.hall-header-body {
position: relative;
z-index: 2;
padding: 8rpx 24rpx 24rpx;
}
.header-main {
display: flex;
align-items: center;
justify-content: space-between;
}
.h-user {
flex: 1;
min-width: 0;
}
.name-line {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12rpx;
}
.h-name {
font-size: 36rpx;
font-weight: 700;
color: #FFFFFF;
}
.level-badge {
padding: 2rpx 12rpx;
background: rgba(255, 255, 255, 0.24);
border-radius: 8rpx;
}
.level-txt {
font-size: 22rpx;
color: #FFFFFF;
font-weight: 600;
}
.city-badge {
display: flex;
align-items: center;
padding: 2rpx 12rpx;
background: rgba(0, 0, 0, 0.14);
border-radius: 20rpx;
}
.city-ico {
width: 22rpx;
height: 22rpx;
margin-right: 4rpx;
}
.city-txt {
font-size: 22rpx;
color: #FFFFFF;
}
.h-stats {
display: block;
margin-top: 8rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.92);
}
.work-toggle {
display: flex;
align-items: center;
background: #FFFFFF;
padding: 0 24rpx;
height: 60rpx;
border-radius: 30rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
flex-shrink: 0;
}
.work-toggle.paused {
background: rgba(255, 255, 255, 0.28);
}
.dot {
width: 14rpx;
height: 14rpx;
border-radius: 50%;
background: #2FA84F;
margin-right: 10rpx;
}
.work-toggle.paused .dot {
background: #E8331B;
}
.toggle-txt {
font-size: 24rpx;
font-weight: 700;
color: #F0710D;
}
.work-toggle.paused .toggle-txt {
color: #FFFFFF;
}
/* 顶部快捷信息条 */
.hero-quick-bar {
margin-top: 20rpx;
padding: 14rpx 20rpx;
background: rgba(255, 255, 255, 0.16);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.hq-item {
display: flex;
align-items: center;
flex: 1;
justify-content: center;
}
.hq-ico {
width: 26rpx;
height: 26rpx;
margin-right: 8rpx;
}
.hq-txt {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.95);
}
.hq-num {
font-size: 26rpx;
font-weight: 700;
color: #FFFFFF;
margin: 0 6rpx;
}
.hq-link {
font-size: 22rpx;
font-weight: 600;
color: #FFFFFF;
margin-left: 8rpx;
}
.hq-divider {
width: 1rpx;
height: 28rpx;
background: rgba(255, 255, 255, 0.3);
margin: 0 12rpx;
}
/* 2. 跑马灯广播条 */
.broadcast-bar {
display: flex;
align-items: center;
background: #FFF7F0;
height: 64rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #F0F0F2;
}
.broadcast-ico {
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
.broadcast-swiper {
flex: 1;
height: 64rpx;
}
.swiper-item {
display: flex;
align-items: center;
}
.broadcast-txt {
font-size: 24rpx;
color: #F0710D;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 3. 吸顶筛选栏 */
.filter-sticky {
background: #FFFFFF;
position: sticky;
top: 0;
z-index: 10;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.type-tabs {
display: flex;
border-bottom: 1rpx solid #F0F0F2;
}
.t-tab {
flex: 1;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.t-txt {
font-size: 28rpx;
color: #444444;
font-weight: 500;
}
.t-tab.on .t-txt {
color: #1F1F1F;
font-weight: 700;
font-size: 30rpx;
}
.t-tab.on::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 48rpx;
height: 6rpx;
background: #F0710D;
border-radius: 4rpx;
}
.t-count {
margin-left: 6rpx;
padding: 0 10rpx;
height: 30rpx;
border-radius: 15rpx;
background: #F5F6F8;
display: flex;
align-items: center;
justify-content: center;
}
.t-count.active {
background: #FFF7F0;
}
.t-count-txt {
font-size: 22rpx;
color: #888888;
font-weight: 600;
}
.t-count.active .t-count-txt {
color: #F0710D;
}
.sort-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 24rpx;
}
.sort-tabs {
display: flex;
align-items: center;
gap: 16rpx;
}
.s-tab {
padding: 8rpx 20rpx;
background: #F5F6F8;
border-radius: 24rpx;
}
.s-tab-txt {
font-size: 24rpx;
color: #444444;
}
.s-tab.on {
background: #FFF7F0;
}
.s-tab.on .s-tab-txt {
color: #F0710D;
font-weight: 600;
}
.refresh-pill {
display: flex;
align-items: center;
padding: 8rpx 16rpx;
}
.refresh-ico {
width: 26rpx;
height: 26rpx;
margin-right: 6rpx;
}
.refresh-txt {
font-size: 24rpx;
color: #F0710D;
font-weight: 500;
}
/* 4. 骨架屏 */
.skeleton-list {
padding: 24rpx;
}
.sk-card {
background: #FFFFFF;
border-radius: 20rpx;
padding: 24rpx;
margin-bottom: 24rpx;
}
.sk-hd {
display: flex;
justify-content: space-between;
margin-bottom: 24rpx;
}
.sk-bd {
display: flex;
gap: 20rpx;
}
.sk-thumb {
width: 156rpx;
height: 156rpx;
border-radius: 16rpx;
background: #F5F6F8;
}
.sk-col {
flex: 1;
display: flex;
flex-direction: column;
gap: 16rpx;
}
.sk-line {
height: 28rpx;
background: #F5F6F8;
border-radius: 8rpx;
}
.w60 { width: 60%; }
.w25 { width: 25%; }
.w80 { width: 80%; }
.w90 { width: 90%; }
.w50 { width: 50%; }
/* 5. 抢单卡片列表 */
.list {
padding: 20rpx 24rpx;
}
.order-card {
background: #FFFFFF;
border-radius: 20rpx;
padding: 24rpx;
margin-bottom: 24rpx;
box-shadow: 0 6rpx 20rpx rgba(240, 113, 13, 0.06);
}
.card-hd {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #F0F0F2;
}
.hd-left {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10rpx;
flex: 1;
min-width: 0;
padding-right: 16rpx;
}
.tag-urgent {
font-size: 22rpx;
background: #E8331B;
color: #FFFFFF;
padding: 2rpx 12rpx;
border-radius: 8rpx;
font-weight: 600;
}
.tag-svc-type {
font-size: 22rpx;
padding: 2rpx 12rpx;
border-radius: 8rpx;
background: #FFF7F0;
color: #F0710D;
font-weight: 600;
}
.tag-svc-type.repair {
background: #FFF7F0;
color: #F98D25;
}
.svc-title {
font-size: 32rpx;
font-weight: 700;
color: #1F1F1F;
line-height: 1.35;
}
.hd-right {
display: flex;
flex-direction: column;
align-items: flex-end;
flex-shrink: 0;
}
.quote-slogan {
font-size: 22rpx;
color: #F0710D;
font-weight: 600;
}
.quote-label {
margin-top: 4rpx;
font-size: 24rpx;
color: #888888;
font-weight: 500;
}
.price-mode-tag {
font-size: 22rpx;
padding: 2rpx 10rpx;
border-radius: 6rpx;
font-weight: 600;
background: #FFF7F0;
color: #F0710D;
}
.amt-box {
display: flex;
align-items: baseline;
margin-top: 4rpx;
}
.amt-symbol {
font-size: 24rpx;
font-weight: 700;
color: #E8331B;
}
.amt-val {
font-size: 38rpx;
font-weight: 700;
color: #E8331B;
line-height: 1.1;
}
/* 卡片主体:左图右文 */
.card-bd {
display: flex;
align-items: flex-start;
padding: 20rpx 0;
gap: 20rpx;
}
.thumb-wrap {
width: 156rpx;
height: 156rpx;
border-radius: 16rpx;
overflow: hidden;
position: relative;
flex-shrink: 0;
background: #F5F6F8;
border: 1rpx solid #F0F0F2;
}
.goods-thumb {
width: 100%;
height: 100%;
}
.thumb-badge {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: rgba(31, 31, 31, 0.65);
padding: 4rpx 0;
text-align: center;
}
.thumb-badge-txt {
font-size: 22rpx;
color: #FFFFFF;
font-weight: 500;
}
.info-col {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 12rpx;
}
.goods-line {
display: flex;
align-items: center;
}
.goods-count {
font-size: 26rpx;
font-weight: 600;
color: #1F1F1F;
flex-shrink: 0;
}
.goods-divider {
margin: 0 8rpx;
color: #AAAAAA;
font-size: 24rpx;
}
.goods-name {
font-size: 26rpx;
color: #444444;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.info-row {
display: flex;
align-items: center;
}
.row-icon {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
flex-shrink: 0;
}
.row-txt {
font-size: 24rpx;
color: #444444;
line-height: 1.4;
}
.addr-txt {
flex: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.dist-pill {
display: flex;
align-items: center;
background: #FFF7F0;
padding: 2rpx 12rpx;
border-radius: 16rpx;
margin-left: 10rpx;
flex-shrink: 0;
}
.dist-ico {
width: 22rpx;
height: 22rpx;
margin-right: 4rpx;
}
.dist-txt {
font-size: 22rpx;
color: #F0710D;
font-weight: 600;
}
.badge-row {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
margin-top: 4rpx;
}
.cond-badge {
font-size: 22rpx;
color: #888888;
background: #F5F6F8;
padding: 4rpx 14rpx;
border-radius: 8rpx;
}
.cond-badge.addon {
color: #F0710D;
background: #FFF7F0;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/* 备注栏 */
.remark-row {
margin-bottom: 16rpx;
background: #F5F6F8;
padding: 12rpx 16rpx;
border-radius: 12rpx;
display: flex;
align-items: flex-start;
}
.remark-tag {
font-size: 22rpx;
color: #F0710D;
font-weight: 600;
margin-right: 12rpx;
flex-shrink: 0;
}
.remark-txt {
font-size: 24rpx;
color: #444444;
line-height: 1.4;
}
/* 卡片底部 */
.card-ft {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 18rpx;
border-top: 1rpx solid #F0F0F2;
}
.ft-meta {
display: flex;
align-items: center;
}
.cd-ico {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
.left-label {
font-size: 24rpx;
color: #888888;
}
.left-val {
font-size: 24rpx;
color: #F0710D;
font-weight: 600;
}
.left-val.urgent {
color: #E8331B;
}
.quote-slot-txt {
font-size: 24rpx;
color: #888888;
}
.quote-slot-num {
font-size: 26rpx;
color: #F0710D;
font-weight: 700;
margin: 0 6rpx;
}
.ft-btns {
display: flex;
align-items: center;
}
.grab-btn {
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
padding: 0 36rpx;
height: 68rpx;
border-radius: 34rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6rpx 16rpx rgba(240, 113, 13, 0.28);
}
.quote-btn {
background: #4A7CFF;
padding: 0 36rpx;
height: 68rpx;
border-radius: 34rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6rpx 16rpx rgba(74, 124, 255, 0.25);
}
.btn-txt {
color: #FFFFFF;
font-size: 26rpx;
font-weight: 600;
}
/* 6. 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
padding: 96rpx 40rpx;
}
.empty-img {
width: 192rpx;
height: 192rpx;
margin-bottom: 24rpx;
}
.empty-title {
font-size: 30rpx;
font-weight: 600;
color: #1F1F1F;
margin-bottom: 12rpx;
}
.empty-sub {
font-size: 24rpx;
color: #888888;
text-align: center;
margin-bottom: 32rpx;
}
.empty-actions {
display: flex;
gap: 24rpx;
}
.refresh-cta {
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
color: #FFFFFF;
font-size: 26rpx;
font-weight: 600;
padding: 0 36rpx;
height: 72rpx;
line-height: 72rpx;
border-radius: 36rpx;
}
.skill-cta {
background: #FFF7F0;
color: #F0710D;
font-size: 26rpx;
font-weight: 600;
padding: 0 36rpx;
height: 72rpx;
line-height: 72rpx;
border-radius: 36rpx;
border: 1rpx solid #F0710D;
}
/* 7. 抢单二次确认弹窗 */
.confirm-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx;
}
.confirm-dialog {
background: #FFFFFF;
border-radius: 24rpx;
padding: 40rpx 32rpx 32rpx;
width: 100%;
max-width: 600rpx;
}
.cd-title {
font-size: 34rpx;
font-weight: 700;
color: #1F1F1F;
display: block;
text-align: center;
margin-bottom: 24rpx;
}
.cd-summary {
background: #FFF7F0;
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 24rpx;
display: flex;
flex-direction: column;
gap: 8rpx;
}
.cd-svc {
font-size: 28rpx;
font-weight: 700;
color: #1F1F1F;
}
.cd-addr {
font-size: 24rpx;
color: #444444;
}
.cd-price {
font-size: 26rpx;
font-weight: 700;
color: #E8331B;
}
.cd-content {
font-size: 26rpx;
color: #444444;
line-height: 1.6;
display: block;
margin-bottom: 32rpx;
}
.cd-actions {
display: flex;
gap: 24rpx;
}
.cd-btn {
flex: 1;
height: 80rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.cd-btn.cancel {
background: #F5F6F8;
}
.cd-btn.ok {
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
}
.cd-btn.ok.disabled {
opacity: 0.6;
}
.cd-btn-txt.cancel {
color: #888888;
font-size: 28rpx;
font-weight: 500;
}
.cd-btn-txt.ok {
color: #FFFFFF;
font-size: 28rpx;
font-weight: 600;
}
.clickable-hover:active {
opacity: 0.85;
transform: scale(0.985);
}
</style>