index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <view class="order-list-page">
  3. <nav-bar title="订单列表" :showBack="false"></nav-bar>
  4. <!-- 顶部状态栏 -->
  5. <view class="sticky-header">
  6. <scroll-view scroll-x class="tabs-scroll" :show-scrollbar="false">
  7. <view class="tabs-row">
  8. <view v-for="tab in tabList" :key="tab.value"
  9. :class="['tab-item', { active: activeStatus === tab.value }]" @click="onTabClick(tab.value)">
  10. <text>{{ tab.title }}</text>
  11. </view>
  12. </view>
  13. </scroll-view>
  14. <!-- 搜索和过滤 -->
  15. <view class="filter-row">
  16. <picker :range="typeOptions" range-key="text" @change="onTypeChange">
  17. <view class="dropdown-btn">
  18. <text>{{ currentTypeName }}</text>
  19. <uni-icons type="bottom" size="12" color="#333"></uni-icons>
  20. </view>
  21. </picker>
  22. <view class="search-wrap">
  23. <uni-icons type="search" size="14" color="#999"></uni-icons>
  24. <input class="search-input" v-model="searchValue" placeholder="订单号/商户/宠主/手机号"
  25. placeholder-class="placeholder-style" @confirm="onSearch" />
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 订单列表内容 -->
  30. <view class="list-container">
  31. <view class="order-card" v-for="order in orders" :key="order.id" @click="goToDetail(order)">
  32. <!-- 头部:订单号与状态 -->
  33. <view class="order-head">
  34. <text class="order-no">{{ order.id }}</text>
  35. <text :class="['status-text', order.statusClass]">{{ order.statusText }}</text>
  36. </view>
  37. <!-- 主体信息 -->
  38. <view class="order-body">
  39. <view class="service-row">
  40. <text class="service-name">{{ order.serviceType }}</text>
  41. <text class="service-tag tag-orange" v-if="order.serviceTags[0]">{{ order.serviceTags[0]
  42. }}</text>
  43. <text class="service-tag tag-blue" v-if="order.serviceTags[1] === '接'">接</text>
  44. <text class="service-tag tag-green" v-if="order.serviceTags[1] === '送'">送</text>
  45. </view>
  46. <view class="pet-row">
  47. <view class="pet-avatar-text">
  48. <text>{{ order.petName.substring(0, 1).toUpperCase() }}</text>
  49. </view>
  50. <view class="pet-desc">
  51. <text class="bold">{{ order.petName }}</text>
  52. <text class="sub">{{ order.petBreed }}</text>
  53. </view>
  54. <text class="user-desc">{{ order.userName }}</text>
  55. </view>
  56. <view class="info-list">
  57. <view class="info-item">
  58. <uni-icons type="location" size="14" color="#999"></uni-icons>
  59. <text>{{ order.address }}</text>
  60. </view>
  61. <view class="info-item">
  62. <uni-icons type="shop" size="14" color="#999"></uni-icons>
  63. <text>{{ order.shopName }} {{ order.userPhone }}</text>
  64. </view>
  65. <view class="info-item">
  66. <uni-icons type="calendar" size="14" color="#999"></uni-icons>
  67. <text>预约: {{ order.bookTime }}</text>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 履约与操作栏 -->
  72. <view class="order-foot">
  73. <view class="foot-left">
  74. <text class="create-time">下单: {{ order.createTime }}</text>
  75. <view class="assign-info">
  76. <text class="assign-label">履约信息:</text>
  77. <text class="assign-name" v-if="order.assigneeName">{{ order.assigneeName }}</text>
  78. <text class="assign-none" v-else>暂未指派</text>
  79. </view>
  80. <text class="cancel-time" v-if="order.statusText === '已取消' && order.cancelTime">取消: {{
  81. order.cancelTime }}</text>
  82. </view>
  83. <view class="actions">
  84. <template v-if="order.statusText === '待派单' || order.statusText === '待接单'">
  85. <button size="mini" class="action-btn btn-cancel"
  86. @click.stop="onCancelOrder(order)">取消</button>
  87. <button size="mini" class="action-btn btn-primary"
  88. @click.stop="goToDetail(order)">详情</button>
  89. </template>
  90. <template v-else-if="['服务中', '待商家确认', '已完成'].includes(order.statusText)">
  91. <button v-if="['服务中', '已完成'].includes(order.statusText)" size="mini"
  92. class="action-btn btn-cancel" @click.stop="onComplaint(order)">投诉</button>
  93. <button size="mini" class="action-btn btn-primary"
  94. @click.stop="goToDetail(order)">详情</button>
  95. </template>
  96. <template v-else>
  97. <button size="mini" class="action-btn btn-primary"
  98. @click.stop="goToDetail(order)">详情</button>
  99. </template>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- 空状态 -->
  104. <view class="empty-state" v-if="!loading && orders.length === 0">
  105. <text class="empty-text">暂无相关订单</text>
  106. </view>
  107. <!-- 加载状态 -->
  108. <view class="loading-state" v-if="loading">
  109. <text class="loading-text">加载中...</text>
  110. </view>
  111. </view>
  112. <!-- 自定义取消订单弹窗 -->
  113. <view class="custom-modal" v-if="showCancelModal">
  114. <view class="modal-mask" @click="closeCancelModal"></view>
  115. <view class="modal-content">
  116. <view class="modal-title">提示</view>
  117. <view class="modal-body">
  118. <view style="margin-bottom: 20rpx; font-size: 28rpx; color: #666;">确定要取消订单 [{{ currentCancelOrder?.id }}] 吗?</view>
  119. <textarea class="cancel-input" v-model="cancelReason" placeholder="必填,请输入取消原因" placeholder-class="ph-color" :show-confirm-bar="false"></textarea>
  120. </view>
  121. <view class="modal-footer">
  122. <view class="modal-btn btn-cancel" @click="closeCancelModal">取消</view>
  123. <view class="modal-btn btn-confirm" @click="confirmCancelOrder">确定</view>
  124. </view>
  125. </view>
  126. </view>
  127. <custom-tabbar></custom-tabbar>
  128. </view>
  129. </template>
  130. <script setup>
  131. import { ref, computed, onMounted } from 'vue'
  132. import { onLoad } from '@dcloudio/uni-app'
  133. import navBar from '@/components/nav-bar/index.vue'
  134. import customTabbar from '@/components/custom-tabbar/index.vue'
  135. import orderStatusData from '@/json/orderStatus.json'
  136. import { listAll } from '@/api/service/list'
  137. import { listSubOrder, cancelSubOrder } from '@/api/order/subOrder'
  138. import { listAreaStation } from '@/api/system/areaStation'
  139. // 加载状态
  140. const loading = ref(false)
  141. // 筛选与搜索
  142. const activeStatus = ref(-1) // -1 表示全部,其他值为枚举值
  143. const filterType = ref(0)
  144. const searchValue = ref('')
  145. // 分页参数
  146. const pagination = ref({
  147. current: 1,
  148. size: 10,
  149. total: 0
  150. })
  151. // 从 orderStatus.json 生成 tabList
  152. const tabList = ref([
  153. { title: '全部订单', value: -1 },
  154. ...orderStatusData.map(item => ({
  155. title: item.label,
  156. value: item.value,
  157. color: item.color
  158. }))
  159. ])
  160. const typeOptions = ref([{ text: '全部类型', value: 0 }])
  161. const serviceList = ref([])
  162. const areaStationList = ref([])
  163. const areaStationMap = ref({})
  164. // 加载服务类型列表
  165. const loadServiceTypes = async () => {
  166. try {
  167. const services = await listAll()
  168. if (services && services.length > 0) {
  169. serviceList.value = services
  170. const serviceTypes = services.map((service, index) => ({
  171. text: service.name,
  172. value: index + 1,
  173. id: service.id
  174. }))
  175. typeOptions.value = [
  176. { text: '全部类型', value: 0 },
  177. ...serviceTypes
  178. ]
  179. }
  180. } catch (error) {
  181. console.error('加载服务类型失败:', error)
  182. }
  183. }
  184. // 加载区域站点列表
  185. const loadAreaStations = async () => {
  186. try {
  187. const res = await listAreaStation()
  188. if (res && res.data) {
  189. areaStationList.value = res.data
  190. const map = {}
  191. for (const item of res.data) {
  192. if (item && item.id !== undefined && item.id !== null) {
  193. map[item.id] = item
  194. }
  195. }
  196. areaStationMap.value = map
  197. }
  198. } catch (error) {
  199. console.error('加载区域站点失败:', error)
  200. }
  201. }
  202. onMounted(() => {
  203. loadServiceTypes()
  204. loadAreaStations()
  205. loadOrders()
  206. })
  207. const currentTypeName = computed(() => {
  208. const option = typeOptions.value.find(opt => opt.value === filterType.value)
  209. return option ? option.text : '全部类型'
  210. })
  211. // 根据枚举值获取状态信息
  212. const getStatusInfo = (value) => {
  213. return orderStatusData.find(item => item.value === value)
  214. }
  215. // 根据服务ID获取服务名称
  216. const getServiceName = (serviceId) => {
  217. const service = serviceList.value.find(s => s.id === serviceId)
  218. return service ? service.name : '未知服务'
  219. }
  220. // 获取城市/区域文本
  221. const getCityDistrictText = (row) => {
  222. if (!row || !row.site) return ''
  223. const station = areaStationMap.value[row.site]
  224. if (!station) return ''
  225. const parent = station.parentId ? areaStationMap.value[station.parentId] : undefined
  226. if (!parent) return station.name || ''
  227. if (parent.type === 0) return parent.name || ''
  228. if (parent.type === 1) {
  229. const city = parent.parentId ? areaStationMap.value[parent.parentId] : undefined
  230. return `${city?.name || ''}/${parent.name || ''}`
  231. }
  232. return parent.name || ''
  233. }
  234. // 获取服务模式标签
  235. const getServiceModeTag = (row) => {
  236. const t = row?.type
  237. if (t === 0 || t === '0' || t === 1 || t === '1') return '往返'
  238. return ''
  239. }
  240. // 获取服务订单类型标签
  241. const getServiceOrderTypeTag = (row) => {
  242. const t = row?.type
  243. if (t === 0 || t === '0') return { label: '接', type: 'blue' }
  244. if (t === 1 || t === '1') return { label: '送', type: 'green' }
  245. if (t === 2 || t === '2') return { label: '单程接', type: 'blue' }
  246. if (t === 3 || t === '3') return { label: '单程送', type: 'green' }
  247. return null
  248. }
  249. const onTabClick = (value) => {
  250. activeStatus.value = value
  251. pagination.value.current = 1
  252. loadOrders()
  253. }
  254. const onTypeChange = (e) => {
  255. const index = Number(e.detail.value)
  256. filterType.value = index
  257. pagination.value.current = 1
  258. loadOrders()
  259. }
  260. // 订单列表数据
  261. const orders = ref([])
  262. // 加载订单列表
  263. const loadOrders = async () => {
  264. loading.value = true
  265. try {
  266. const selectedType = typeOptions.value.find(opt => opt.value === filterType.value)
  267. const params = {
  268. pageNum: pagination.value.current,
  269. pageSize: pagination.value.size,
  270. status: activeStatus.value !== -1 ? activeStatus.value : undefined,
  271. service: selectedType && selectedType.id ? selectedType.id : undefined,
  272. content: searchValue.value || undefined
  273. }
  274. const res = await listSubOrder(params)
  275. console.log('后端返回数据:', res)
  276. if (res) {
  277. const rows = res.rows || []
  278. console.log('rows:', rows)
  279. orders.value = rows.map(row => transformOrder(row))
  280. console.log('转换后的orders:', orders.value)
  281. pagination.value.total = res.total || 0
  282. }
  283. } catch (error) {
  284. console.error('加载订单列表失败:', error)
  285. } finally {
  286. loading.value = false
  287. }
  288. }
  289. // 转换订单数据格式
  290. const transformOrder = (row) => {
  291. const statusInfo = getStatusInfo(row.status)
  292. const serviceName = getServiceName(row.service)
  293. const modeTag = getServiceModeTag(row)
  294. const typeTag = getServiceOrderTypeTag(row)
  295. const serviceTags = []
  296. if (modeTag) serviceTags.push(modeTag)
  297. if (typeTag) serviceTags.push(typeTag.label)
  298. return {
  299. // 先展开原始字段,后面的手动赋值具有更高优先级
  300. ...row,
  301. // 显示用的单号(优先用业务编号 code,否则用数据库 ID)
  302. id: row.code || row.id,
  303. rawId: row.id,
  304. serviceType: serviceName,
  305. serviceTags: serviceTags,
  306. petName: row.petName || '未知',
  307. petBreed: row.petBreed || '未知',
  308. userName: row.customerName || '未知',
  309. address: row.toAddress || row.fromAddress || getCityDistrictText(row),
  310. shopName: row.storeName || '未知',
  311. userPhone: row.contactPhoneNumber || '',
  312. bookTime: row.serviceTime || '',
  313. createTime: row.createTime || '',
  314. statusText: statusInfo ? statusInfo.label : '未知',
  315. statusClass: statusInfo ? `text-${statusInfo.color.replace('#', '')}` : 'text-gray',
  316. assigneeName: row.fulfillerName || '',
  317. cancelTime: row.cancelTime || ''
  318. }
  319. }
  320. // 搜索订单
  321. const onSearch = () => {
  322. pagination.value.current = 1
  323. loadOrders()
  324. }
  325. const showCancelModal = ref(false)
  326. const cancelReason = ref('')
  327. const currentCancelOrder = ref(null)
  328. // 取消订单
  329. const onCancelOrder = (order) => {
  330. currentCancelOrder.value = order
  331. cancelReason.value = ''
  332. showCancelModal.value = true
  333. }
  334. const closeCancelModal = () => {
  335. showCancelModal.value = false
  336. }
  337. const confirmCancelOrder = async () => {
  338. const reason = cancelReason.value.trim()
  339. if (!reason) {
  340. uni.showToast({ title: '取消原因不能为空', icon: 'none' })
  341. return
  342. }
  343. try {
  344. uni.showLoading({ title: '处理中' })
  345. await cancelSubOrder({ orderId: currentCancelOrder.value.rawId, reason })
  346. uni.hideLoading()
  347. uni.showToast({ title: '订单已取消', icon: 'success' })
  348. showCancelModal.value = false
  349. loadOrders()
  350. } catch (error) {
  351. uni.hideLoading()
  352. console.error('取消订单失败:', error)
  353. uni.showToast({ title: '取消失败', icon: 'none' })
  354. }
  355. }
  356. // 跳转到订单详情
  357. const goToDetail = (order) => {
  358. uni.navigateTo({
  359. url: `/pages/order/detail/index?id=${order.rawId}`
  360. })
  361. }
  362. // 投诉
  363. const onComplaint = (order) => {
  364. uni.navigateTo({
  365. url: `/pages/my/complaint/submit/index?orderId=${order.rawId}&fulfillerId=${order.fulfiller}&orderCode=${order.id}`
  366. })
  367. }
  368. </script>
  369. <style lang="scss" scoped>
  370. .order-list-page {
  371. background-color: #f2f2f2;
  372. min-height: 100vh;
  373. padding-bottom: 120rpx;
  374. }
  375. .sticky-header {
  376. position: sticky;
  377. top: calc(44px + var(--status-bar-height, 44px));
  378. z-index: 99;
  379. background-color: #fff;
  380. }
  381. .tabs-scroll {
  382. white-space: nowrap;
  383. border-bottom: 1rpx solid #f5f5f5;
  384. }
  385. .tabs-row {
  386. display: flex;
  387. padding: 0 16rpx;
  388. }
  389. .tab-item {
  390. padding: 24rpx 24rpx;
  391. font-size: 28rpx;
  392. color: #666;
  393. position: relative;
  394. flex-shrink: 0;
  395. }
  396. .tab-item.active {
  397. color: #333;
  398. font-weight: bold;
  399. }
  400. .tab-item.active::after {
  401. content: '';
  402. position: absolute;
  403. bottom: 0;
  404. left: 50%;
  405. transform: translateX(-50%);
  406. width: 48rpx;
  407. height: 6rpx;
  408. background-color: #f7ca3e;
  409. border-radius: 6rpx;
  410. }
  411. .filter-row {
  412. display: flex;
  413. align-items: center;
  414. padding: 12rpx 16rpx;
  415. background-color: #fff;
  416. border-top: 1rpx solid #f9f9f9;
  417. gap: 16rpx;
  418. }
  419. .dropdown-btn {
  420. display: flex;
  421. align-items: center;
  422. gap: 8rpx;
  423. background: #f5f5f5;
  424. border-radius: 34rpx;
  425. padding: 12rpx 24rpx;
  426. font-size: 26rpx;
  427. color: #333;
  428. }
  429. .search-wrap {
  430. flex: 1;
  431. display: flex;
  432. align-items: center;
  433. background: #f5f5f5;
  434. border-radius: 34rpx;
  435. padding: 12rpx 20rpx;
  436. gap: 12rpx;
  437. }
  438. .search-input {
  439. flex: 1;
  440. font-size: 24rpx;
  441. }
  442. .placeholder-style {
  443. color: #999;
  444. font-size: 24rpx;
  445. }
  446. .list-container {
  447. padding: 24rpx;
  448. }
  449. .order-card {
  450. padding: 28rpx;
  451. margin-bottom: 24rpx;
  452. background: #fff;
  453. border-radius: 24rpx;
  454. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
  455. }
  456. .order-head {
  457. display: flex;
  458. justify-content: space-between;
  459. align-items: center;
  460. border-bottom: 1rpx solid #f5f5f5;
  461. padding-bottom: 20rpx;
  462. margin-bottom: 20rpx;
  463. }
  464. .order-no {
  465. font-size: 26rpx;
  466. color: #666;
  467. }
  468. .status-text {
  469. font-size: 26rpx;
  470. font-weight: bold;
  471. }
  472. .text-red {
  473. color: #f44336;
  474. }
  475. .text-orange {
  476. color: #ff9800;
  477. }
  478. .text-blue {
  479. color: #2196f3;
  480. }
  481. .text-green {
  482. color: #4caf50;
  483. }
  484. .text-gray {
  485. color: #999;
  486. }
  487. .service-row {
  488. display: flex;
  489. align-items: center;
  490. margin-bottom: 20rpx;
  491. gap: 12rpx;
  492. }
  493. .service-name {
  494. font-size: 30rpx;
  495. font-weight: bold;
  496. color: #333;
  497. }
  498. .service-tag {
  499. font-size: 20rpx;
  500. padding: 2rpx 8rpx;
  501. border-radius: 8rpx;
  502. border: 1rpx solid;
  503. }
  504. .tag-orange {
  505. color: #ff9800;
  506. border-color: #ff9800;
  507. background: #fff3e0;
  508. }
  509. .tag-blue {
  510. color: #2196f3;
  511. border-color: #2196f3;
  512. background: #e3f2fd;
  513. }
  514. .tag-green {
  515. color: #4caf50;
  516. border-color: #4caf50;
  517. background: #e8f5e9;
  518. }
  519. .pet-row {
  520. display: flex;
  521. align-items: center;
  522. margin-bottom: 20rpx;
  523. background: #f7f8fa;
  524. padding: 16rpx 20rpx;
  525. border-radius: 16rpx;
  526. }
  527. .pet-avatar-text {
  528. width: 64rpx;
  529. height: 64rpx;
  530. border-radius: 50%;
  531. background-color: #e3f2fd;
  532. color: #2196f3;
  533. display: flex;
  534. align-items: center;
  535. justify-content: center;
  536. font-weight: bold;
  537. font-size: 32rpx;
  538. margin-right: 20rpx;
  539. }
  540. .pet-desc {
  541. display: flex;
  542. align-items: baseline;
  543. gap: 12rpx;
  544. flex: 1;
  545. }
  546. .pet-desc .bold {
  547. font-size: 28rpx;
  548. font-weight: bold;
  549. color: #333;
  550. }
  551. .pet-desc .sub {
  552. font-size: 24rpx;
  553. color: #666;
  554. }
  555. .user-desc {
  556. font-size: 26rpx;
  557. color: #333;
  558. }
  559. .info-list {
  560. display: flex;
  561. flex-direction: column;
  562. gap: 12rpx;
  563. }
  564. .info-item {
  565. display: flex;
  566. align-items: center;
  567. font-size: 24rpx;
  568. color: #666;
  569. gap: 12rpx;
  570. }
  571. .order-foot {
  572. display: flex;
  573. justify-content: space-between;
  574. align-items: flex-end;
  575. margin-top: 24rpx;
  576. padding-top: 20rpx;
  577. border-top: 1rpx solid #f5f5f5;
  578. }
  579. .foot-left {
  580. display: flex;
  581. flex-direction: column;
  582. gap: 12rpx;
  583. }
  584. .create-time,
  585. .cancel-time {
  586. font-size: 22rpx;
  587. color: #999;
  588. }
  589. .assign-info {
  590. display: flex;
  591. align-items: center;
  592. font-size: 24rpx;
  593. gap: 12rpx;
  594. }
  595. .assign-label {
  596. color: #999;
  597. }
  598. .assign-none {
  599. color: #ccc;
  600. }
  601. .assign-name {
  602. color: #333;
  603. font-weight: bold;
  604. }
  605. .actions {
  606. display: flex;
  607. gap: 16rpx;
  608. }
  609. .action-btn {
  610. height: 56rpx;
  611. line-height: 56rpx;
  612. min-width: 120rpx;
  613. font-size: 24rpx;
  614. font-weight: 600;
  615. padding: 0 28rpx;
  616. border-radius: 28rpx;
  617. display: inline-flex;
  618. align-items: center;
  619. justify-content: center;
  620. }
  621. .btn-cancel {
  622. border: 1rpx solid #ddd;
  623. color: #666;
  624. background: transparent;
  625. }
  626. .btn-primary {
  627. background: linear-gradient(90deg, #ffd53f, #ff9500);
  628. border: none;
  629. color: #fff;
  630. box-shadow: 0 6rpx 16rpx rgba(255, 149, 0, 0.3);
  631. }
  632. .empty-state {
  633. text-align: center;
  634. padding: 100rpx 0;
  635. }
  636. .empty-text {
  637. font-size: 28rpx;
  638. color: #999;
  639. }
  640. .loading-state {
  641. text-align: center;
  642. padding: 100rpx 0;
  643. }
  644. .loading-text {
  645. font-size: 28rpx;
  646. color: #999;
  647. }
  648. /* 自定义弹窗样式 */
  649. .custom-modal {
  650. position: fixed;
  651. top: 0;
  652. left: 0;
  653. width: 100%;
  654. height: 100%;
  655. z-index: 999;
  656. display: flex;
  657. align-items: center;
  658. justify-content: center;
  659. }
  660. .modal-mask {
  661. position: absolute;
  662. top: 0;
  663. left: 0;
  664. width: 100%;
  665. height: 100%;
  666. background-color: rgba(0, 0, 0, 0.5);
  667. }
  668. .modal-content {
  669. position: relative;
  670. width: 80%;
  671. background-color: #fff;
  672. border-radius: 16rpx;
  673. overflow: hidden;
  674. z-index: 1000;
  675. }
  676. .modal-title {
  677. padding: 30rpx 0 20rpx;
  678. text-align: center;
  679. font-size: 32rpx;
  680. font-weight: bold;
  681. color: #333;
  682. }
  683. .modal-body {
  684. padding: 10rpx 40rpx 30rpx;
  685. }
  686. .cancel-input {
  687. width: 100%;
  688. height: 160rpx;
  689. background-color: #f8f8f8;
  690. border-radius: 8rpx;
  691. padding: 20rpx;
  692. font-size: 28rpx;
  693. box-sizing: border-box;
  694. color: #333;
  695. }
  696. .ph-color {
  697. color: #999;
  698. }
  699. .modal-footer {
  700. display: flex;
  701. border-top: 1rpx solid #eee;
  702. }
  703. .modal-btn {
  704. flex: 1;
  705. height: 90rpx;
  706. line-height: 90rpx;
  707. text-align: center;
  708. font-size: 30rpx;
  709. font-weight: 500;
  710. }
  711. .btn-cancel {
  712. color: #666;
  713. border-right: 1rpx solid #eee;
  714. }
  715. .btn-confirm {
  716. color: #2196f3;
  717. }
  718. </style>