index.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
  1. <template>
  2. <view class="order-detail-page">
  3. <nav-bar title="订单详情"></nav-bar>
  4. <!-- 骨架屏 -->
  5. <view class="skeleton-page" v-if="loading">
  6. <view class="skeleton-header skeleton-box"></view>
  7. <view class="skeleton-progress skeleton-box"></view>
  8. <view class="skeleton-row-cards">
  9. <view class="skeleton-card skeleton-box"></view>
  10. <view class="skeleton-card skeleton-box"></view>
  11. </view>
  12. <view class="skeleton-content skeleton-box"></view>
  13. </view>
  14. <!-- 真实内容 -->
  15. <view class="real-content fade-in" v-else>
  16. <!-- 订单号与状态 -->
  17. <view class="order-header">
  18. <view class="order-id-row">
  19. <text class="order-id">{{ order.code || order.id }}</text>
  20. <text :class="['status-badge', `badge-${order.statusKey}`]">{{ order.statusText }}</text>
  21. <text class="service-badge">{{ currentServiceName }}</text>
  22. </view>
  23. </view>
  24. <!-- 状态进度条 -->
  25. <view class="progress-card">
  26. <view class="progress-steps">
  27. <view v-for="(step, i) in progressSteps" :key="i"
  28. :class="['step-item', { done: step.done, active: step.active }]">
  29. <view class="step-circle">
  30. <uni-icons v-if="step.done" type="checkmarkempty" size="12" color="#fff"></uni-icons>
  31. <text v-else class="step-num">{{ i + 1 }}</text>
  32. </view>
  33. <view class="step-line" v-if="i < progressSteps.length - 1" :class="{ done: step.done }"></view>
  34. <text class="step-label">{{ step.label }}</text>
  35. <text class="step-time">{{ step.time }}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 宠物档案 + 用户信息 -->
  40. <view class="info-row-cards">
  41. <view class="info-card pet-card">
  42. <text class="card-label">宠物档案</text>
  43. <view class="pet-header">
  44. <view class="pet-avatar"><text>{{ (order.petName || '宠')[0] }}</text></view>
  45. <view class="pet-basic">
  46. <text class="pet-name">
  47. {{ order.petName || '-' }}
  48. <text v-if="order.petGender === 1 || order.petGender === '1'">♂</text>
  49. <text v-else-if="order.petGender === 0 || order.petGender === '0'">♀</text>
  50. </text>
  51. <view class="pet-tags">
  52. <text class="mini-tag" v-if="order.petAge">{{ order.petAge }}</text>
  53. <text class="mini-tag" v-if="order.petWeight">{{ order.petWeight }}</text>
  54. <text class="breed-badge" v-if="order.petBreed">{{ order.petBreed }}</text>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="pet-attrs">
  59. <view class="attr-item">
  60. <text class="attr-label">品种</text>
  61. <text class="attr-val">{{ order.petBreed || '-' }}</text>
  62. </view>
  63. <view class="attr-item">
  64. <text class="attr-label">疫苗状态</text>
  65. <text class="attr-val highlight">{{ order.petVaccine || '-' }}</text>
  66. </view>
  67. <view class="attr-item full">
  68. <text class="attr-label">性格特点</text>
  69. <text class="attr-val">{{ order.petCharacter || '-' }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="info-card user-card">
  74. <text class="card-label">用户信息</text>
  75. <view class="user-header">
  76. <view class="user-avatar">
  77. <uni-icons type="person" size="26" color="#aaa"></uni-icons>
  78. </view>
  79. <view class="user-basic">
  80. <text class="user-name-text">{{ order.userName }}</text>
  81. <text class="user-phone">{{ order.userPhone }}</text>
  82. </view>
  83. </view>
  84. <view class="service-address-box">
  85. <text class="addr-label">服务地址</text>
  86. <text class="addr-text">{{ order.address }}</text>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 标签页 -->
  91. <view class="detail-tabs-wrap">
  92. <view class="tab-nav">
  93. <view v-for="tab in tabList" :key="tab.name"
  94. :class="['tab-nav-item', { active: activeTab === tab.name }]" @click="activeTab = tab.name">
  95. <text>{{ tab.title }}</text>
  96. </view>
  97. </view>
  98. <!-- 任务详情扩展板块 -->
  99. <view class="tab-content" v-if="activeTab === 'base'">
  100. <view class="base-info-grid">
  101. <view class="bi-item" v-for="item in baseInfoList" :key="item.label">
  102. <text class="bi-label">{{ item.label }}</text>
  103. <text :class="['bi-val', item.highlight ? 'highlight' : '']">{{ item.value }}</text>
  104. </view>
  105. </view>
  106. <!-- 接送任务详情 -->
  107. <block v-if="order.type === 'transport'">
  108. <text class="sub-title">接送任务详情</text>
  109. <view class="task-card transport-card">
  110. <view class="task-header">
  111. <text class="type-tag" :class="getTransportClass(order.subOrderType)">
  112. {{ getTransportLabel(order.subOrderType) }}
  113. </text>
  114. <text class="task-time">{{ order.serviceTime }}</text>
  115. </view>
  116. <view class="task-body">
  117. <view class="task-row">
  118. <text class="task-label">起点</text>
  119. <text class="task-value">{{ order.fromAddress || '-' }}</text>
  120. </view>
  121. <view class="task-row">
  122. <text class="task-label">终点</text>
  123. <text class="task-value">{{ order.toAddress || '-' }}</text>
  124. </view>
  125. <view class="task-row contact-row">
  126. <text class="task-value">{{ order.userName }} — {{ order.userPhone }}</text>
  127. </view>
  128. </view>
  129. </view>
  130. </block>
  131. <!-- 上门服务执行要求 -->
  132. <block v-if="['feeding', 'washing'].includes(order.type)">
  133. <text class="sub-title">服务执行要求</text>
  134. <view class="task-card req-card">
  135. <view class="req-item">
  136. <text class="req-label">服务地址</text>
  137. <text class="req-value">{{ order.address }}</text>
  138. </view>
  139. </view>
  140. </block>
  141. </view>
  142. <!-- 指派履约者 -->
  143. <view class="tab-content" v-if="activeTab === 'assignee'">
  144. <view class="empty-state" v-if="order.statusKey === 'wait_dispatch'">
  145. <uni-icons type="clock" size="40" color="#ccc"></uni-icons>
  146. <text class="empty-text">等待派单中...</text>
  147. </view>
  148. <view class="assignee-card" v-else>
  149. <view class="assignee-header">
  150. <view class="assignee-avatar">
  151. <uni-icons type="person" size="30" color="#aaa"></uni-icons>
  152. </view>
  153. <view class="assignee-info">
  154. <text class="assignee-name">{{ order.assigneeName }}</text>
  155. <text class="assignee-phone">联系电话:{{ order.assigneePhone }}</text>
  156. <text class="assignee-zone">归属区域:{{ order.assigneeZone }}</text>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- 服务进度 -->
  162. <view class="tab-content" v-if="activeTab === 'progress'">
  163. <view class="empty-state" v-if="['wait_dispatch', 'wait_accept'].includes(order.statusKey) || serviceTimeline.length === 0">
  164. <uni-icons type="info" size="40" color="#ccc"></uni-icons>
  165. <text class="empty-text">服务尚未开始或暂无进度</text>
  166. </view>
  167. <view class="timeline" v-else>
  168. <view class="tl-item" v-for="(tl, i) in serviceTimeline" :key="i">
  169. <view class="tl-dot"></view>
  170. <view class="tl-body">
  171. <text class="tl-time">{{ tl.time }}</text>
  172. <text class="tl-title">{{ tl.title }}</text>
  173. <text class="tl-desc">{{ tl.desc }}</text>
  174. <view class="tl-media" v-if="tl.media && tl.media.length">
  175. <view v-for="(item, idx) in tl.media" :key="idx" class="media-item">
  176. <image v-if="item.type === 'image'" mode="aspectFill" :src="item.url" class="p-img" @click="previewImage(item.url, tl.media)"></image>
  177. <view v-else-if="item.type === 'video'" class="p-video-box" @click="openVideoPreview(item.url)">
  178. <image src="/static/video-placeholder.png" mode="aspectFill" class="p-img" style="background:#000;"></image>
  179. <view class="play-icon-overlay">
  180. <uni-icons type="videocam-filled" size="30" color="#fff"></uni-icons>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <!-- 订单日志 -->
  190. <view class="tab-content" v-if="activeTab === 'log'">
  191. <view class="empty-state" v-if="orderLogs.length === 0">
  192. <uni-icons type="info" size="40" color="#ccc"></uni-icons>
  193. <text class="empty-text">暂无订单日志</text>
  194. </view>
  195. <view class="timeline" v-else>
  196. <view class="tl-item" v-for="(log, i) in orderLogs" :key="i">
  197. <view class="tl-dot log-dot"></view>
  198. <view class="tl-body">
  199. <text class="tl-time">{{ log.time }}</text>
  200. <text class="tl-title">{{ log.title }}</text>
  201. <text class="tl-desc">{{ log.desc }}</text>
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. <!-- 视频全屏预览 -->
  209. <view class="video-preview-mask" v-if="videoPreview.visible" @click.stop="closeVideoPreview">
  210. <video :src="videoPreview.url" autoplay controls class="preview-video" @click.stop></video>
  211. <view class="close-video-btn" @click.stop="closeVideoPreview">
  212. <uni-icons type="closeempty" size="24" color="#fff"></uni-icons>
  213. </view>
  214. </view>
  215. <!-- 底部取消按钮 -->
  216. <view class="cancel-bar safe-bottom" v-if="!loading && ['wait_dispatch', 'wait_accept'].includes(order.statusKey)">
  217. <button class="cancel-order-btn" @click="onCancelOrder">取消订单</button>
  218. </view>
  219. <!-- 自定义取消订单弹窗 -->
  220. <view class="custom-modal" v-if="showCancelModal">
  221. <view class="modal-mask" @click="closeCancelModal"></view>
  222. <view class="modal-content">
  223. <view class="modal-title">提示</view>
  224. <view class="modal-body">
  225. <view style="margin-bottom: 20rpx; font-size: 28rpx; color: #666;">确定要取消订单 [{{ order.id }}] 吗?</view>
  226. <textarea class="cancel-input" v-model="cancelReason" placeholder="必填,请输入取消原因" placeholder-class="ph-color" :show-confirm-bar="false"></textarea>
  227. </view>
  228. <view class="modal-footer">
  229. <view class="modal-btn btn-cancel" @click="closeCancelModal">取消</view>
  230. <view class="modal-btn btn-confirm" @click="confirmCancelOrder">确定</view>
  231. </view>
  232. </view>
  233. </view>
  234. </view>
  235. </template>
  236. <script setup>
  237. import { ref, reactive, computed, watch } from 'vue'
  238. import { onLoad } from '@dcloudio/uni-app'
  239. import navBar from '@/components/nav-bar/index.vue'
  240. import { getSubOrderInfo, cancelSubOrder } from '@/api/order/subOrder'
  241. import { getPet } from '@/api/archieves/pet'
  242. import { getCustomer } from '@/api/archieves/customer'
  243. import { getFulfiller } from '@/api/fulfiller/fulfiller'
  244. import { listSubOrderLog } from '@/api/order/subOrderLog'
  245. import { listComplaintByOrder } from '@/api/fulfiller/complaint'
  246. const activeTab = ref('base')
  247. const activeService = ref('transport')
  248. const orderId = ref('')
  249. const loading = ref(true)
  250. const tabList = [
  251. { title: '基础信息', name: 'base' },
  252. { title: '履约者', name: 'assignee' },
  253. { title: '服务进度', name: 'progress' },
  254. { title: '订单日志', name: 'log' }
  255. ]
  256. const currentServiceName = computed(() => {
  257. const map = { transport: '宠物接送', feed: '上门喂遛', wash: '上门洗护' }
  258. return map[activeService.value]
  259. })
  260. const order = reactive({
  261. id: '',
  262. code: '',
  263. statusKey: 'serving',
  264. statusText: '服务中',
  265. status: 2,
  266. petName: '',
  267. petBreed: '',
  268. petAge: '',
  269. petWeight: '',
  270. petGender: '',
  271. petVaccine: '',
  272. petCharacter: '',
  273. petHealth: '',
  274. userName: '',
  275. userPhone: '',
  276. address: '',
  277. shopName: '',
  278. createTime: '',
  279. bookTime: '',
  280. packageName: '',
  281. remark: '',
  282. assigneeName: '',
  283. cancelTime: '',
  284. pickAddress: '',
  285. pickTime: '',
  286. sendAddress: '',
  287. sendTime: '',
  288. fromAddress: '',
  289. toAddress: '',
  290. type: 'transport', // 对应后端 transport/feeding/washing
  291. subOrderType: 0, // 接送子类型
  292. service: '',
  293. pet: '',
  294. customer: '',
  295. fulfiller: '',
  296. fulfillerName: '',
  297. assigneePhone: '-',
  298. assigneeZone: '-'
  299. })
  300. const orderLogsData = ref([])
  301. const fulfillerLogsData = ref([])
  302. const complaintList = ref([])
  303. const loadOrderDetail = async (id) => {
  304. if (!id) return
  305. loading.value = true
  306. try {
  307. const res = await getSubOrderInfo(id)
  308. console.log('订单详情返回:', res)
  309. if (res) {
  310. // 手动逐个赋值,避免 Object.assign 导致的全量字段触发及潜在的递归更新
  311. order.id = res.id
  312. order.code = res.code || res.id
  313. order.status = res.status
  314. order.statusKey = getStatusKey(res.status)
  315. order.statusText = getStatusName(res.status)
  316. order.bookTime = res.serviceTime || '-'
  317. order.shopName = res.storeName || '-'
  318. order.userName = res.customerName || '-'
  319. order.userPhone = res.contactPhoneNumber || '-'
  320. order.assigneeName = res.fulfillerName || '-'
  321. order.remark = res.remark || '-'
  322. order.fromAddress = res.fromAddress || '-'
  323. order.toAddress = res.toAddress || '-'
  324. order.address = res.address || res.toAddress || '-'
  325. order.type = res.type || 'transport'
  326. order.subOrderType = res.subOrderType
  327. order.pet = res.usrPet
  328. order.customer = res.usrCustomer
  329. order.fulfiller = res.fulfiller
  330. order.packageName = res.groupPurchasePackageName || res.packageName || '-'
  331. order.createTime = res.createTime || '-'
  332. // 并行加载关联信息,提升效率并减少串行触发的重演
  333. const tasks = []
  334. if (res.usrPet) tasks.push(loadPetInfo(res.usrPet))
  335. if (res.usrCustomer) tasks.push(loadCustomerInfo(res.usrCustomer))
  336. if (res.fulfiller) tasks.push(loadFulfillerInfo(res.fulfiller))
  337. await Promise.all([
  338. ...tasks,
  339. loadOrderLogs(id),
  340. loadComplaints(id)
  341. ])
  342. }
  343. } catch (error) {
  344. console.error('加载订单详情失败:', error)
  345. uni.showToast({ title: '加载失败', icon: 'none' })
  346. } finally {
  347. loading.value = false
  348. }
  349. }
  350. const loadPetInfo = async (petId) => {
  351. try {
  352. const res = await getPet(petId)
  353. if (res) {
  354. order.petName = res.name || '-'
  355. order.petBreed = res.breed || '-'
  356. order.petAge = res.age ? `${res.age}岁` : '-'
  357. order.petWeight = res.weight ? `${res.weight}kg` : '-'
  358. order.petGender = res.gender ?? '-'
  359. order.petVaccine = res.vaccineStatus || '-'
  360. order.petCharacter = res.personality || '-'
  361. order.petHealth = res.healthStatus || '-'
  362. }
  363. } catch (error) {
  364. console.error('加载宠物信息失败:', error)
  365. }
  366. }
  367. const loadCustomerInfo = async (customerId) => {
  368. try {
  369. const res = await getCustomer(customerId)
  370. if (res) {
  371. order.userName = res.name || '-'
  372. order.userPhone = res.phone || '-'
  373. order.address = res.address || '-'
  374. }
  375. } catch (error) {
  376. console.error('加载客户信息失败:', error)
  377. }
  378. }
  379. const loadFulfillerInfo = async (fulfillerId) => {
  380. try {
  381. const res = await getFulfiller(fulfillerId)
  382. if (res) {
  383. order.assigneeName = res.name || order.assigneeName
  384. order.assigneePhone = res.phone || '-'
  385. order.assigneeZone = res.stationName || '-'
  386. }
  387. } catch (error) {
  388. console.error('加载履约者信息失败:', error)
  389. }
  390. }
  391. const loadOrderLogs = async (id) => {
  392. try {
  393. const res = await listSubOrderLog({ orderId: id })
  394. const list = res || []
  395. orderLogsData.value = list.filter(i => Number(i?.logType) === 0)
  396. fulfillerLogsData.value = list.filter(i => Number(i?.logType) === 1)
  397. } catch (error) {
  398. console.error('加载订单日志失败:', error)
  399. orderLogsData.value = []
  400. fulfillerLogsData.value = []
  401. }
  402. }
  403. const loadComplaints = async (id) => {
  404. try {
  405. const res = await listComplaintByOrder(id)
  406. complaintList.value = res || []
  407. } catch (error) {
  408. console.error('加载投诉记录失败:', error)
  409. complaintList.value = []
  410. }
  411. }
  412. const getStatusKey = (status) => {
  413. const map = { 0: 'wait_dispatch', 1: 'wait_accept', 2: 'serving', 3: 'confirming', 4: 'done', 5: 'cancel' }
  414. return map[status] || 'serving'
  415. }
  416. const getStatusName = (status) => {
  417. const map = { 0: '待派单', 1: '待接单', 2: '服务中', 3: '待商家确认', 4: '已完成', 5: '已取消' }
  418. return map[status] || '-'
  419. }
  420. const getTransportLabel = (t) => {
  421. if (t === 0 || t === '0') return '接'
  422. if (t === 1 || t === '1') return '送'
  423. if (t === 2 || t === '2') return '单程接'
  424. if (t === 3 || t === '3') return '单程送'
  425. return '接送'
  426. }
  427. const getTransportClass = (t) => {
  428. if (t === 0 || t === '0' || t === 2 || t === '2') return 'tag-blue'
  429. return 'tag-orange'
  430. }
  431. const getTypeName = (type) => {
  432. const map = { transport: '宠物接送', feeding: '上门喂遛', washing: '上门洗护' }
  433. return map[type] || '-'
  434. }
  435. onLoad((options) => {
  436. // 防御性校验:id 必须是有效值(非空、非字符串 "undefined")
  437. if (options.id && options.id !== 'undefined') {
  438. orderId.value = options.id
  439. console.log('订单详情页:接收到的订单ID =', options.id)
  440. loadOrderDetail(options.id)
  441. } else {
  442. console.error('订单详情页:缺少有效的订单ID,options =', options)
  443. uni.showToast({ title: '订单ID无效', icon: 'none' })
  444. loading.value = false
  445. }
  446. if (options.service) activeService.value = options.service
  447. })
  448. const progressSteps = computed(() => {
  449. const status = order.status
  450. const steps = [
  451. { label: '商户下单', time: '' },
  452. { label: '运营派单', time: '' },
  453. { label: '履约接单', time: '' },
  454. { label: '服务中', time: '' },
  455. { label: '已完成', time: '' }
  456. ]
  457. const getSystemLogTime = (step) => {
  458. const log = (orderLogsData.value || []).find(l => parseInt(l.step) === step)
  459. return log ? (log.createTime || log.time) : ''
  460. }
  461. const getFulfillerLogTime = (step) => {
  462. const log = (fulfillerLogsData.value || []).find(l => parseInt(l.step) === step)
  463. return log ? (log.createTime || log.time) : ''
  464. }
  465. const fulfillerCustomLogTime = () => {
  466. const log = (fulfillerLogsData.value || []).reverse().find(l => {
  467. const s = parseInt(l.step)
  468. return s >= 1 && s <= 98
  469. })
  470. return log ? (log.createTime || log.time) : ''
  471. }
  472. let active = 0
  473. if (status === 5) {
  474. const cancelTime = getSystemLogTime(5) || order.cancelTime || ''
  475. return [
  476. { label: '商户下单', time: getSystemLogTime(0) || order.createTime || '', done: true, active: false },
  477. { label: '已取消', time: cancelTime, done: true, active: true }
  478. ].map(s => ({ ...s, time: s.time ? s.time.substring(5, 16) : '' }))
  479. }
  480. steps[0].time = getSystemLogTime(0) || order.createTime || ''
  481. if (steps[0].time) active = 1
  482. steps[1].time = getSystemLogTime(1) || ''
  483. if (steps[1].time || status >= 1) active = 2
  484. steps[2].time = getSystemLogTime(2) || getFulfillerLogTime(0) || ''
  485. if (status === 1) {
  486. steps[2].label = '待履约者接单'
  487. } else if (status >= 2) {
  488. steps[2].label = '履约者已接单'
  489. if (steps[2].time) active = 3
  490. }
  491. const cTime = fulfillerCustomLogTime()
  492. steps[3].time = getSystemLogTime(3) || cTime || ''
  493. if (status === 2) {
  494. steps[3].label = '待服务'
  495. if (cTime) active = 4
  496. } else if (status >= 3) {
  497. steps[3].label = '服务进行中'
  498. if (steps[3].time) active = 4
  499. }
  500. if (status === 4 || getSystemLogTime(4) || getFulfillerLogTime(99)) {
  501. steps[4].time = getSystemLogTime(4) || getFulfillerLogTime(99) || ''
  502. active = 5
  503. }
  504. return steps.map((s, i) => ({
  505. label: s.label,
  506. time: s.time ? s.time.substring(5, 16) : '',
  507. done: i < active,
  508. active: i === active
  509. }))
  510. })
  511. const baseInfoList = computed(() => {
  512. const list = [
  513. { label: '系统单号', value: order.code || order.id },
  514. { label: '服务类型', value: currentServiceName.value },
  515. { label: '归属门店', value: order.shopName },
  516. { label: '宠主信息', value: `${order.userName} / ${order.userPhone}` },
  517. { label: '预约时间', value: order.bookTime },
  518. { label: '团购套餐', value: order.packageName },
  519. { label: '创建时间', value: order.createTime },
  520. { label: '订单备注', value: order.remark }
  521. ]
  522. if (order.statusKey === 'cancel') list.push({ label: '取消时间', value: order.cancelTime || '2024-02-02 11:30', highlight: true })
  523. return list
  524. })
  525. // 视频判定辅助函数
  526. const isVideo = (url) => {
  527. if (!url) return false;
  528. const videoExts = ['.mp4', '.mov', '.avi', '.wmv', '.webm', '.ogg'];
  529. return videoExts.some(ext => String(url).toLowerCase().endsWith(ext));
  530. }
  531. const videoPreview = reactive({
  532. visible: false,
  533. url: ''
  534. })
  535. const openVideoPreview = (url) => {
  536. videoPreview.url = url;
  537. videoPreview.visible = true;
  538. }
  539. const closeVideoPreview = () => {
  540. videoPreview.visible = false;
  541. videoPreview.url = '';
  542. }
  543. const previewImage = (url, mediaList) => {
  544. const imgUrls = mediaList.filter(m => m.type === 'image').map(m => m.url);
  545. uni.previewImage({
  546. current: url,
  547. urls: imgUrls
  548. });
  549. }
  550. const serviceTimeline = computed(() => {
  551. const list = fulfillerLogsData.value || []
  552. return list.map((i) => {
  553. const rawUrls = i?.photoUrls || [];
  554. const urlList = Array.isArray(rawUrls) ? rawUrls : (typeof rawUrls === 'string' ? rawUrls.split(',').filter(Boolean) : []);
  555. const media = urlList.map(url => {
  556. const type = isVideo(url) ? 'video' : 'image';
  557. return { type, url }
  558. });
  559. return {
  560. title: i?.title || '-',
  561. time: i?.createTime || i?.time || '',
  562. desc: i?.content || '',
  563. media: media
  564. }
  565. })
  566. })
  567. const orderLogs = computed(() => {
  568. return (orderLogsData.value || []).map(log => ({
  569. time: log.createTime || log.time || '',
  570. title: log.title,
  571. desc: log.content
  572. }))
  573. })
  574. const showCancelModal = ref(false)
  575. const cancelReason = ref('')
  576. const onCancelOrder = () => {
  577. cancelReason.value = ''
  578. showCancelModal.value = true
  579. }
  580. const closeCancelModal = () => {
  581. showCancelModal.value = false
  582. }
  583. const confirmCancelOrder = async () => {
  584. const reason = cancelReason.value.trim()
  585. if (!reason) {
  586. uni.showToast({ title: '取消原因不能为空', icon: 'none' })
  587. return
  588. }
  589. try {
  590. uni.showLoading({ title: '处理中' })
  591. await cancelSubOrder({ orderId: order.id, reason })
  592. uni.hideLoading()
  593. uni.showToast({ title: '订单已取消', icon: 'success' })
  594. showCancelModal.value = false
  595. // 重新初始化页面数据
  596. loadOrderDetail(order.id)
  597. } catch (error) {
  598. uni.hideLoading()
  599. console.error('取消订单失败:', error)
  600. uni.showToast({ title: '取消失败', icon: 'none' })
  601. }
  602. }
  603. </script>
  604. <style lang="scss" scoped>
  605. .order-detail-page {
  606. background: #f2f3f7;
  607. min-height: 100vh;
  608. padding-bottom: 160rpx;
  609. }
  610. .order-header {
  611. padding: 24rpx 32rpx 16rpx;
  612. }
  613. .order-id-row {
  614. display: flex;
  615. align-items: center;
  616. gap: 16rpx;
  617. flex-wrap: wrap;
  618. }
  619. .order-id {
  620. font-size: 26rpx;
  621. color: #666;
  622. font-family: monospace;
  623. }
  624. .status-badge {
  625. font-size: 22rpx;
  626. padding: 4rpx 16rpx;
  627. border-radius: 20rpx;
  628. font-weight: 600;
  629. }
  630. .badge-wait_dispatch {
  631. background: #fff0f0;
  632. color: #f44336;
  633. }
  634. .badge-wait_accept {
  635. background: #fff8e1;
  636. color: #ff9800;
  637. }
  638. .badge-serving {
  639. background: #e3f2fd;
  640. color: #2196f3;
  641. }
  642. .badge-done {
  643. background: #e8f5e9;
  644. color: #4caf50;
  645. }
  646. .badge-cancel {
  647. background: #f5f5f5;
  648. color: #9e9e9e;
  649. }
  650. .service-badge {
  651. font-size: 22rpx;
  652. padding: 4rpx 16rpx;
  653. border-radius: 20rpx;
  654. background: #fff3e0;
  655. color: #ff9500;
  656. }
  657. .progress-card {
  658. background: #fff;
  659. margin: 0 24rpx 24rpx;
  660. border-radius: 28rpx;
  661. padding: 32rpx 16rpx 24rpx;
  662. }
  663. .progress-steps {
  664. display: flex;
  665. align-items: flex-start;
  666. }
  667. .step-item {
  668. display: flex;
  669. flex-direction: column;
  670. align-items: center;
  671. flex: 1;
  672. position: relative;
  673. z-index: 1;
  674. }
  675. .step-circle {
  676. width: 44rpx;
  677. height: 44rpx;
  678. border-radius: 50%;
  679. background: #e0e0e0;
  680. display: flex;
  681. align-items: center;
  682. justify-content: center;
  683. margin-bottom: 8rpx;
  684. }
  685. .step-num {
  686. font-size: 20rpx;
  687. color: #fff;
  688. }
  689. .step-item.done .step-circle,
  690. .step-item.active .step-circle {
  691. background: #ff9500;
  692. }
  693. .step-line {
  694. position: absolute;
  695. top: 22rpx;
  696. left: 50%;
  697. width: 100%;
  698. height: 4rpx;
  699. background: #e0e0e0;
  700. z-index: 0;
  701. }
  702. .step-line.done {
  703. background: #ff9500;
  704. }
  705. .step-label {
  706. font-size: 20rpx;
  707. color: #999;
  708. text-align: center;
  709. }
  710. .step-item.done .step-label,
  711. .step-item.active .step-label {
  712. color: #ff9500;
  713. font-weight: 600;
  714. }
  715. .step-time {
  716. font-size: 18rpx;
  717. color: #bbb;
  718. margin-top: 4rpx;
  719. }
  720. .info-row-cards {
  721. display: flex;
  722. gap: 20rpx;
  723. margin: 0 24rpx 24rpx;
  724. }
  725. .info-card {
  726. flex: 1;
  727. background: #fff;
  728. border-radius: 28rpx;
  729. padding: 24rpx;
  730. min-width: 0;
  731. }
  732. .card-label {
  733. display: block;
  734. font-size: 24rpx;
  735. font-weight: 700;
  736. color: #333;
  737. margin-bottom: 20rpx;
  738. border-left: 6rpx solid #ff9500;
  739. padding-left: 12rpx;
  740. }
  741. .pet-header {
  742. display: flex;
  743. align-items: center;
  744. gap: 16rpx;
  745. margin-bottom: 20rpx;
  746. }
  747. .pet-avatar {
  748. width: 72rpx;
  749. height: 72rpx;
  750. border-radius: 20rpx;
  751. background: #e3f2fd;
  752. color: #2196f3;
  753. font-size: 36rpx;
  754. font-weight: bold;
  755. display: flex;
  756. align-items: center;
  757. justify-content: center;
  758. }
  759. .pet-basic {
  760. flex: 1;
  761. min-width: 0;
  762. }
  763. .pet-name {
  764. display: block;
  765. font-size: 28rpx;
  766. font-weight: bold;
  767. color: #222;
  768. }
  769. .pet-tags {
  770. display: flex;
  771. flex-wrap: wrap;
  772. gap: 12rpx;
  773. margin-top: 10rpx;
  774. align-items: center;
  775. }
  776. .mini-tag {
  777. font-size: 20rpx;
  778. background: #f5f5f5;
  779. border-radius: 8rpx;
  780. padding: 4rpx 12rpx;
  781. color: #666;
  782. white-space: nowrap;
  783. }
  784. .breed-badge {
  785. font-size: 20rpx;
  786. background: #ffe0b2;
  787. color: #e65100;
  788. border-radius: 8rpx;
  789. padding: 4rpx 12rpx;
  790. white-space: nowrap;
  791. }
  792. .pet-attrs {
  793. display: flex;
  794. flex-wrap: wrap;
  795. gap: 12rpx 0;
  796. }
  797. .attr-item {
  798. width: 50%;
  799. }
  800. .attr-item.full {
  801. width: 100%;
  802. }
  803. .attr-label {
  804. display: block;
  805. font-size: 20rpx;
  806. color: #aaa;
  807. }
  808. .attr-val {
  809. display: block;
  810. font-size: 22rpx;
  811. color: #333;
  812. }
  813. .attr-val.highlight {
  814. color: #4caf50;
  815. }
  816. .user-header {
  817. display: flex;
  818. align-items: center;
  819. gap: 16rpx;
  820. margin-bottom: 20rpx;
  821. }
  822. .user-avatar {
  823. width: 80rpx;
  824. height: 80rpx;
  825. border-radius: 50%;
  826. background: #f5f5f5;
  827. display: flex;
  828. align-items: center;
  829. justify-content: center;
  830. }
  831. .user-name-text {
  832. display: block;
  833. font-size: 28rpx;
  834. font-weight: bold;
  835. color: #222;
  836. }
  837. .user-phone {
  838. display: block;
  839. font-size: 24rpx;
  840. color: #666;
  841. }
  842. .service-address-box {
  843. background: #fff8f0;
  844. border-radius: 16rpx;
  845. padding: 16rpx;
  846. }
  847. .addr-label {
  848. display: block;
  849. font-size: 20rpx;
  850. color: #ff9500;
  851. margin-bottom: 6rpx;
  852. }
  853. .addr-text {
  854. display: block;
  855. font-size: 22rpx;
  856. color: #333;
  857. line-height: 1.5;
  858. }
  859. .detail-tabs-wrap {
  860. margin: 0 24rpx;
  861. background: #fff;
  862. border-radius: 28rpx;
  863. overflow: hidden;
  864. }
  865. .tab-nav {
  866. display: flex;
  867. border-bottom: 1rpx solid #f0f0f0;
  868. }
  869. .tab-nav-item {
  870. flex: 1;
  871. text-align: center;
  872. padding: 24rpx 0;
  873. font-size: 24rpx;
  874. color: #666;
  875. position: relative;
  876. }
  877. .tab-nav-item.active {
  878. color: #ff9500;
  879. font-weight: bold;
  880. }
  881. .tab-nav-item.active::after {
  882. content: '';
  883. position: absolute;
  884. bottom: 0;
  885. left: 50%;
  886. transform: translateX(-50%);
  887. width: 48rpx;
  888. height: 6rpx;
  889. background: #ff9500;
  890. border-radius: 6rpx;
  891. }
  892. .tab-content {
  893. padding: 28rpx;
  894. min-height: 280rpx;
  895. }
  896. .base-info-grid {
  897. display: flex;
  898. flex-wrap: wrap;
  899. gap: 20rpx;
  900. margin-bottom: 32rpx;
  901. }
  902. .bi-item {
  903. width: calc(50% - 10rpx);
  904. background: #f8f8f8;
  905. border-radius: 16rpx;
  906. padding: 16rpx 20rpx;
  907. box-sizing: border-box;
  908. display: flex;
  909. flex-direction: column;
  910. justify-content: center;
  911. }
  912. .bi-label {
  913. display: block;
  914. font-size: 20rpx;
  915. color: #aaa;
  916. margin-bottom: 8rpx;
  917. }
  918. .bi-val {
  919. display: block;
  920. font-size: 24rpx;
  921. color: #333;
  922. font-weight: 500;
  923. word-break: break-all;
  924. line-height: 1.4;
  925. }
  926. .bi-val.highlight {
  927. color: #f44336;
  928. }
  929. .sub-title {
  930. display: block;
  931. font-size: 28rpx;
  932. font-weight: bold;
  933. color: #333;
  934. margin: 12rpx 0 24rpx;
  935. }
  936. /* 任务卡片样式 */
  937. .task-card {
  938. padding: 24rpx;
  939. background: #fff;
  940. border: 1rpx solid #f0f0f0;
  941. border-radius: 12rpx;
  942. margin-bottom: 20rpx;
  943. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.02);
  944. }
  945. .task-header {
  946. display: flex;
  947. align-items: center;
  948. gap: 16rpx;
  949. margin-bottom: 20rpx;
  950. }
  951. .type-tag {
  952. font-size: 22rpx;
  953. padding: 4rpx 12rpx;
  954. border-radius: 6rpx;
  955. border: 1rpx solid;
  956. }
  957. .tag-blue {
  958. color: #007aff;
  959. background: #eef6ff;
  960. border-color: #007aff;
  961. }
  962. .tag-orange {
  963. color: #ff9500;
  964. background: #fff8f0;
  965. border-color: #ff9500;
  966. }
  967. .task-time {
  968. font-size: 26rpx;
  969. font-weight: bold;
  970. color: #f56c6c;
  971. }
  972. .task-body {
  973. display: flex;
  974. flex-direction: column;
  975. gap: 12rpx;
  976. }
  977. .task-row {
  978. display: flex;
  979. align-items: flex-start;
  980. gap: 20rpx;
  981. }
  982. .task-label {
  983. width: 60rpx;
  984. font-size: 24rpx;
  985. color: #999;
  986. flex-shrink: 0;
  987. }
  988. .task-value {
  989. font-size: 26rpx;
  990. color: #333;
  991. line-height: 1.4;
  992. }
  993. .contact-row {
  994. margin-top: 8rpx;
  995. padding-top: 8rpx;
  996. }
  997. .contact-row .task-value {
  998. color: #999;
  999. }
  1000. /* 执行要求卡片 */
  1001. .req-card {
  1002. background: #f9f9f9;
  1003. border: none;
  1004. }
  1005. .req-item {
  1006. display: flex;
  1007. align-items: center;
  1008. }
  1009. .req-label {
  1010. width: 140rpx;
  1011. font-size: 24rpx;
  1012. color: #333;
  1013. }
  1014. .req-value {
  1015. flex: 1;
  1016. font-size: 26rpx;
  1017. color: #333;
  1018. }
  1019. .assignee-card {
  1020. background: #f9f9f9;
  1021. border-radius: 24rpx;
  1022. padding: 28rpx;
  1023. }
  1024. .assignee-header {
  1025. display: flex;
  1026. gap: 24rpx;
  1027. }
  1028. .assignee-avatar {
  1029. width: 100rpx;
  1030. height: 100rpx;
  1031. border-radius: 50%;
  1032. background: #e0e0e0;
  1033. display: flex;
  1034. align-items: center;
  1035. justify-content: center;
  1036. }
  1037. .assignee-name {
  1038. display: block;
  1039. font-size: 30rpx;
  1040. font-weight: bold;
  1041. color: #222;
  1042. margin-bottom: 8rpx;
  1043. }
  1044. .assignee-phone,
  1045. .assignee-zone {
  1046. display: block;
  1047. font-size: 24rpx;
  1048. color: #666;
  1049. margin-bottom: 4rpx;
  1050. }
  1051. .timeline {
  1052. position: relative;
  1053. padding-left: 40rpx;
  1054. }
  1055. .tl-item {
  1056. position: relative;
  1057. margin-bottom: 40rpx;
  1058. padding-left: 32rpx;
  1059. }
  1060. .tl-dot {
  1061. position: absolute;
  1062. left: -12rpx;
  1063. top: 8rpx;
  1064. width: 24rpx;
  1065. height: 24rpx;
  1066. border-radius: 50%;
  1067. background: #ff9500;
  1068. border: 4rpx solid #fff;
  1069. box-shadow: 0 0 0 4rpx #ff9500;
  1070. }
  1071. .tl-item::before {
  1072. content: '';
  1073. position: absolute;
  1074. left: -2rpx;
  1075. top: 32rpx;
  1076. bottom: -40rpx;
  1077. width: 4rpx;
  1078. background: #f0f0f0;
  1079. }
  1080. .tl-item:last-child::before {
  1081. display: none;
  1082. }
  1083. .tl-time {
  1084. display: block;
  1085. font-size: 22rpx;
  1086. color: #aaa;
  1087. margin-bottom: 6rpx;
  1088. }
  1089. .tl-title {
  1090. display: block;
  1091. font-size: 28rpx;
  1092. font-weight: 600;
  1093. color: #222;
  1094. margin-bottom: 6rpx;
  1095. }
  1096. .tl-desc {
  1097. display: block;
  1098. font-size: 24rpx;
  1099. color: #666;
  1100. }
  1101. .log-dot {
  1102. background: #e0e0e0;
  1103. box-shadow: 0 0 0 4rpx #e0e0e0;
  1104. }
  1105. .empty-state {
  1106. display: flex;
  1107. flex-direction: column;
  1108. align-items: center;
  1109. justify-content: center;
  1110. padding: 80rpx 0;
  1111. gap: 24rpx;
  1112. }
  1113. .empty-text {
  1114. font-size: 26rpx;
  1115. color: #bbb;
  1116. }
  1117. .cancel-bar {
  1118. position: fixed;
  1119. bottom: 0;
  1120. left: 0;
  1121. right: 0;
  1122. padding: 24rpx 32rpx;
  1123. background: rgba(255, 255, 255, 0.95);
  1124. box-shadow: 0 -8rpx 28rpx rgba(0, 0, 0, 0.08);
  1125. z-index: 100;
  1126. }
  1127. .cancel-order-btn {
  1128. width: 100%;
  1129. height: 96rpx;
  1130. font-size: 32rpx;
  1131. font-weight: 600;
  1132. border: 2rpx solid #f44336;
  1133. color: #f44336;
  1134. background: transparent;
  1135. border-radius: 48rpx;
  1136. line-height: 96rpx;
  1137. }
  1138. /* 骨架屏动画与样式 */
  1139. .skeleton-page {
  1140. padding: 24rpx;
  1141. }
  1142. .skeleton-box {
  1143. background: #e0e0e0;
  1144. border-radius: 16rpx;
  1145. margin-bottom: 24rpx;
  1146. animation: skeleton-shimmer 1.5s infinite linear;
  1147. background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  1148. background-size: 400% 100%;
  1149. }
  1150. @keyframes skeleton-shimmer {
  1151. 0% {
  1152. background-position: 100% 0;
  1153. }
  1154. 100% {
  1155. background-position: -100% 0;
  1156. }
  1157. }
  1158. .skeleton-header {
  1159. height: 80rpx;
  1160. border-radius: 20rpx;
  1161. }
  1162. .skeleton-progress {
  1163. height: 120rpx;
  1164. border-radius: 28rpx;
  1165. }
  1166. .skeleton-row-cards {
  1167. display: flex;
  1168. gap: 20rpx;
  1169. margin-bottom: 24rpx;
  1170. }
  1171. .skeleton-card {
  1172. flex: 1;
  1173. height: 280rpx;
  1174. border-radius: 28rpx;
  1175. margin-bottom: 0;
  1176. }
  1177. .skeleton-content {
  1178. height: 500rpx;
  1179. border-radius: 28rpx;
  1180. }
  1181. /* 渐显进入动画 */
  1182. .fade-in {
  1183. animation: fadeIn 0.4s ease-out forwards;
  1184. }
  1185. @keyframes fadeIn {
  1186. from {
  1187. opacity: 0;
  1188. transform: translateY(10rpx);
  1189. }
  1190. to {
  1191. opacity: 1;
  1192. transform: translateY(0);
  1193. }
  1194. }
  1195. /* 日志媒体相关样式 */
  1196. .tl-media {
  1197. display: flex;
  1198. flex-wrap: wrap;
  1199. gap: 16rpx;
  1200. margin-top: 16rpx;
  1201. }
  1202. .media-item {
  1203. width: 160rpx;
  1204. height: 160rpx;
  1205. border-radius: 12rpx;
  1206. overflow: hidden;
  1207. background: #f0f0f0;
  1208. position: relative;
  1209. }
  1210. .p-img, .p-video-box {
  1211. width: 100%;
  1212. height: 100%;
  1213. }
  1214. .play-icon-overlay {
  1215. position: absolute;
  1216. top: 50%;
  1217. left: 50%;
  1218. transform: translate(-50%, -50%);
  1219. width: 60rpx;
  1220. height: 60rpx;
  1221. background: rgba(0, 0, 0, 0.4);
  1222. border-radius: 50%;
  1223. display: flex;
  1224. align-items: center;
  1225. justify-content: center;
  1226. pointer-events: none;
  1227. }
  1228. /* 视频预览弹窗 */
  1229. .video-preview-mask {
  1230. position: fixed;
  1231. top: 0;
  1232. left: 0;
  1233. right: 0;
  1234. bottom: 0;
  1235. background: #000;
  1236. z-index: 999;
  1237. display: flex;
  1238. align-items: center;
  1239. justify-content: center;
  1240. }
  1241. .preview-video {
  1242. width: 100%;
  1243. height: 60vh;
  1244. }
  1245. .close-video-btn {
  1246. position: absolute;
  1247. top: 100rpx;
  1248. right: 40rpx;
  1249. width: 64rpx;
  1250. height: 64rpx;
  1251. border-radius: 50%;
  1252. background: rgba(255, 255, 255, 0.2);
  1253. display: flex;
  1254. justify-content: center;
  1255. z-index: 1000;
  1256. }
  1257. /* 自定义弹窗样式 */
  1258. .custom-modal {
  1259. position: fixed;
  1260. top: 0;
  1261. left: 0;
  1262. width: 100%;
  1263. height: 100%;
  1264. z-index: 999;
  1265. display: flex;
  1266. align-items: center;
  1267. justify-content: center;
  1268. }
  1269. .modal-mask {
  1270. position: absolute;
  1271. top: 0;
  1272. left: 0;
  1273. width: 100%;
  1274. height: 100%;
  1275. background-color: rgba(0, 0, 0, 0.5);
  1276. }
  1277. .modal-content {
  1278. position: relative;
  1279. width: 80%;
  1280. background-color: #fff;
  1281. border-radius: 16rpx;
  1282. overflow: hidden;
  1283. z-index: 1000;
  1284. }
  1285. .modal-title {
  1286. padding: 30rpx 0 20rpx;
  1287. text-align: center;
  1288. font-size: 32rpx;
  1289. font-weight: bold;
  1290. color: #333;
  1291. }
  1292. .modal-body {
  1293. padding: 10rpx 40rpx 30rpx;
  1294. }
  1295. .cancel-input {
  1296. width: 100%;
  1297. height: 160rpx;
  1298. background-color: #f8f8f8;
  1299. border-radius: 8rpx;
  1300. padding: 20rpx;
  1301. font-size: 28rpx;
  1302. box-sizing: border-box;
  1303. color: #333;
  1304. }
  1305. .ph-color {
  1306. color: #999;
  1307. }
  1308. .modal-footer {
  1309. display: flex;
  1310. border-top: 1rpx solid #eee;
  1311. }
  1312. .modal-btn {
  1313. flex: 1;
  1314. height: 90rpx;
  1315. line-height: 90rpx;
  1316. text-align: center;
  1317. font-size: 30rpx;
  1318. font-weight: 500;
  1319. }
  1320. .btn-cancel {
  1321. color: #666;
  1322. border-right: 1rpx solid #eee;
  1323. }
  1324. .btn-confirm {
  1325. color: #2196f3;
  1326. }
  1327. </style>