1 line
9.3 KiB
Plaintext
1 line
9.3 KiB
Plaintext
|
{"version":3,"file":"OrderItem.js","sources":["../../../../../../src/pages/order/components/OrderItem.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9wYWdlcy9vcmRlci9jb21wb25lbnRzL09yZGVySXRlbS52dWU"],"sourcesContent":["<template>\n <view class=\"order-item p-4 mb-4 bg-white shadow rounded-lg\">\n <!-- 订单头部,包含标题和状态 -->\n <view class=\"order-header flex justify-between items-center mb-2\">\n <text v-if=\"serviceInfo && serviceInfo.serviceName\" class=\"order-title font-bold text-lg\">\n {{ serviceInfo.serviceName }}\n </text>\n <text class=\"order-status text-sm text-gray-500\">{{ state }}</text>\n </view>\n\n <!-- 服务信息 -->\n <view class=\"order-info text-sm text-gray-700 mb-4\">\n <view>\n <text>服务类型:</text>\n <text v-if=\"serviceInfo && serviceInfo.type\">{{ serviceInfo.type }}</text>\n </view>\n <view>\n <text>服务地址:</text>\n <text v-if=\"serviceInfo && serviceInfo.address\">{{ serviceInfo.address }}</text>\n </view>\n <view>\n <text>预约时间:</text>\n {{ reservationTime }}\n </view>\n <view>\n <text>服务时长:</text>\n {{ serviceHours }} 小时\n </view>\n </view>\n\n <!-- 宠物信息 -->\n <view class=\"pet-info flex items-center mb-4\">\n <image\n :src=\"imgUrl(pet.profileUrl)\"\n mode=\"aspectFill\"\n class=\"w-16 h-16 rounded-full mr-4\"\n ></image>\n <view>\n <view>\n <text>宠物名称:</text>\n {{ pet.name }}\n </view>\n <view>\n <text>宠物品种:</text>\n {{ pet.breed }}\n </view>\n </view>\n </view>\n\n <!-- 用户信息 -->\n <view class=\"user-info text-sm text-gray-700 mb-4\">\n <view>\n <text>下单用户:</text>\n {{ user.nickname }} ({{ user.phone }})\n </view>\n <view v-if=\"address\">\n <text>用户地址:</text>\n {{ address.province }} {{ address.city }} {{ address.district }}\n {{ address.detailAddress }}\n </view>\n </view>\n\n <!-- 支付信息 -->\n <view class=\"payment-info text-sm text-gray-700 mb-4\">\n <view>\n <text>支付方式:</text>\n {{ paymentMethod }}\n </view>\n <view>\n <text>支付状态:</text>\n {{ isPay ? '已支付' : '未支付' }}\n </view>\n <view>\n <text>总价:</text>\n ¥{{ price }}\n </view>\n </view>\n\n <!-- 操作按钮 -->\n <view class=\"flex justify-between items-center\">\n <text class=\"text-lg text-red-500\">¥{{ price }} 共{{ serviceHours }}小时</text>\n <view class=\"flex\">\n <button v-if=\"!isTake\" class=\"btn\" @click=\"toOrderDetail\">查看详情</button>\n <button v-if=\"!isTake\" class=\"btn ml-2\" @click=\"cancel\">取消订单</button>\n <button v-if=\"!isTake\" class=\"btn-primary ml-2\" @click=\"orderPay\">支付</button>\n <button v-if=\"isTake\" @click=\"bookingCancel\">取消订单</button>\n <button v-if=\"isTake\" @click=\"confirm\">确认订单</button>\n <button\n v-if=\"state && state.includes('已预约') && user.userInfo.isPetNursery\"\n @click=\"scan\"\n >\n 扫描二维码\n </button>\n </view>\n </view>\n </view>\n</template>\n\n<script setup>\nimport { payOrder } from '@/logic/pay'\nimport { imgUrl, scanCodeAsync, showModalAsync, toast } from '@/utils/commUtils'\nimport { httpPost } from '@/utils/http'\nimport { defineProps } from 'vue'\n\nconst props = defineProps({\n id: String,\n userId: String,\n reservationTime: String,\n serviceHours: String,\n personalServiceId: String,\n personalServiceUserId: String,\n price: Number,\n isPay: Boolean,\n feedback: String,\n star: Number,\n state: String,\n paymentMethod: String,\n qrcode: String,\n createTime: String,\n updateTime: String,\n address: Object,\n pet: Object,\n user: Object,\n
|