1 line
3.4 KiB
Plaintext
1 line
3.4 KiB
Plaintext
{"version":3,"file":"take.js","sources":["../../../../../src/pages/order/take.vue","../../../../../uniPage:/cGFnZXMvb3JkZXIvdGFrZS52dWU"],"sourcesContent":["<route lang=\"json5\" type=\"page\">\r\n{\r\n layout: 'default',\r\n style: {\r\n navigationBarTitleText: '宠托师接单页面',\r\n },\r\n}\r\n</route>\r\n\r\n<template>\r\n <view class=\"main-page p-4\">\r\n <!-- 订单列表 -->\r\n <view v-for=\"order in orders\" :key=\"order.id\">\r\n <order-item\r\n :id=\"order.id\"\r\n :userId=\"order.userId\"\r\n :reservationTime=\"order.reservationTime\"\r\n :serviceHours=\"order.serviceHours\"\r\n :personalServiceId=\"order.personalServiceId\"\r\n :personalServiceUserId=\"order.personalServiceUserId\"\r\n :price=\"order.price\"\r\n :isPay=\"order.isPay\"\r\n :feedback=\"order.feedback\"\r\n :star=\"order.star\"\r\n :state=\"order.state\"\r\n :paymentMethod=\"order.paymentMethod\"\r\n :qrcode=\"order.qrcode\"\r\n :createTime=\"order.createTime\"\r\n :updateTime=\"order.updateTime\"\r\n :address=\"order.address\"\r\n :pet=\"order.pet\"\r\n :user=\"order.user\"\r\n :psUser=\"order.psUser\"\r\n :serviceInfo=\"order.serviceInfo\"\r\n :isTake=\"true\"\r\n @refresh=\"refresh\"\r\n />\r\n </view>\r\n\r\n <!-- 无订单提示 -->\r\n <view\r\n v-if=\"orders.length === 0\"\r\n class=\"flex flex-col items-center justify-center h-64 text-gray-400\"\r\n >\r\n <image\r\n src=\"https://via.placeholder.com/150/FFFFFF/000000?text=No+Orders\"\r\n class=\"w-32 h-32 mb-4\"\r\n ></image>\r\n <text>还没有相关的订单呢</text>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport { ref, onMounted } from 'vue'\r\nimport { httpPost } from '@/utils/http'\r\nimport OrderItem from './components/OrderItem.vue'\r\n\r\nconst orders = ref([])\r\n\r\nconst refresh = async () => {\r\n await fetchOrders()\r\n}\r\n\r\n// 获取宠托师的订单信息\r\nconst fetchOrders = async () => {\r\n try {\r\n const response = await httpPost('/order/ptOrdersInfo')\r\n if (response.code === 200) {\r\n orders.value = response.records\r\n } else {\r\n console.error('订单数据获取失败', response.message)\r\n }\r\n } catch (error) {\r\n console.error('订单数据获取失败', error)\r\n }\r\n}\r\n\r\n// 页面加载时获取订单数据\r\nonMounted(() => {\r\n fetchOrders()\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.main-page {\r\n @apply p-4;\r\n}\r\n\r\n.flex {\r\n @apply flex;\r\n}\r\n\r\n.text-gray-400 {\r\n @apply text-gray-400;\r\n}\r\n\r\n.h-64 {\r\n @apply h-64;\r\n}\r\n\r\n.w-32 {\r\n @apply w-32;\r\n}\r\n\r\n.mb-4 {\r\n @apply mb-4;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/pages/order/take.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","httpPost","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAA,YAAA,MAAA;;;;AAEA,UAAA,SAAAA,cAAA,IAAA,EAAA;AAEA,UAAA,UAAA,MAAA;AACA,YAAA,YAAA;AAAA,IACA;AAGA,UAAA,cAAA,MAAA;AACA,UAAA;AACA,cAAA,WAAA,MAAAC,WAAA,SAAA,qBAAA;AACA,YAAA,SAAA,SAAA,KAAA;AACA,iBAAA,QAAA,SAAA;AAAA,QACA,OAAA;AACA,kBAAA,MAAA,YAAA,SAAA,OAAA;AAAA,QACA;AAAA,MACA,SAAA,OAAA;AACA,gBAAA,MAAA,YAAA,KAAA;AAAA,MACA;AAAA,IACA;AAGAC,kBAAAA,UAAA,MAAA;AACA,kBAAA;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChFA,GAAG,WAAW,eAAe;"} |