UNPKG

@tplc/business

Version:

60 lines (59 loc) 1.42 kB
// /api/productOrder/commitOrder export type CommitPageDetailParams = { orderIndexToken?: string userAddressId?: string pointFlag?: boolean useWalletPrice?: number pickupInfo?: { address: string longitude: string latitude: string title: string distance: number } orderType: string /** 下单使用的积分数量 */ point?: number /** 政府补贴 */ payType?: string govVoucherId?: string postageType?: number /** 选择支付的钱包ID */ walletAccountId?: string /** 平台优惠券 */ platformVoucherId?: string orderNo?: string /** 商家优惠券抵扣 */ merchantVoucherId?: string productId?: string toStoreFlag?: boolean remark?: string contactsPhone?: string contactsName?: string buyQuantity?: number toStoreTime?: string selectRemark?: string[] } /** 提交订单 */ export const commitOrder = async (info: CommitPageDetailParams) => { const data = await uni.$lcb.http.post<{ orderNo: string paymentParams: any wakePayment: boolean }>('/productOrder/commitOrder', { ...info, paymentPlatform: 'wechat', paymentType: 'JSAPI', }) return data } /** 查询订单支付状态 */ export const queryOrderPaymentStatus = async (orderNo: string) => { const { data } = await uni.$lcb.http.post<{ status: number }>( '/productOrder/queryOrderPaymentStatus', { orderNo, }, ) return data }