| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053 |
- <template>
- <view class="container">
- <!-- 自定义导航栏标题 -->
- <view class="custom-nav-bar" :style="{ backgroundColor: scrollTop > 20 ? '#fff' : 'transparent' }">
- <text class="nav-title">任务中心</text>
- </view>
- <!-- 顶部自定义导航栏背景 -->
- <!-- 顶部自定义导航栏背景 -->
- <view class="nav-bg">
- <view class="bg-circle-left"></view>
- <view class="bg-circle-right"></view>
- </view>
- <!-- 头部用户信息与统计 -->
- <view class="header-section">
- <view class="user-info">
- <image class="avatar" :src="profile?.avatarUrl || '/static/touxiang.png'" mode="aspectFill"></image>
- <view class="info-content">
- <view class="top-row">
- <text class="name">{{ profile?.name || '未登录' }}</text>
- <view class="status-pill" :class="{ 'resting': workStatus !== 'busy' }" @click="goToWorkStatus">
- <view class="status-dot-bg"
- :class="{ 'busy': workStatus === 'busy', 'disabled': workStatus === 'disabled' }">
- <text class="check-mark" v-if="workStatus === 'busy'">✔</text>
- <text class="check-mark" v-else style="font-size: 16rpx; line-height: 20rpx;">✕</text>
- </view>
- <text class="status-text">{{ workStatus === 'busy' ? '接单中' : (workStatus === 'resting' ?
- '正在休息' : '已禁用') }}</text>
- <text class="arrow-down">▼</text>
- </view>
- </view>
- <view class="bottom-row" @click="handleManualLocation">
- <text class="city-label">接单城市:{{ profile?.cityName || '暂无' }}</text>
- <text class="city-arrow">></text>
- </view>
- </view>
- <!-- <view class="notification-box">
- <image class="bell-img" src="/static/icons/bell.svg"></image>
- <view class="badge-count">2</view>
- </view> -->
- </view>
- <!-- 统计卡片 -->
- <view class="stats-card">
- <view class="stat-item">
- <text class="num">{{ orderStats.total }}</text>
- <text class="label">全部订单</text>
- </view>
- <view class="divider"></view>
- <view class="stat-item">
- <text class="num">{{ orderStats.reject }}</text>
- <text class="label">拒接订单</text>
- </view>
- <view class="divider"></view>
- <view class="stat-item">
- <text class="num">{{ orderStats.completed }}</text>
- <text class="label">完成订单</text>
- </view>
- <view class="divider"></view>
- <view class="stat-item">
- <text class="num">{{ (orderStats.fulfillmentCommission / 100).toFixed(2) }}</text>
- <text class="label">服务总得</text>
- </view>
- </view>
- </view>
- <!-- 任务大厅标题栏 (Sticky Container) -->
- <view class="task-header">
- <!-- 标题栏内容 (Inner) -->
- <view class="header-inner"
- :style="{ backgroundColor: (scrollTop > 300 || isFilterShow) ? '#fff' : 'transparent' }">
- <view class="left-title">
- <view class="orange-bar"></view>
- <text class="title">任务大厅</text>
- <text class="count">- ({{ taskList.length }}单)</text>
- </view>
- <view class="filter-options">
- <view class="dropdown" @click="showFilterDropdown">
- <text>筛选条件</text>
- <text class="arrow-down">﹀</text>
- </view>
- </view>
- </view>
- <!-- 筛选遮罩 (Absolute Child: Starts below header) -->
- <view class="filter-mask" v-if="isFilterShow" @click="closeFilter"></view>
- <!-- 筛选下拉面板 (Absolute Child) -->
- <view class="filter-panel" :class="{ show: isFilterShow }">
- <view class="filter-section">
- <text class="section-title">服务类型</text>
- <view class="options-grid">
- <view class="option-btn" :class="{ active: tempFilter.service === null }"
- @click="selectService(null)">全部</view>
- <view class="option-btn" v-for="item in serviceList" :key="item.id"
- :class="{ active: tempFilter.service === item.id }" @click="selectService(item.id)">{{
- item.name }}</view>
- </view>
- </view>
- <view class="filter-section">
- <text class="section-title">金额</text>
- <view class="options-grid">
- <view class="option-btn" :class="{ active: tempFilter.amount === '全部' }"
- @click="selectAmount('全部')">全部</view>
- <view class="option-btn" :class="{ active: tempFilter.amount === '100以下' }"
- @click="selectAmount('100以下')">100以下</view>
- <view class="option-btn" :class="{ active: tempFilter.amount === '100-200' }"
- @click="selectAmount('100-200')">100-200</view>
- <view class="option-btn" :class="{ active: tempFilter.amount === '200-500' }"
- @click="selectAmount('200-500')">200-500</view>
- <view class="option-btn" :class="{ active: tempFilter.amount === '500以上' }"
- @click="selectAmount('500以上')">500以上</view>
- </view>
- </view>
- <view class="filter-actions">
- <button class="action-btn reset" @click="resetFilter">重置</button>
- <button class="action-btn confirm" @click="confirmFilter">确认</button>
- </view>
- </view>
- </view>
- <!-- 列表容器 -->
- <view class="task-list-container">
- <!-- 任务列表 -->
- <view class="task-list">
- <view class="task-card" v-for="item in taskList" :key="item.id" @click="goToDetail(item)">
- <view class="card-header">
- <view class="type-badge">
- <image class="type-icon" :src="item.typeIcon"></image>
- <text class="type-text">{{ item.typeText }}</text>
- </view>
- <text class="price">¥{{ item.price }}</text>
- </view>
- <view class="card-body">
- <view class="time-row">
- <text class="label">{{ item.timeLabel }}:</text>
- <text class="value">{{ item.time }}</text>
- </view>
- <view class="pet-card">
- <image class="pet-avatar" :src="item.petAvatarUrl || item.petAvatar" mode="aspectFill">
- </image>
- <view class="pet-info">
- <text class="pet-name">{{ item.petName }}</text>
- <text class="pet-breed">品种: {{ item.petBreed }}</text>
- </view>
- </view>
- <view class="route-info">
- <template v-if="item.type === 1">
- <view class="route-item" @click.stop="openNavigation(item, 'start')">
- <view class="icon-circle start">起</view>
- <view class="route-line-vertical"></view>
- <view class="address-box">
- <text class="addr-title">{{ item.startLocation }}</text>
- <text class="addr-desc">{{ item.startAddress }}</text>
- </view>
- <image class="nav-arrow" src="/static/icons/nav_arrow.svg"
- style="flex-shrink: 0; align-self: center;"></image>
- </view>
- <view class="route-item" @click.stop="openNavigation(item, 'end')">
- <view class="icon-circle end">终</view>
- <view class="address-box">
- <text class="addr-title">{{ item.endLocation }}</text>
- <text class="addr-desc">{{ item.endAddress }}</text>
- </view>
- <image class="nav-arrow" src="/static/icons/nav_arrow.svg"
- style="flex-shrink: 0; align-self: center;"></image>
- </view>
- </template>
- <template v-else>
- <view class="route-item" @click.stop="openNavigation(item, 'end')">
- <view class="icon-circle service">服</view>
- <view class="address-box">
- <text class="addr-title">{{ item.endLocation }}</text>
- <text class="addr-desc">{{ item.endAddress }}</text>
- </view>
- <image class="nav-arrow" src="/static/icons/nav_arrow.svg"
- style="flex-shrink: 0; align-self: center;"></image>
- </view>
- <view class="service-content" v-if="item.serviceContent">
- <text class="content-label">服务内容:</text>
- <text>{{ item.serviceContent }}</text>
- </view>
- </template>
- </view>
- <view class="remark-box" v-if="item.remark">
- <text>备注:{{ item.remark }}</text>
- </view>
- </view>
- <!-- action-btns class is in style.css but template used card-footer. style.css: .action-btns, index.vue: .card-footer -->
- <!-- Wait, style.css has .action-btns { display: flex; ... } and .btn.reject/accept -->
- <!-- I should use .action-btns instead of .card-footer -->
- <view class="action-btns">
- <button class="btn reject" @click.stop="openRejectModal(item)">拒绝</button>
- <button class="btn accept" @click.stop="openAcceptModal(item)">接单</button>
- </view>
- </view>
- <!-- Padding for safe area/tabbar -->
- <view style="height: 120rpx;"></view>
- </view>
- </view>
- <!-- 自定义确认弹窗 -->
- <view class="modal-mask" v-if="showConfirmModal">
- <view class="custom-modal">
- <text class="modal-title">提示</text>
- <text class="modal-content">是否确定结束休息,开始接单?</text>
- <view class="modal-btns">
- <button class="modal-btn cancel" @click="closeConfirmModal">取消</button>
- <button class="modal-btn confirm" @click="confirmStartWork">确定</button>
- </view>
- </view>
- </view>
- <!-- 宠物档案弹窗 -->
- <view class="pet-modal-mask" v-if="showPetModal" @click="closePetProfile">
- <view class="pet-modal-content" @click.stop>
- <view class="pet-modal-header">
- <text class="pet-modal-title">宠物档案</text>
- <view class="close-icon-btn" @click="closePetProfile">×</view>
- </view>
- <scroll-view scroll-y class="pet-modal-scroll">
- <!-- Basic Info -->
- <view class="pet-base-info">
- <image class="pm-avatar" :src="currentPetInfo.petAvatar" mode="aspectFill"></image>
- <view class="pm-info-text">
- <view class="pm-name-row">
- <text class="pm-name">{{ currentPetInfo.petName }}</text>
- <!-- Gender badge -->
- <view class="pm-gender" v-if="currentPetInfo.petGender === 'M'">
- <text class="gender-icon">♂</text>
- <text>公</text>
- </view>
- <view class="pm-gender female" v-else-if="currentPetInfo.petGender === 'F'">
- <text class="gender-icon">♀</text>
- <text>母</text>
- </view>
- </view>
- <text class="pm-breed">品种:{{ currentPetInfo.petBreed }}</text>
- </view>
- </view>
- <!-- Details Grid -->
- <view class="pm-detail-grid">
- <view class="pm-grid-item half">
- <text class="pm-label">年龄</text>
- <text class="pm-val">{{ currentPetInfo.petAge || '未知' }}</text>
- </view>
- <view class="pm-grid-item half">
- <text class="pm-label">体重</text>
- <text class="pm-val">{{ currentPetInfo.petWeight || '未知' }}</text>
- </view>
- <view class="pm-grid-item full">
- <text class="pm-label">性格</text>
- <text class="pm-val">{{ currentPetInfo.petPersonality || '无' }}</text>
- </view>
- <view class="pm-grid-item full">
- <text class="pm-label">爱好</text>
- <text class="pm-val">{{ currentPetInfo.petHobby || '无' }}</text>
- </view>
- <view class="pm-grid-item full">
- <text class="pm-label">备注</text>
- <text class="pm-val">{{ currentPetInfo.petRemark || '无特殊过敏史' }}</text>
- </view>
- </view>
- <!-- Tags -->
- <view class="pm-tags" v-if="currentPetInfo.petTags && currentPetInfo.petTags.length > 0">
- <view class="pm-tag" v-for="(tag, index) in currentPetInfo.petTags" :key="index">{{ tag }}
- </view>
- </view>
- <!-- Log Section -->
- <view class="pm-section-title">
- <view class="orange-bar"></view>
- <text>备注日志</text>
- </view>
- <view class="pm-log-list">
- <view class="pm-log-item" v-for="(log, lIndex) in currentPetInfo.petLogs" :key="lIndex">
- <text class="pm-log-date">{{ log.date }}</text>
- <text class="pm-log-text">{{ log.content }}</text>
- <text class="pm-log-recorder">{{ log.recorder === '系统记录' ? '' : '记录人: ' }}{{ log.recorder
- }}</text>
- </view>
- </view>
- <view style="height: 40rpx;"></view>
- <button class="pm-bottom-close" @click="closePetProfile">关闭</button>
- <view style="height: 20rpx;"></view>
- </scroll-view>
- </view>
- </view>
- </view>
- <!-- 拒绝接单弹窗 -->
- <view class="modal-mask" v-if="showRejectModal">
- <view class="custom-modal">
- <text class="modal-title">拒绝接单</text>
- <textarea class="reject-textarea" v-model="rejectReason" placeholder="请输入拒绝理由(必填)"
- maxlength="100"></textarea>
- <view class="modal-btns mt-30">
- <button class="modal-btn cancel" @click="closeRejectModal">取消</button>
- <button class="modal-btn confirm" @click="confirmReject">提交</button>
- </view>
- </view>
- </view>
- <!-- 确认接单弹窗 -->
- <view class="modal-mask" v-if="showAcceptConfirmModal">
- <view class="custom-modal">
- <text class="modal-title">接单确认</text>
- <view class="modal-content-box">
- <text class="modal-content-main">请确认是否接收此订单?</text>
- <text class="modal-content-sub">接单后请尽快通过电话联系用户</text>
- </view>
- <view class="modal-btns mt-30">
- <button class="modal-btn cancel" @click="closeAcceptModal">再想想</button>
- <button class="modal-btn confirm" @click="confirmAccept">确认接单</button>
- </view>
- </view>
- </view>
- <!-- 选择地图导航弹窗 -->
- <view class="nav-modal-mask" v-if="showNavModal" @click="closeNavModal">
- <view class="nav-action-sheet" @click.stop>
- <view class="nav-sheet-title">选择地图进行导航</view>
- <view class="nav-sheet-item" @click="chooseMap('高德')">高德地图</view>
- <view class="nav-sheet-item" @click="chooseMap('腾讯')">腾讯地图</view>
- <view class="nav-sheet-item" @click="chooseMap('百度')">百度地图</view>
- <view class="nav-sheet-gap"></view>
- <view class="nav-sheet-item cancel" @click="closeNavModal">取消</view>
- </view>
- </view>
- <custom-tabbar currentPath="pages/home/index"></custom-tabbar>
- </template>
- <script>
- import { getMyProfile } from '@/api/fulfiller/fulfiller'
- import { getPendingOrders, acceptOrder, getOrderCount, rejectOrderApi } from '@/api/order/subOrder'
- import { listAllService } from '@/api/service/list'
- import { getAreaStationList } from '@/api/system/areaStation'
- import { isLoggedIn } from '@/utils/auth'
- import { reportGps } from '@/utils/gps'
- import customTabbar from '@/components/custom-tabbar/index.vue'
- export default {
- components: {
- customTabbar
- },
- data() {
- return {
- taskList: [],
- currentFilter: 'default', // default, distance, time
- filterCondition: '筛选条件',
- sortDistance: 'asc', // asc, desc
- sortTime: 'asc',
- scrollTop: 0, // Track scroll position
- isFilterShow: false,
- tempFilter: {
- service: null,
- distance: '全部',
- amount: '全部'
- },
- activeFilter: {
- service: null,
- distance: '全部',
- amount: '全部'
- },
- workStatus: 'resting', // resting | busy | disabled
- showConfirmModal: false,
- showPetModal: false,
- currentPetInfo: {},
- showRejectModal: false,
- rejectReason: '',
- currentOrder: null,
- showAcceptConfirmModal: false,
- showNavModal: false,
- navTargetItem: null,
- navTargetPointType: '',
- profile: null,
- profileLoading: false,
- serviceList: [],
- orderStats: {
- total: 0,
- reject: 0,
- completed: 0,
- price: 0
- }
- }
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- async onLoad() {
- // Initial load
- this.checkWorkStatus();
- await this.loadServiceList();
- this.loadTaskList();
- // 显式请求一次定位授权
- reportGps(true).catch(e => console.log('Init GPS check skipped', e));
- },
- onShow() {
- uni.hideTabBar()
- this.checkWorkStatus();
- if (isLoggedIn()) {
- // 每次进入页面强制刷新所有展示数据
- this.loadProfile()
- this.loadOrderStats()
- this.loadTaskList()
- this.loadServiceList() // 确保服务配置也是最新的
- }
- },
- async onPullDownRefresh() {
- this.checkWorkStatus();
- try {
- await this.loadServiceList();
- const tasks = [
- this.loadTaskList()
- ];
- if (isLoggedIn()) {
- tasks.push(this.loadProfile());
- tasks.push(this.loadOrderStats());
- }
- await Promise.all(tasks);
- } catch (err) {
- console.error('刷新异常:', err);
- } finally {
- uni.stopPullDownRefresh();
- uni.showToast({ title: '刷新成功', icon: 'success' });
- }
- },
- methods: {
- async loadProfile() {
- if (this.profileLoading) return
- this.profileLoading = true
- try {
- const res = await getMyProfile()
- const data = res.data || null
- if (data) {
- // 以服务器返回的状态为准进行更新
- if (data.status) {
- this.workStatus = data.status;
- uni.setStorageSync('workStatus', data.status);
- }
- // 需求:头部的接单城市使用站点往上找到城市,而非直接显示站点
- if (data.stationId) {
- try {
- const stationRes = await getAreaStationList();
- const list = stationRes.data || [];
- const currentStation = list.find(i => i.id === data.stationId);
- if (currentStation) {
- // 向上溯源:直到找到 parentId 为 0 的节点(即顶层城市)
- let node = currentStation;
- while (node && node.parentId !== 0) {
- let parent = list.find(i => i.id === node.parentId);
- if (parent) {
- node = parent;
- } else {
- break;
- }
- }
- // 将溯源到的节点名称作为显示城市
- data.cityName = node.name;
- }
- } catch (e) {
- console.error('溯源城市失败:', e);
- }
- }
- }
- this.profile = data
- } catch (err) {
- console.error('获取个人信息失败:', err)
- } finally {
- this.profileLoading = false
- }
- },
- async loadServiceList() {
- try {
- const res = await listAllService()
- this.serviceList = res.data || []
- } catch (err) {
- console.error('获取服务类型失败:', err)
- }
- },
- async loadOrderStats() {
- try {
- const res = await getOrderCount()
- this.orderStats = res.data || { total: 0, reject: 0, completed: 0, fulfillmentCommission: 0 }
- } catch (err) {
- console.error('获取订单统计失败:', err)
- }
- },
- checkWorkStatus() {
- const status = uni.getStorageSync('workStatus');
- if (status) {
- this.workStatus = status;
- } else {
- // 默认状态为休息
- this.workStatus = 'resting';
- uni.setStorageSync('workStatus', 'resting');
- }
- },
- toggleFilter() {
- if (this.workStatus === 'resting') return; // Disable filter when resting? Or keep it? User didn't specify, but usually disabled. Let's keep it enabled for now as they might look at filters before working.
- this.isFilterShow = !this.isFilterShow;
- },
- goToWorkStatus() {
- uni.navigateTo({
- url: '/pages/home/work-status/index'
- });
- },
- async handleManualLocation() {
- try {
- uni.showLoading({ title: '定位获取中...', mask: true });
- await reportGps(true);
- uni.showToast({ title: '位置已更新', icon: 'success' });
- } catch (e) {
- console.error('Manual location failed', e);
- } finally {
- uni.hideLoading();
- }
- },
- startWork() {
- this.showConfirmModal = true;
- },
- confirmStartWork() {
- this.workStatus = 'busy';
- uni.setStorageSync('workStatus', 'busy');
- this.loadTaskList();
- this.showConfirmModal = false;
- uni.showToast({ title: '已开始接单', icon: 'success' });
- },
- closeConfirmModal() {
- this.showConfirmModal = false;
- },
- showPetProfile(item) {
- this.currentPetInfo = item;
- this.showPetModal = true;
- },
- closePetProfile() {
- this.showPetModal = false;
- },
- openRejectModal(item) {
- this.currentOrder = item;
- this.rejectReason = '';
- this.showRejectModal = true;
- },
- closeRejectModal() {
- this.showRejectModal = false;
- this.currentOrder = null;
- },
- async confirmReject() {
- if (!this.rejectReason.trim()) {
- uni.showToast({ title: '请输入拒绝理由', icon: 'none' });
- return;
- }
- if (!this.currentOrder?.id) return
- try {
- uni.showLoading({ title: '提交中...', mask: true });
- await rejectOrderApi({
- orderId: this.currentOrder.id,
- rejectReason: this.rejectReason
- });
- uni.showToast({ title: '已拒绝接单', icon: 'success' });
- this.showRejectModal = false;
- this.currentOrder = null;
- this.loadTaskList();
- this.loadOrderStats();
- } catch (err) {
- console.error('拒绝接单失败:', err);
- uni.showToast({ title: '操作失败', icon: 'none' });
- } finally {
- uni.hideLoading();
- }
- },
- openAcceptModal(item) {
- this.currentOrder = item;
- this.showAcceptConfirmModal = true;
- },
- closeAcceptModal() {
- this.showAcceptConfirmModal = false;
- this.currentOrder = null;
- },
- async confirmAccept() {
- if (!this.currentOrder?.id) return
- try {
- await acceptOrder(this.currentOrder.id)
- uni.showToast({ title: '接单成功', icon: 'success' })
- this.showAcceptConfirmModal = false
- this.currentOrder = null
- this.loadTaskList()
- this.loadProfile()
- this.loadOrderStats()
- } catch (err) {
- console.error('接单失败:', err)
- uni.showToast({ title: '接单失败', icon: 'none' })
- }
- },
- openNavigation(item, pointType) {
- this.navTargetItem = item;
- this.navTargetPointType = pointType;
- this.showNavModal = true;
- },
- closeNavModal() {
- this.showNavModal = false;
- },
- chooseMap(mapType) {
- let item = this.navTargetItem;
- let pointType = this.navTargetPointType;
- // 起 -> fromAddress ; 终 -> toAddress
- let name = pointType === 'start' ? (item.fromAddress || '起点') : (item.toAddress || '终点');
- let address = pointType === 'start' ? (item.fromAddress || '起点地址') : (item.toAddress || '终点地址');
- let latitude = pointType === 'start' ? Number(item.fromLat) : Number(item.toLat);
- let longitude = pointType === 'start' ? Number(item.fromLng) : Number(item.toLng);
- this.showNavModal = false;
- // 统一定义打开地图的函数
- const navigateTo = (lat, lng, addrName, addrDesc) => {
- uni.openLocation({
- latitude: lat,
- longitude: lng,
- name: addrName,
- address: addrDesc || '无法获取详细地址',
- success: function () {
- console.log('打开导航成功: ' + mapType);
- },
- fail: function (err) {
- console.error('打开导航失败:', err);
- uni.showToast({ title: '打开地图失败', icon: 'none' });
- }
- });
- };
- // 如果有目标经纬度,直接打开
- if (latitude && longitude && !isNaN(latitude) && !isNaN(longitude)) {
- navigateTo(latitude, longitude, name, address);
- } else {
- // 如果没有经纬度,按照需求:使用自己当前的经纬度,然后搜索 fromAddress 或者 toAddress
- uni.showLoading({ title: '获取当前位置...', mask: true });
- reportGps(true).then(res => {
- uni.hideLoading();
- // 使用用户当前经纬度作为锚点打开地图,展示目标地址信息
- navigateTo(res.latitude, res.longitude, name, address);
- }).catch(err => {
- uni.hideLoading();
- console.error('获取地理位置失败:', err);
- // 具体的授权引导已在 reportGps 内部处理
- });
- }
- },
- selectService(type) {
- this.tempFilter.service = type;
- },
- selectDistance(type) {
- this.tempFilter.distance = type;
- },
- selectAmount(type) {
- this.tempFilter.amount = type;
- },
- resetFilter() {
- this.tempFilter = {
- service: null,
- distance: '全部',
- amount: '全部'
- };
- },
- confirmFilter() {
- this.activeFilter = { ...this.tempFilter };
- this.isFilterShow = false;
- this.loadTaskList();
- },
- closeFilter() {
- this.isFilterShow = false;
- },
- goToDetail(item) {
- console.log('Go to detail', item);
- },
- async loadTaskList() {
- try {
- const params = {
- service: this.activeFilter.service,
- minPrice: this.getMinPrice(),
- maxPrice: this.getMaxPrice(),
- pageNum: 1,
- pageSize: 20
- }
- const res = await getPendingOrders(params)
- this.taskList = (res.rows || []).map(item => this.transformOrder(item))
- } catch (err) {
- console.error('获取订单列表失败:', err)
- uni.showToast({ title: '加载失败', icon: 'none' })
- this.taskList = []
- }
- },
- getMinPrice() {
- const amount = this.activeFilter.amount
- if (amount === '100以下') return 0
- if (amount === '100-200') return 10000
- if (amount === '200-500') return 20000
- if (amount === '500以上') return 50000
- return undefined
- },
- getMaxPrice() {
- const amount = this.activeFilter.amount
- if (amount === '100以下') return 10000
- if (amount === '100-200') return 20000
- if (amount === '200-500') return 50000
- return undefined
- },
- transformOrder(item) {
- const service = this.serviceList.find(s => s.id === item.service)
- const serviceText = service?.name || '未知'
- const serviceIcon = service?.iconUrl || ''
- const mode = service?.mode || 0
- const isRoundTrip = mode === 1
- return {
- id: item.id,
- type: isRoundTrip ? 1 : item.service,
- typeText: serviceText,
- typeIcon: serviceIcon,
- price: (item.fulfillmentCommission / 100).toFixed(2),
- timeLabel: '服务时间',
- time: item.serviceTime,
- petAvatar: item.petAvatar || '/static/dog.png',
- petAvatarUrl: item.petAvatarUrl || '',
- petName: item.petName,
- petBreed: item.breed,
- petGender: 'M',
- petAge: '',
- petWeight: '',
- petPersonality: '',
- petHobby: '',
- petRemark: '',
- petTags: [],
- petLogs: [],
- startLocation: item.fromAddress || '暂无起点',
- startAddress: item.fromAddress || '',
- fromAddress: item.fromAddress || '',
- fromLat: item.fromLat,
- fromLng: item.fromLng,
- startDistance: '0km',
- endLocation: (item.customerName || item.contact || '') + ' ' + (item.customerPhone || ''),
- endAddress: item.toAddress || '',
- toAddress: item.toAddress || '',
- toLat: item.toLat,
- toLng: item.toLng,
- endDistance: '0km',
- serviceContent: '',
- remark: item.remark || ''
- }
- },
- setFilter(type) {
- this.currentFilter = type;
- if (type === 'distance') {
- this.sortDistance = this.sortDistance === 'asc' ? 'desc' : 'asc';
- uni.showToast({ title: `按距离${this.sortDistance === 'asc' ? '升序' : '降序'}`, icon: 'none' });
- } else if (type === 'time') {
- this.sortTime = this.sortTime === 'asc' ? 'desc' : 'asc';
- uni.showToast({ title: `按时间${this.sortTime === 'asc' ? '升序' : '降序'}`, icon: 'none' });
- }
- },
- showFilterDropdown() {
- this.toggleFilter();
- }
- }
- }
- </script>
- <style>
- /* Global Box Sizing Fix */
- view,
- text,
- image,
- scroll-view,
- button {
- box-sizing: border-box;
- }
- /* 页面背景 */
- page {
- background-color: #F8F8F8;
- }
- .container {
- padding-bottom: 30rpx;
- }
- /* 顶部背景 */
- .nav-bg {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 360rpx;
- /* Reduced by another 20rpx */
- background: linear-gradient(180deg, #FFE0B2 0%, #FFF3E0 100%);
- border-bottom-left-radius: 60rpx;
- border-bottom-right-radius: 60rpx;
- z-index: 1;
- overflow: hidden;
- }
- /* Custom Navigation Bar */
- .custom-nav-bar {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
- padding-top: var(--status-bar-height);
- height: 100rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .nav-title {
- font-size: 34rpx;
- font-weight: bold;
- color: #333;
- }
- /* 头部区域 */
- .header-section {
- position: relative;
- z-index: 2;
- padding: 140rpx 30rpx 0;
- }
- /* 用户信息 */
- .user-info {
- display: flex;
- align-items: center;
- margin-bottom: 40rpx;
- }
- .avatar {
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- margin-right: 24rpx;
- border: 4rpx solid #fff;
- box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);
- }
- .info-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .top-row {
- display: flex;
- align-items: center;
- margin-bottom: 8rpx;
- }
- .name {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- margin-right: 16rpx;
- }
- /* 状态胶囊 */
- .status-pill {
- background-color: #4E4E4E;
- border-radius: 24rpx;
- display: flex;
- align-items: center;
- padding: 2rpx 20rpx 2rpx 6rpx;
- /* Increased right/left padding to elongate */
- }
- .status-dot-bg {
- width: 24rpx;
- /* Smaller icon bg */
- height: 24rpx;
- background-color: #00E676;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 6rpx;
- }
- .check-mark {
- color: #fff;
- font-size: 14rpx;
- /* Smaller check */
- font-weight: bold;
- }
- .status-text {
- color: #fff;
- font-size: 22rpx;
- /* Smaller font (11pt) */
- margin-right: 6rpx;
- font-weight: normal;
- }
- .status-pill .arrow-down {
- color: #fff;
- font-size: 10rpx;
- /* Half size */
- }
- .bottom-row {
- display: flex;
- align-items: center;
- font-size: 24rpx;
- color: #333;
- }
- .city-label {
- margin-right: 4rpx;
- }
- .city-arrow {
- font-family: monospace;
- }
- /* 通知铃铛 */
- .notification-box {
- position: relative;
- width: 60rpx;
- height: 60rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .bell-img {
- width: 44rpx;
- height: 44rpx;
- }
- .badge-count {
- position: absolute;
- top: -4rpx;
- right: -4rpx;
- background-color: #FF5252;
- color: #fff;
- font-size: 20rpx;
- width: 32rpx;
- height: 32rpx;
- line-height: 32rpx;
- text-align: center;
- border-radius: 50%;
- border: 2rpx solid #fff;
- }
- /* 统计卡片 - 悬浮样式 */
- .stats-card {
- background-color: #fff;
- border-radius: 30rpx;
- padding: 30rpx 0;
- display: flex;
- justify-content: space-around;
- align-items: center;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
- margin-bottom: 10rpx;
- /* 10rpx spacing to task header */
- margin-top: -10rpx;
- position: relative;
- width: 100%;
- }
- .stat-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex: 1;
- }
- .num {
- font-size: 40rpx;
- /* Increased font size */
- font-weight: 800;
- color: #333;
- margin-bottom: 10rpx;
- font-family: Arial, sans-serif;
- }
- .label {
- font-size: 24rpx;
- color: #888;
- }
- .divider {
- width: 1px;
- height: 40rpx;
- background-color: #EEEEEE;
- }
- /* 任务大厅标题栏 - 吸顶容器 */
- .task-header {
- position: sticky;
- top: calc(100rpx + var(--status-bar-height));
- z-index: 90;
- margin-top: 0;
- margin-bottom: 10rpx;
- width: 100%;
- /* Flex removed, padding removed, handled by inner */
- }
- /* 标题栏内部内容 */
- .header-inner {
- position: relative;
- z-index: 3;
- /* Layer 3: Topmost */
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 94rpx;
- padding: 0 30rpx;
- background-color: transparent;
- transition: background-color 0.2s;
- }
- .left-title {
- display: flex;
- align-items: center;
- }
- .orange-bar {
- width: 8rpx;
- height: 32rpx;
- background-color: #FF5722;
- border-radius: 4rpx;
- margin-right: 15rpx;
- }
- .left-title .title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- }
- .left-title .count {
- font-size: 24rpx;
- color: #999;
- margin-left: 8rpx;
- font-weight: normal;
- }
- .filter-options {
- display: flex;
- align-items: center;
- font-size: 24rpx;
- color: #666;
- }
- .filter-item {
- margin-left: 30rpx;
- transition: color 0.3s;
- display: flex;
- align-items: center;
- }
- .filter-item.active {
- color: #FF5722;
- font-weight: bold;
- }
- /* Sort Icon Design: Up and Down arrows */
- .sort-icon {
- display: flex;
- flex-direction: column;
- margin-left: 6rpx;
- justify-content: center;
- height: 20rpx;
- }
- .sort-icon .up {
- width: 0;
- height: 0;
- border-left: 6rpx solid transparent;
- border-right: 6rpx solid transparent;
- border-bottom: 6rpx solid #ccc;
- margin-bottom: 2rpx;
- }
- .sort-icon .down {
- width: 0;
- height: 0;
- border-left: 6rpx solid transparent;
- border-right: 6rpx solid transparent;
- border-top: 6rpx solid #ccc;
- }
- .filter-item.active .sort-icon .up.active {
- border-bottom-color: #FF5722;
- }
- .filter-item.active .sort-icon .down.active {
- border-top-color: #FF5722;
- }
- .dropdown {
- display: flex;
- align-items: center;
- margin-left: 30rpx;
- background-color: transparent;
- padding: 6rpx 20rpx;
- border-radius: 30rpx;
- border: none;
- box-shadow: none;
- }
- .dropdown text {
- margin-left: 0;
- font-size: 24rpx;
- color: #333;
- }
- .dropdown .arrow-down {
- font-size: 18rpx;
- margin-left: 6rpx;
- color: #999;
- }
- /* 任务大厅列表 */
- .task-list {
- padding: 0 30rpx;
- width: 100%;
- }
- /* 任务卡片优化 */
- .task-card {
- background-color: #fff;
- border-radius: 24rpx;
- padding: 20rpx 20rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 5rpx 20rpx rgba(0, 0, 0, 0.04);
- width: 100%;
- }
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15rpx;
- }
- .type-badge {
- display: flex;
- align-items: center;
- }
- .type-icon {
- width: 44rpx;
- height: 44rpx;
- margin-right: 15rpx;
- background-color: #FFF3E0;
- border-radius: 50%;
- padding: 6rpx;
- box-sizing: border-box;
- }
- .type-text {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- }
- .price {
- font-size: 28rpx;
- font-weight: bold;
- color: #FF5252;
- }
- .time-row {
- font-size: 26rpx;
- color: #666;
- margin-bottom: 20rpx;
- }
- .time-row .value {
- color: #333;
- margin-left: 10rpx;
- }
- /* 宠物卡片 */
- .pet-card {
- background-color: #FFF8F0;
- border-radius: 16rpx;
- padding: 15rpx 20rpx;
- display: flex;
- align-items: center;
- margin-bottom: 30rpx;
- }
- .pet-avatar {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- margin-right: 20rpx;
- }
- .pet-info {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .pet-name {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 5rpx;
- }
- .pet-breed {
- font-size: 24rpx;
- color: #999;
- }
- .pet-profile-btn {
- font-size: 24rpx;
- color: #FF9800;
- border: 1px solid #FF9800;
- padding: 6rpx 20rpx;
- border-radius: 50rpx;
- background-color: #fff;
- }
- /* 路线信息 */
- .route-info {
- margin-bottom: 20rpx;
- }
- .route-item {
- display: flex;
- align-items: flex-start;
- padding-bottom: 20rpx;
- position: relative;
- width: 100%;
- }
- /* 路线项底部的间隔 */
- .route-item:not(:last-child) {
- margin-bottom: 16rpx;
- }
- .route-item:last-child {
- padding-bottom: 0;
- margin-bottom: 0;
- }
- .route-line-vertical {
- position: absolute;
- left: 19rpx;
- top: 46rpx;
- bottom: -15rpx;
- /* Adjusted to connect the now-closer nodes */
- border-left: 2rpx dashed #E0E0E0;
- width: 0;
- z-index: 0;
- }
- .icon-circle {
- width: 40rpx;
- height: 40rpx;
- border-radius: 50%;
- color: #fff;
- font-size: 22rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- flex-shrink: 0;
- font-weight: bold;
- margin-top: 6rpx;
- position: relative;
- z-index: 1;
- /* Above line */
- }
- .icon-circle.start {
- background-color: #FFB74D;
- }
- .icon-circle.end {
- background-color: #81C784;
- }
- .icon-circle.service {
- background-color: #81C784;
- }
- .address-box {
- flex: 1;
- display: flex;
- flex-direction: column;
- padding-right: 20rpx;
- width: 0;
- }
- .addr-title-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .addr-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 6rpx;
- flex: 1;
- }
- .phone-call-btn {
- width: 48rpx;
- height: 48rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #E8F5E9;
- border-radius: 50%;
- margin-left: 10rpx;
- transition: transform 0.1s;
- }
- .phone-call-btn:active {
- transform: scale(0.9);
- background-color: #C8E6C9;
- }
- .phone-icon-item {
- width: 28rpx;
- height: 28rpx;
- }
- .addr-desc {
- font-size: 24rpx;
- color: #999;
- line-height: normal;
- }
- .distance-tag {
- display: flex;
- align-items: center;
- background-color: #FFF3E0;
- padding: 6rpx 6rpx 6rpx 12rpx;
- border-radius: 30rpx;
- flex-shrink: 0;
- }
- .distance-tag text {
- font-size: 24rpx;
- color: #FF5722;
- margin-right: 5rpx;
- font-weight: normal;
- }
- .nav-arrow {
- width: 32rpx;
- height: 32rpx;
- }
- .service-content {
- margin-top: -10rpx;
- /* Shifted up using negative margin for max compactness */
- font-size: 24rpx;
- /* 12pt */
- color: #666;
- padding-left: 60rpx;
- }
- .content-label {
- color: #999;
- margin-right: 10rpx;
- }
- /* 备注 */
- .remark-box {
- background-color: #F8F8F8;
- padding: 15rpx 20rpx;
- border-radius: 8rpx;
- font-size: 24rpx;
- color: #666;
- margin-bottom: 20rpx;
- }
- /* 按钮组 */
- .action-btns {
- display: flex;
- justify-content: space-between;
- }
- .btn {
- height: 64rpx;
- /* Increased height */
- line-height: 64rpx;
- border-radius: 32rpx;
- /* Matches height/2 */
- font-size: 28rpx;
- /* Slightly larger */
- font-weight: normal;
- width: 48%;
- }
- .btn::after {
- border: none;
- }
- .btn.reject {
- background-color: #F5F5F5;
- color: #999;
- box-shadow: none;
- }
- .btn.accept {
- background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
- color: #fff;
- box-shadow: 0 5rpx 15rpx rgba(255, 87, 34, 0.3);
- }
- .bg-circle-right {
- position: absolute;
- top: -20rpx;
- right: -20rpx;
- width: 185rpx;
- /* +20rpx */
- height: 185rpx;
- /* +20rpx */
- border-radius: 50%;
- background-color: rgba(255, 218, 185, 0.8);
- /* 80% opacity */
- }
- /* 筛选面板 (Absolute Child) */
- .filter-panel {
- position: absolute;
- /* Relative to .task-header */
- top: 94rpx;
- /* Start right below header */
- left: 0;
- width: 100%;
- background-color: #fff;
- z-index: 2;
- /* Layer 2: Below inner(3), Above mask(1) */
- padding: 30rpx 30rpx 40rpx;
- border-bottom-left-radius: 30rpx;
- border-bottom-right-radius: 30rpx;
- box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.1);
- transform: translateY(-20rpx);
- /* Slightly tucked start */
- opacity: 0;
- transition: all 0.25s ease-out;
- visibility: hidden;
- }
- .filter-panel.show {
- transform: translateY(0);
- opacity: 1;
- visibility: visible;
- }
- /* 筛选遮罩 (Absolute Child) */
- .filter-mask {
- position: absolute;
- top: 94rpx;
- /* Start below header */
- left: 0;
- right: 0;
- height: 100vh;
- /* Cover visible area below */
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 1;
- /* Layer 1: Lowest in header */
- }
- .filter-section {
- margin-bottom: 40rpx;
- }
- .section-title {
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 20rpx;
- display: block;
- }
- .options-grid {
- display: flex;
- flex-wrap: wrap;
- gap: 20rpx;
- }
- .option-btn {
- width: calc(33.33% - 14rpx);
- /* 3 cols with gap */
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- border-radius: 32rpx;
- font-size: 26rpx;
- color: #666;
- background-color: #fff;
- border: 2rpx solid #E0E0E0;
- margin-bottom: 10rpx;
- }
- .option-btn.active {
- color: #FF5722;
- background-color: #FFF3E0;
- border-color: #FF5722;
- font-weight: bold;
- }
- .filter-actions {
- display: flex;
- justify-content: space-between;
- margin-top: 50rpx;
- }
- .action-btn {
- width: 48%;
- height: 64rpx;
- /* Match .btn */
- line-height: 64rpx;
- border-radius: 32rpx;
- /* Match .btn */
- font-size: 28rpx;
- /* Match .btn */
- font-weight: normal;
- /* Match .btn */
- }
- .action-btn::after {
- border: none;
- }
- .action-btn.reset {
- background-color: #F5F5F5;
- color: #999;
- /* Match light gray */
- }
- .action-btn.confirm {
- background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
- color: #fff;
- box-shadow: 0 5rpx 15rpx rgba(255, 87, 34, 0.3);
- }
- /* 状态胶囊 */
- .status-pill {
- display: flex;
- align-items: center;
- background-color: #333333;
- /* Dark background */
- border-radius: 20rpx;
- padding: 4rpx 16rpx 4rpx 8rpx;
- margin-left: 16rpx;
- transition: background-color 0.3s;
- }
- .status-pill.resting {
- background-color: #424242;
- /* Slightly lighter dark */
- }
- .status-dot-bg {
- width: 24rpx;
- height: 24rpx;
- background-color: #4CAF50;
- border-radius: 50%;
- margin-right: 6rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .check-mark {
- color: #fff;
- font-size: 14rpx;
- font-weight: bold;
- }
- .status-pill.resting .status-dot-bg {
- background-color: #FF5722;
- /* Warning color for resting */
- }
- .status-icon {
- width: 24rpx;
- height: 24rpx;
- margin-right: 6rpx;
- }
- .status-text {
- font-size: 22rpx;
- color: #fff;
- margin-right: 6rpx;
- }
- .status-pill .arrow-down {
- color: #fff;
- font-size: 10rpx;
- /* Reduced size */
- margin-left: 4rpx;
- /* Adjust spacing */
- }
- /* 空状态 - 休息中 */
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding-top: 150rpx;
- }
- .empty-icon {
- width: 200rpx;
- height: 200rpx;
- margin-bottom: 40rpx;
- opacity: 0.5;
- }
- .empty-text {
- font-size: 28rpx;
- color: #666;
- margin-bottom: 60rpx;
- }
- .start-work-btn {
- width: 300rpx;
- height: 80rpx;
- line-height: 80rpx;
- background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
- border-radius: 40rpx;
- color: #fff;
- font-size: 30rpx;
- font-weight: bold;
- box-shadow: 0 5rpx 15rpx rgba(255, 87, 34, 0.3);
- }
- /* 自定义确认弹窗 */
- .modal-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 999;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .custom-modal {
- width: 600rpx;
- background-color: #fff;
- border-radius: 24rpx;
- padding: 40rpx 50rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .modal-title {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 30rpx;
- }
- .modal-content {
- font-size: 30rpx;
- color: #666;
- margin-bottom: 50rpx;
- text-align: center;
- }
- .modal-btns {
- width: 100%;
- display: flex;
- justify-content: space-between;
- }
- .modal-btn {
- width: 45%;
- height: 80rpx;
- line-height: 80rpx;
- border-radius: 40rpx;
- font-size: 30rpx;
- font-weight: bold;
- margin: 0;
- }
- .modal-btn::after {
- border: none;
- }
- .modal-btn.cancel {
- background-color: #F5F5F5;
- color: #999;
- }
- .modal-btn.confirm {
- background: linear-gradient(90deg, #FF9800 0%, #FF5722 100%);
- color: #fff;
- box-shadow: 0 5rpx 15rpx rgba(255, 87, 34, 0.3);
- }
- /* 宠物档案弹窗 */
- .pet-modal-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.4);
- z-index: 1000;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .pet-modal-content {
- width: 680rpx;
- height: 85vh;
- background-color: #fff;
- border-radius: 20rpx;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .pet-modal-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 30rpx;
- border-bottom: 1rpx solid #F0F0F0;
- }
- .pet-modal-title {
- font-size: 34rpx;
- font-weight: bold;
- color: #333;
- }
- .pet-modal-scroll {
- flex: 1;
- height: 0;
- padding: 30rpx;
- box-sizing: border-box;
- }
- .pet-base-info {
- display: flex;
- align-items: center;
- margin-bottom: 40rpx;
- }
- .pm-avatar {
- width: 120rpx;
- height: 120rpx;
- border-radius: 50%;
- margin-right: 30rpx;
- border: 2rpx solid #f5f5f5;
- }
- .pm-info-text {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .pm-name-row {
- display: flex;
- align-items: center;
- margin-bottom: 15rpx;
- }
- .pm-name {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- margin-right: 20rpx;
- }
- .pm-gender {
- display: flex;
- align-items: center;
- background-color: #E3F2FD;
- padding: 4rpx 12rpx;
- border-radius: 20rpx;
- }
- .pm-gender text {
- font-size: 22rpx;
- color: #1E88E5;
- }
- .pm-gender .gender-icon {
- font-weight: bold;
- margin-right: 4rpx;
- }
- .pm-gender.female {
- background-color: #FCE4EC;
- }
- .pm-gender.female text {
- color: #D81B60;
- }
- .pm-breed {
- font-size: 26rpx;
- color: #999;
- }
- .pm-detail-grid {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .pm-grid-item {
- background-color: #F8F8F8;
- border-radius: 16rpx;
- padding: 24rpx;
- margin-bottom: 20rpx;
- display: flex;
- flex-direction: column;
- }
- .pm-grid-item.half {
- width: 48%;
- box-sizing: border-box;
- }
- .pm-grid-item.full {
- width: 100%;
- box-sizing: border-box;
- }
- .pm-label {
- font-size: 24rpx;
- color: #999;
- margin-bottom: 10rpx;
- }
- .pm-val {
- font-size: 28rpx;
- color: #333;
- font-weight: 500;
- }
- .pm-tags {
- display: flex;
- flex-wrap: wrap;
- gap: 20rpx;
- margin-bottom: 40rpx;
- }
- .pm-tag {
- background-color: #FFF8EB;
- border: 2rpx solid #FFCC80;
- color: #FF9800;
- font-size: 22rpx;
- padding: 8rpx 24rpx;
- border-radius: 30rpx;
- }
- .pm-section-title {
- display: flex;
- align-items: center;
- margin-bottom: 30rpx;
- padding-top: 30rpx;
- border-top: 2rpx dashed #F0F0F0;
- }
- .pm-section-title .orange-bar {
- width: 8rpx;
- height: 32rpx;
- background-color: #FF9800;
- margin-right: 16rpx;
- border-radius: 4rpx;
- }
- .pm-section-title text {
- font-size: 30rpx;
- font-weight: bold;
- color: #333;
- }
- .pm-log-list {
- display: flex;
- flex-direction: column;
- }
- .pm-log-item {
- display: flex;
- flex-direction: column;
- padding: 24rpx 0;
- border-bottom: 1rpx solid #F0F0F0;
- }
- .pm-log-item:last-child {
- border-bottom: none;
- }
- .pm-log-date {
- font-size: 24rpx;
- color: #999;
- margin-bottom: 16rpx;
- }
- .pm-log-text {
- font-size: 28rpx;
- color: #333;
- line-height: 1.6;
- margin-bottom: 20rpx;
- }
- .pm-log-recorder {
- font-size: 24rpx;
- color: #FF9800;
- align-self: flex-end;
- }
- /* 拒绝接单弹窗输入框 */
- .reject-textarea {
- width: 100%;
- height: 200rpx;
- background-color: #F8F8F8;
- border-radius: 12rpx;
- padding: 24rpx;
- font-size: 28rpx;
- line-height: 1.5;
- box-sizing: border-box;
- margin-bottom: 20rpx;
- }
- .mt-30 {
- margin-top: 30rpx;
- }
- /* 宠物档案底部关闭按钮 */
- .pm-bottom-close {
- width: 100%;
- height: 80rpx;
- line-height: 80rpx;
- background-color: #F5F5F5;
- color: #666;
- border-radius: 40rpx;
- font-size: 30rpx;
- font-weight: bold;
- margin: 0;
- }
- .pm-bottom-close::after {
- border: none;
- }
- /* 宠物档案原生关闭图标 */
- .close-icon-btn {
- font-size: 48rpx;
- color: #999;
- line-height: 1;
- padding: 0 10rpx;
- }
- /* 确认接单弹窗内容 */
- .modal-content-box {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-bottom: 20rpx;
- }
- .modal-content-main {
- font-size: 30rpx;
- color: #333;
- margin-bottom: 16rpx;
- }
- .modal-content-sub {
- font-size: 24rpx;
- color: #999;
- }
- /* 地图导航 Action Sheet */
- .nav-modal-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 1000;
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
- }
- .nav-action-sheet {
- background-color: #fff;
- width: 100%;
- border-top-left-radius: 24rpx;
- border-top-right-radius: 24rpx;
- overflow: hidden;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .nav-sheet-title {
- text-align: center;
- padding: 30rpx 0;
- font-size: 13px;
- color: #999;
- border-bottom: 1rpx solid #efefef;
- }
- .nav-sheet-item {
- text-align: center;
- padding: 30rpx 0;
- font-size: 13px;
- color: #333;
- background-color: #fff;
- border-bottom: 1rpx solid #efefef;
- }
- .nav-sheet-item.cancel {
- border-bottom: none;
- color: #666;
- }
- .nav-sheet-gap {
- height: 16rpx;
- background-color: #F8F8F8;
- }
- </style>
|