更新:更换获取我的订单数据接口

This commit is contained in:
2025-11-20 13:23:36 +08:00
parent b15acbb984
commit e7fb2c61c1
2 changed files with 7 additions and 4 deletions

View File

@@ -11,6 +11,9 @@ import type {
IPageData
} from '@/types/user'
import { SERVICE_MAP } from '@/api/config'
import { useUserStore } from '@/stores/user'
const userStore = useUserStore()
/**
* 获取用户信息
@@ -41,9 +44,9 @@ export async function getVipInfo() {
*/
export async function getOrderList(current: number, limit: number, orderStatus: string) {
const res = await mainClient.request<IApiResponse<{ orders: IPageData<IOrder> }>>({
url: 'bookAbroad/home/getAbroadOrderList',
url: 'common/buyOrder/commonBuyOrderList',
method: 'POST',
data: { current, limit, orderStatus }
data: { current, limit, orderStatus, come: '10', userId: userStore.id }
})
return res
}

View File

@@ -29,7 +29,7 @@
class="payment-icon"
/>
<text class="price">{{ order.orderMoney }}</text>
<text v-if="order.paymentMethod === '5'" class="currency">NZD</text>
<text class="currency">NZD</text>
</view>
</view>
<text class="order-sn">
@@ -90,7 +90,7 @@ const getData = async (page: number, pageSize: number) => {
try {
// 添加订单状态参数
const res = await getOrderList(page, pageSize, orderStatus.value)
paging.value.complete(res.orders.records)
paging.value.complete(res.data.records)
} catch (error) {
paging.value.complete(false)
console.error('获取订单列表失败:', error)