更新:更换获取我的订单数据接口
This commit is contained in:
@@ -11,6 +11,9 @@ import type {
|
|||||||
IPageData
|
IPageData
|
||||||
} from '@/types/user'
|
} from '@/types/user'
|
||||||
import { SERVICE_MAP } from '@/api/config'
|
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) {
|
export async function getOrderList(current: number, limit: number, orderStatus: string) {
|
||||||
const res = await mainClient.request<IApiResponse<{ orders: IPageData<IOrder> }>>({
|
const res = await mainClient.request<IApiResponse<{ orders: IPageData<IOrder> }>>({
|
||||||
url: 'bookAbroad/home/getAbroadOrderList',
|
url: 'common/buyOrder/commonBuyOrderList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { current, limit, orderStatus }
|
data: { current, limit, orderStatus, come: '10', userId: userStore.id }
|
||||||
})
|
})
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
class="payment-icon"
|
class="payment-icon"
|
||||||
/>
|
/>
|
||||||
<text class="price">{{ order.orderMoney }}</text>
|
<text class="price">{{ order.orderMoney }}</text>
|
||||||
<text v-if="order.paymentMethod === '5'" class="currency">NZD</text>
|
<text class="currency">NZD</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="order-sn">
|
<text class="order-sn">
|
||||||
@@ -90,7 +90,7 @@ const getData = async (page: number, pageSize: number) => {
|
|||||||
try {
|
try {
|
||||||
// 添加订单状态参数
|
// 添加订单状态参数
|
||||||
const res = await getOrderList(page, pageSize, orderStatus.value)
|
const res = await getOrderList(page, pageSize, orderStatus.value)
|
||||||
paging.value.complete(res.orders.records)
|
paging.value.complete(res.data.records)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
paging.value.complete(false)
|
paging.value.complete(false)
|
||||||
console.error('获取订单列表失败:', error)
|
console.error('获取订单列表失败:', error)
|
||||||
|
|||||||
Reference in New Issue
Block a user