更新:增加订单详情功能
This commit is contained in:
@@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development';
|
||||
*/
|
||||
const BASE_URL_MAP = {
|
||||
development: {
|
||||
// MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
MAIN: 'http://192.168.110.100:9300/pb/', // 张川川
|
||||
// MAIN: 'https://global.nuttyreading.com/', // 线上
|
||||
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
|
||||
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
|
||||
},
|
||||
|
||||
@@ -9,7 +9,8 @@ import type {
|
||||
ICoupon,
|
||||
ICourseOrderCreateParams,
|
||||
IOrderInitData,
|
||||
IGoodsDiscountParams
|
||||
IGoodsDiscountParams,
|
||||
IOrderDetail
|
||||
} from '@/types/order'
|
||||
import type { IUserInfo } from '@/types/user'
|
||||
|
||||
@@ -30,19 +31,6 @@ export const orderApi = {
|
||||
return res
|
||||
},
|
||||
|
||||
/**
|
||||
* 验证 Google Pay 支付
|
||||
* @param params 支付验证参数
|
||||
*/
|
||||
async verifyGooglePay(params: IGooglePayVerifyParams) {
|
||||
const res = await mainClient.request<IApiResponse>({
|
||||
url: 'pay/googlepay/googleVerify',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户信息(包含虚拟币余额)
|
||||
*/
|
||||
@@ -106,7 +94,7 @@ export const orderApi = {
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取地区优惠金额
|
||||
* 获取活动优惠金额
|
||||
* @param productList 商品列表
|
||||
*/
|
||||
async getDistrictAmount(productList: IGoodsDiscountParams[]) {
|
||||
@@ -155,5 +143,18 @@ export const orderApi = {
|
||||
data
|
||||
})
|
||||
return res
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
* @param orderId 订单ID
|
||||
*/
|
||||
async getOrderDetail(orderId: string) {
|
||||
const res = await mainClient.request<IApiResponse<{ buyOrder: IOrderDetail, productInfo: IOrderGoods[] }>>({
|
||||
url: 'common/buyOrder/commonOrderDetail',
|
||||
method: 'POST',
|
||||
data: { orderId }
|
||||
})
|
||||
return res
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user