acdr-ui/dist/dev/mp-weixin/pages/order/index.js.map

1 line
4.7 KiB
Plaintext

{"version":3,"file":"index.js","sources":["../../../../../src/pages/order/index.vue","../../../../../uniPage:/cGFnZXMvb3JkZXIvaW5kZXgudnVl"],"sourcesContent":["<route lang=\"json5\" type=\"page\">\n{\n layout: 'default',\n style: {\n navigationBarTitleText: '服务订单',\n navigationBarBackgroundColor: '#ffff',\n },\n}\n</route>\n<template>\n <view class=\"main-page\">\n <!-- Tab 切换 -->\n <view class=\"flex justify-between text-xs items-center pb-2 mb-4 bg-[#ffff]\">\n <view\n v-for=\"tab in tabs\"\n :key=\"tab\"\n :class=\"[\n 'tab',\n {\n 'text-yellow-500': activeTab === tab,\n },\n ]\"\n @click=\"changeTab(tab)\"\n >\n {{ tab }}\n <view v-if=\"activeTab === tab\" class=\"active-underline\"></view>\n </view>\n </view>\n\n <view class=\"h-0.5 w-11/12 bg-gray-100 my-4 mx-auto\"></view>\n\n <!-- 订单列表 -->\n <view class=\"p-5\">\n <view v-for=\"order in orders\" :key=\"order.id\">\n <order-item\n @click=\"fetchOrders\"\n :key=\"order.id\"\n :id=\"order.id\"\n :userId=\"order.userId\"\n :reservationTime=\"order.reservationTime\"\n :serviceHours=\"order.serviceHours\"\n :personalServiceId=\"order.personalServiceId\"\n :personalServiceUserId=\"order.personalServiceUserId\"\n :price=\"order.price\"\n :isPay=\"order.isPay\"\n :feedback=\"order.feedback\"\n :star=\"order.star\"\n :state=\"order.state\"\n :paymentMethod=\"order.paymentMethod\"\n :qrcode=\"order.qrcode\"\n :createTime=\"order.createTime\"\n :updateTime=\"order.updateTime\"\n :address=\"order.address\"\n :pet=\"order.pet\"\n :user=\"order.user\"\n :psUser=\"order.psUser\"\n :serviceInfo=\"order.serviceInfo\"\n />\n </view>\n </view>\n\n <!-- 无订单提示 -->\n <view\n v-if=\"orders.length === 0\"\n class=\"flex flex-col items-center justify-center h-64 text-gray-400\"\n >\n <EmptyState></EmptyState>\n </view>\n </view>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport OrderItem from './components/OrderItem.vue'\nimport { httpPost } from '@/utils/http'\nimport EmptyState from '@/components/EmptyState.vue'\n\nconst OrderStateMap = {\n 待付款: '待支付',\n 待接单: '已支付',\n 已预约: '已接单',\n 待评价: '已完成',\n}\nconst activeTab = ref('全部')\nconst tabs = ['全部', '待付款', '待接单', '已预约', '待评价']\n\nconst orders = ref([])\n\n// 获取订单数据\nconst fetchOrders = async () => {\n try {\n const response = await httpPost(\n '/order/query',\n {\n current: 1,\n size: 1000,\n },\n {\n state: OrderStateMap[activeTab.value] || null,\n },\n )\n if (response.code === 200 || response.code === 204) {\n orders.value = response.records\n } else {\n console.error('订单数据获取失败', response.message)\n }\n } catch (error) {\n console.error('订单数据获取失败', error)\n }\n}\n\n// 切换 Tab 时刷新显示内容\nconst changeTab = async (tab) => {\n activeTab.value = tab\n await fetchOrders()\n}\n\n// 页面加载时获取订单数据\nonLoad(async () => {\n await fetchOrders()\n})\n</script>\n\n<style scoped>\npage {\n background-color: #f3f4f6;\n}\n.main-page {\n background-color: #f3f4f6;\n}\n.tab {\n @apply px-4 py-2 text-gray-700 cursor-pointer;\n position: relative;\n}\n.tab.text-yellow-500 {\n @apply text-yellow-500;\n}\n.active-underline {\n @apply w-6 h-1 bg-yellow-400 mt-1 absolute bottom-0 left-1/2 transform -translate-x-1/2;\n}\n</style>\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/pages/order/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","httpPost","onLoad"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQQ,MAAA,YAAA,MAAA;AAAA,MAAA,aAAA,MAAA;;;;AAAA,UAAA,gBAAA;AAAA,MAAA,KAAA;AAAA,MAAA,KAAA;AAAA,MAAA,KAAA;AAAA,MAAA,KAAA;AAAA,IAAA;AAAA,UAAA,YAAAA,cAAA,IAAA,IAAA;AAAA,UAAA,OAAA,CAAA,MAAA,OAAA,OAAA,OAAA,KAAA;AAAA,UAAA,SAAAA,cAAA,IAAA,EAAA;AAAA,UAAA,cAAA,MAAA;AAAA,UAAA;AAAA,cAAA,WAAA,MAAAC,WAAA;AAAA,UAAA;AAAA,UAAA;AAAA,YAAA,SAAA;AAAA,YAAA,MAAA;AAAA,UAAA;AAAA,UAAA;AAAA,YAAA,OAAA,cAAA,UAAA,KAAA,KAAA;AAAA,UAAA;AAAA,QAAA;AAAA,YAAA,SAAA,SAAA,OAAA,SAAA,SAAA,KAAA;AAAA,iBAAA,QAAA,SAAA;AAAA,QAAA,OAAA;AAAA,kBAAA,MAAA,YAAA,SAAA,OAAA;AAAA,QAAA;AAAA,MAAA,SAAA,OAAA;AAAA,gBAAA,MAAA,YAAA,KAAA;AAAA,MAAA;AAAA,IAAA;AAAA,UAAA,YAAA,CAAA,QAAA;AAAA,gBAAA,QAAA;AAAA,YAAA,YAAA;AAAA,IAAA;AAAAC,kBAAAA,OAAA,MAAA;AAAA,YAAA,YAAA;AAAA,IAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPR,GAAG,WAAW,eAAe;"}