master
王文杰 8 months ago
parent a8e536cd21
commit 6cdfc87b5d

@ -14,24 +14,25 @@ import { formatDate } from '@/utils/index'
//
const { safeAreaInsets } = uni.getSystemInfoSync()
const latitude = ref('0')
const longitude = ref('0')
let latitude = ref('')
let longitude = ref('')
// porps
const props = defineProps<{
statusId: String
}>()
const memberStore = useMemberStore()
const userInfo = memberStore.profile
const staffId = memberStore.profile?.id
//
const queryParams: Required<OrderListParams> = {
let queryParams = {
id: staffId,
pageNo: 1,
pageSize: 10,
id: userInfo?.id,
status: 'PENDING',
latitude: latitude.value,
longitude: longitude.value,
location: {
latitude: '31.163973',
longitude: '121.404032'
},
status: props.orderState,
}
@ -60,6 +61,18 @@ const getMemberOrderData = async (longitude, latitude) => {
//
isLoading.value = true
//
if (longitude) {
// longitude.value = longitude
// latitude.value = latitude
// const location = {
// longitude,
// latitude,
// }
// queryParams = {
// ...queryParams,
// location,
// }
}
const res = await getListOrderAPI(queryParams)
//
isLoading.value = false
@ -80,7 +93,6 @@ const getMemberOrderData = async (longitude, latitude) => {
onMounted(() => {
getSettingInfo()
// getMemberOrderData()
})
const handleTimeup = async (item: Object) => {
@ -120,8 +132,6 @@ const onRefresherrefresh = async () => {
const emit = defineEmits('orderAccept')
// -
const getSettingInfo = () => {
uni.getSetting({
@ -142,8 +152,6 @@ const getLocationInfo = () => {
// highAccuracyExpireTime: 5000,
success(res) {
console.log(res)
// longitude?.value = res.longitude
// latitude?.value = res.atitude
getMemberOrderData(res.longitude, res.latitude)
},
fail(err) {

@ -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()
})
//

@ -1,3 +1,11 @@
<!--
* @Author: 王文杰
* @Date: 2024-01-08 09:15:12
* @LastEditors: 王文杰
* @LastEditTime: 2024-03-07 09:33:49
* @FilePath: /app-nx-recycle/src/pages/orerdList/orerdList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import { ref } from 'vue'
import OrderItem from './components/OrderItem.vue'
@ -12,12 +20,12 @@ const query = defineProps<{
// tabs
const orderTabs = ref([
{ orderState: 0, title: '待接单', isRender: false },
{ orderState: 1, title: '进行中', isRender: false },
{ orderState: 'PENDING', title: '待接单', isRender: false },
{ orderState: 'RECYCLING', title: '回收中', isRender: false },
])
//
const activeIndex = ref(orderTabs.value.findIndex((v) => v.orderState === Number(query.type)))
const activeIndex = ref(orderTabs.value.findIndex((v) => v.orderState === 'PENDING'))
//
orderTabs.value[activeIndex.value].isRender = true

@ -132,7 +132,7 @@ export const getMemberOrderCancelByIdAPI = (id: string, data: { cancelReason: st
export const getMemberOrderAPI = (data: OrderListParams) => {
return http<OrderListResult>({
method: 'POST',
url: `/scm/RecycleOrder/getList`,
url: `recycle-order/page`,
data,
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@ -1,8 +1,8 @@
/*
* @Author:
* @Date: 2024-01-04 12:54:56
* @LastEditors:
* @LastEditTime: 2024-03-02 09:45:30
* @LastEditors:
* @LastEditTime: 2024-03-07 10:22:21
* @FilePath: /app-nx-recycle/src/utils/http.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -20,8 +20,8 @@
import { useMemberStore } from '@/stores'
const baseURL = 'http://192.168.0.166:8808/api'
// const baseURL = 'http://192.168.0.166:8808/api'
const baseURL = 'http://222.71.165.188:8808/api'
// 添加拦截器
const httpInterceptor = {
// 拦截前触发

Loading…
Cancel
Save