|
|
|
@ -8,60 +8,32 @@ import { getPayMockAPI, getPayWxPayMiniPayAPI } from '@/services/pay'
|
|
|
|
|
import type { OrderItem } from '@/types/order'
|
|
|
|
|
import type { OrderListParams } from '@/types/order'
|
|
|
|
|
import { onMounted, ref, defineEmits } from 'vue'
|
|
|
|
|
import { useMemberStore } from '@/stores'
|
|
|
|
|
|
|
|
|
|
// 获取屏幕边界到安全区域距离
|
|
|
|
|
const { safeAreaInsets } = uni.getSystemInfoSync()
|
|
|
|
|
|
|
|
|
|
// 定义 porps
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
orderState: number
|
|
|
|
|
orderState: string
|
|
|
|
|
}>()
|
|
|
|
|
const memberStore = useMemberStore()
|
|
|
|
|
const staffId = memberStore.profile?.id
|
|
|
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
|
const queryParams: Required<OrderListParams> = {
|
|
|
|
|
page: 1,
|
|
|
|
|
pageSize: 5,
|
|
|
|
|
orderState: props.orderState,
|
|
|
|
|
const queryParams = {
|
|
|
|
|
id: staffId,
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
location: {
|
|
|
|
|
latitude: 31.163973,
|
|
|
|
|
longitude: 121.404032
|
|
|
|
|
},
|
|
|
|
|
status: props.orderState,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取订单列表
|
|
|
|
|
// const orderList = ref<OrderItem[]>([])
|
|
|
|
|
const orderList = [
|
|
|
|
|
{
|
|
|
|
|
id: '1747900788929204226',
|
|
|
|
|
createTime: '剩余接单时间',
|
|
|
|
|
locationNum: '0.4km',
|
|
|
|
|
loction: '上海市松江区新松江路92弄开元地中海园区',
|
|
|
|
|
people: '曾先生 18526235487',
|
|
|
|
|
payType: 1,
|
|
|
|
|
orderState: 2,
|
|
|
|
|
time: '2024-01-18 17:06:37',
|
|
|
|
|
time2: '17:01:01',
|
|
|
|
|
postFee: 8.0,
|
|
|
|
|
payMoney: 982.0,
|
|
|
|
|
totalMoney: 974.0,
|
|
|
|
|
totalNum: 13,
|
|
|
|
|
payChannel: 2,
|
|
|
|
|
countdown: 1579,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
locationNum: '0.4km',
|
|
|
|
|
loction: '上海市松江区新松江路92弄开元地中海园区',
|
|
|
|
|
id: '1747899379064246273',
|
|
|
|
|
people: '曾先生 18526235487',
|
|
|
|
|
createTime: '剩余接单时间',
|
|
|
|
|
payType: 1,
|
|
|
|
|
orderState: 1,
|
|
|
|
|
time: '2024-01-18 17:01:01',
|
|
|
|
|
time2: '17:01:01',
|
|
|
|
|
postFee: 1.0,
|
|
|
|
|
payMoney: 70.0,
|
|
|
|
|
totalMoney: 69.0,
|
|
|
|
|
totalNum: 1,
|
|
|
|
|
payChannel: 2,
|
|
|
|
|
countdown: 1243,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const orderList = ref<any[]>([])
|
|
|
|
|
|
|
|
|
|
// 是否加载中标记,用于防止滚动触底触发多次请求
|
|
|
|
|
const isLoading = ref(false)
|
|
|
|
@ -93,14 +65,7 @@ const getMemberOrderData = async () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// getMemberOrderData()
|
|
|
|
|
// const arr: object[] = [
|
|
|
|
|
// {
|
|
|
|
|
// id: 1,
|
|
|
|
|
// name: '233'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// orderList.value.push(...arr)
|
|
|
|
|
getMemberOrderData()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 订单支付
|
|
|
|
|