feat(ui): 新增/优化界面样式、图标及交互组件
- 新增多个功能图标(箭头、盾牌、位置等) - 优化全局按钮、标签、输入框等组件样式 - 修复导航栏高度计算逻辑,适配微信小程序 - 优化消息页、订单页、个人中心等页面布局 - 修复微信支付配置及通知接口问题
这个提交包含在:
@@ -1,50 +1,38 @@
|
||||
<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" />
|
||||
<!-- 1. 顶部日期选择条(1:1 复刻 frame_020:左大号日期 + 右日历图标「选择日期」) -->
|
||||
<view class="date-header-row">
|
||||
<text class="dh-date-val">{{ selectedDate }}</text>
|
||||
<picker mode="date" :value="selectedDate" :start="todayStr" @change="onDateChange">
|
||||
<view class="dh-picker-btn clickable-hover">
|
||||
<image class="dh-cal-icon" src="/static/icons/calendar-orange.svg" mode="aspectFit" />
|
||||
<text class="dh-cal-txt">选择日期</text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<!-- 2. 2x2 时段网格卡片(1:1 复刻 frame_020:上午/中午/下午/晚上 + 具体时间段) -->
|
||||
<view class="slot-grid">
|
||||
<view
|
||||
class="slot-card clickable-hover"
|
||||
v-for="item in slotList"
|
||||
:key="item.name"
|
||||
:class="{ active: selectedSlot === item.name }"
|
||||
@tap="selectedSlot = item.name"
|
||||
>
|
||||
<text class="slot-name">{{ item.name }}</text>
|
||||
<text class="slot-range">{{ item.range }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 上门日期滚动条 -->
|
||||
<view class="section-box">
|
||||
<text class="section-title">上门日期</text>
|
||||
<scroll-view class="date-scroll" scroll-x="true" show-scrollbar="false">
|
||||
<view class="date-list">
|
||||
<view
|
||||
class="date-card clickable-hover"
|
||||
v-for="d in dateList"
|
||||
:key="d.fullDate"
|
||||
:class="{ active: selectedDate === d.fullDate }"
|
||||
@tap="selectedDate = d.fullDate"
|
||||
>
|
||||
<text class="dc-tag">{{ d.tag }}</text>
|
||||
<text class="dc-date">{{ d.dateStr }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 3. 底部说明区(1:1 复刻 frame_020) -->
|
||||
<view class="explain-box">
|
||||
<text class="exp-title">说明:</text>
|
||||
<text class="exp-desc">期望上门时间仅供师傅参考,具体上门时间由师傅接单后和客户预约为准。</text>
|
||||
</view>
|
||||
|
||||
<!-- 上门时段纯净卡片 -->
|
||||
<view class="section-box">
|
||||
<text class="section-title">上门时段</text>
|
||||
<view class="slot-grid">
|
||||
<view
|
||||
class="slot-card clickable-hover"
|
||||
v-for="name in slotList"
|
||||
:key="name"
|
||||
:class="{ active: selectedSlot === name }"
|
||||
@tap="selectedSlot = name"
|
||||
>
|
||||
<text class="slot-txt">{{ name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部确定按钮 -->
|
||||
<!-- 4. 底部通栏橙色确定按钮 -->
|
||||
<view class="drawer-foot">
|
||||
<view class="confirm-btn clickable-hover" @tap="handleConfirm">
|
||||
<text class="cb-txt">确定</text>
|
||||
@@ -55,7 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
@@ -65,39 +53,32 @@
|
||||
|
||||
const emit = defineEmits(['update:visible', 'confirm']);
|
||||
|
||||
const slotList = ['上午', '下午', '晚上', '全天'];
|
||||
const slotList = [
|
||||
{ name: '上午', range: '07:00~10:59' },
|
||||
{ name: '中午', range: '11:00~13:59' },
|
||||
{ name: '下午', range: '14:00~17:59' },
|
||||
{ name: '晚上', range: '18:00~20:59' }
|
||||
];
|
||||
|
||||
// 生成未来 7 天日期
|
||||
const dateList = computed(() => {
|
||||
const list = [];
|
||||
const weekNames = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||
const now = new Date();
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const target = new Date(now.getTime() + i * 24 * 3600 * 1000);
|
||||
const year = target.getFullYear();
|
||||
const month = String(target.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(target.getDate()).padStart(2, '0');
|
||||
const fullDate = `${year}-${month}-${day}`;
|
||||
const dateStr = `${month}-${day}`;
|
||||
let tag = weekNames[target.getDay()];
|
||||
if (i === 0) tag = '今天';
|
||||
else if (i === 1) tag = '明天';
|
||||
else if (i === 2) tag = '后天';
|
||||
list.push({ fullDate, dateStr, tag });
|
||||
}
|
||||
return list;
|
||||
});
|
||||
const now = new Date();
|
||||
const todayStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`;
|
||||
|
||||
const selectedDate = ref('');
|
||||
const selectedDate = ref(todayStr);
|
||||
const selectedSlot = ref('晚上');
|
||||
|
||||
watch(() => props.visible, (v) => {
|
||||
if (v) {
|
||||
selectedDate.value = props.date || (dateList.value[0] ? dateList.value[0].fullDate : '');
|
||||
selectedDate.value = props.date || todayStr;
|
||||
selectedSlot.value = props.slot || '晚上';
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
function onDateChange(e) {
|
||||
if (e && e.detail && e.detail.value) {
|
||||
selectedDate.value = e.detail.value;
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit('update:visible', false);
|
||||
}
|
||||
@@ -116,8 +97,7 @@
|
||||
.drawer-mask {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(2px);
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -132,12 +112,9 @@
|
||||
|
||||
.drawer-sheet {
|
||||
background: #FFFFFF;
|
||||
border-top-left-radius: 28rpx;
|
||||
border-top-right-radius: 28rpx;
|
||||
padding: 36rpx 36rpx calc(30rpx + env(safe-area-inset-bottom));
|
||||
padding: 0 0 calc(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 {
|
||||
@@ -145,151 +122,120 @@
|
||||
to { transform: translateY(0); }
|
||||
}
|
||||
|
||||
.drawer-head {
|
||||
.date-header-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 24rpx;
|
||||
height: 108rpx;
|
||||
padding: 0 36rpx;
|
||||
border-bottom: 1rpx solid #F0F0F2;
|
||||
}
|
||||
|
||||
.dh-title {
|
||||
font-size: 34rpx;
|
||||
.dh-date-val {
|
||||
font-size: 38rpx;
|
||||
font-weight: 700;
|
||||
color: #1A1A1A;
|
||||
color: #1F1F1F;
|
||||
}
|
||||
|
||||
.dh-close {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
.dh-picker-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.dh-close-img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
opacity: 0.75;
|
||||
.dh-cal-icon {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
|
||||
.section-box {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.date-scroll {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.date-list {
|
||||
display: inline-flex;
|
||||
gap: 16rpx;
|
||||
padding: 4rpx 0;
|
||||
}
|
||||
|
||||
.date-card {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 136rpx;
|
||||
height: 124rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #F8F9FA;
|
||||
border: 2rpx solid transparent;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.18s ease;
|
||||
}
|
||||
|
||||
.date-card.active {
|
||||
background: #FFF9F5;
|
||||
border-color: #F0710D;
|
||||
}
|
||||
|
||||
.dc-tag {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.date-card.active .dc-tag {
|
||||
color: #F0710D;
|
||||
}
|
||||
|
||||
.dc-date {
|
||||
font-size: 24rpx;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.date-card.active .dc-date {
|
||||
color: #F0710D;
|
||||
.dh-cal-txt {
|
||||
font-size: 30rpx;
|
||||
color: #1F1F1F;
|
||||
}
|
||||
|
||||
.slot-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 16rpx;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 28rpx;
|
||||
padding: 40rpx 36rpx;
|
||||
border-bottom: 1rpx solid #F0F0F2;
|
||||
}
|
||||
|
||||
.slot-card {
|
||||
height: 84rpx;
|
||||
height: 156rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #F8F9FA;
|
||||
border: 2rpx solid transparent;
|
||||
background: #F7F7F7;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
transition: all 0.18s ease;
|
||||
}
|
||||
|
||||
.slot-card.active {
|
||||
background: #FFF9F5;
|
||||
border-color: #F0710D;
|
||||
background: #FDF7F0;
|
||||
border-color: #D4883A;
|
||||
}
|
||||
|
||||
.slot-txt {
|
||||
.slot-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #1F1F1F;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.slot-card.active .slot-name {
|
||||
color: #E07A2E;
|
||||
}
|
||||
|
||||
.slot-range {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.slot-card.active .slot-range {
|
||||
color: #E07A2E;
|
||||
}
|
||||
|
||||
.explain-box {
|
||||
padding: 36rpx 36rpx 80rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.exp-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
font-weight: 700;
|
||||
color: #1F1F1F;
|
||||
}
|
||||
|
||||
.slot-card.active .slot-txt {
|
||||
color: #F0710D;
|
||||
.exp-desc {
|
||||
font-size: 28rpx;
|
||||
color: #444444;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.drawer-foot {
|
||||
padding-top: 36rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
height: 88rpx;
|
||||
height: 96rpx;
|
||||
background: #F0710D;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background 0.15s ease, transform 0.1s ease;
|
||||
}
|
||||
|
||||
.confirm-btn:active {
|
||||
background: #E06305;
|
||||
transform: scale(0.99);
|
||||
}
|
||||
|
||||
.cb-txt {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
letter-spacing: 2rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.clickable-hover:active {
|
||||
|
||||
在新工单中引用
屏蔽一个用户