mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 13:09:20 +08:00
fix: 修复店铺订单列表请求参数问题
This commit is contained in:
@@ -498,6 +498,10 @@ const orderGridOptions: VxeGridProps<any> = {
|
|||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }) => {
|
query: async ({ page }) => {
|
||||||
|
// 如果没有店铺ID,直接返回空
|
||||||
|
if (!shopId.value) {
|
||||||
|
return { items: [], total: 0 };
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
orderLoading.value = true;
|
orderLoading.value = true;
|
||||||
const params: PageQueryDTO<OrderDTO.Filters> = {
|
const params: PageQueryDTO<OrderDTO.Filters> = {
|
||||||
@@ -507,8 +511,6 @@ const orderGridOptions: VxeGridProps<any> = {
|
|||||||
shopId: shopId.value,
|
shopId: shopId.value,
|
||||||
platformOrderNo: orderSearchForm.value.platformOrderNo || undefined,
|
platformOrderNo: orderSearchForm.value.platformOrderNo || undefined,
|
||||||
statusId: orderSearchForm.value.statusId,
|
statusId: orderSearchForm.value.statusId,
|
||||||
startOrderTime: dateRange.value[0].format('YYYY-MM-DD'),
|
|
||||||
endOrderTime: dateRange.value[1].format('YYYY-MM-DD'),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// 添加排序参数
|
// 添加排序参数
|
||||||
@@ -525,9 +527,9 @@ const orderGridOptions: VxeGridProps<any> = {
|
|||||||
items: data.records,
|
items: data.records,
|
||||||
total: data.total,
|
total: data.total,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
console.error('获取订单列表失败:', error);
|
console.error('获取订单列表失败:', error);
|
||||||
message.error('获取订单列表失败');
|
message.error('获取订单列表失败: ' + (error?.message || error?.response?.data?.message || '未知错误'));
|
||||||
return {
|
return {
|
||||||
items: [],
|
items: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user