diff --git a/src/api/order.ts b/src/api/order.ts index 92a0898..b9f1cb6 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -23,6 +23,7 @@ export function getTeaSpecialistOrderList(data: ITeaSpecialistOrderListParams) { export interface ITeaSpecialistOrderDetailsParams { id: number } + export function getTeaSpecialistOrderDetails(data: ITeaSpecialistOrderDetailsParams) { return http.Post('/api/order/orderDetails', data @@ -35,8 +36,49 @@ export function getTeaSpecialistOrderDetails(data: ITeaSpecialistOrderDetailsPar export interface ICancelTeaSpecialistOrderParams { id: number } + export function cancelTeaSpecialistOrder(data: ICancelTeaSpecialistOrderParams) { return http.Post('/api/order/cancelOrder', data ) +} + +/** + * 删除订单 + */ +export interface IDeleteTeaSpecialistOrderParams { + id: number +} + +export function deleteTeaSpecialistOrder(data: IDeleteTeaSpecialistOrderParams) { + return http.Post('/api/order/delOrder', + data + ) +} + +/** + * 确认(完成)订单 + */ +export interface IConfirmTeaSpecialistOrderParams { + id: number +} + +export function confirmTeaSpecialistOrder(data: IConfirmTeaSpecialistOrderParams) { + return http.Post('/api/order/userConfirmOrder', + data + ) +} + +/** + * 订单退款 + */ +export interface IRefundTeaSpecialistOrderParams { + id: number + order_type: string +} + +export function refundTeaSpecialistOrder(data: IRefundTeaSpecialistOrderParams) { + return http.Post('/api/pay/refund', + data + ) } \ No newline at end of file diff --git a/src/api/user.ts b/src/api/user.ts index 4b6b0e1..a07f221 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -1,5 +1,6 @@ import { http } from '@/http/alova' import type { IUserAddressListResult, IUserAddressDetailsResult, IUserCouponListResult } from '@/api/types/user' +import type { IOrderListResult } from '@/api/types/order' /** @@ -76,7 +77,7 @@ export function userAddressDetails(data: IUserAddressDetailsParams) { } /** - * 优惠券列表 + * 优惠券列表(从订单页获取) */ export interface IGetCouponsParams { id: number @@ -85,4 +86,46 @@ export interface IGetCouponsParams { export function getCoupons(data: IGetCouponsParams) { return http.Post('/api/UserCoupon/UserCoupinList', data) +} + +/** + * 优惠券列表(从个人中心点击进去) + */ +export interface IGetMyCouponsParams { + status: number +} +export function getMyCoupons(data: IGetMyCouponsParams) { + return http.Post('/api/UserCoupon/orderCoupinList', data) +} + +/** + * 个人中心优惠券 + */ +export function getMyCoupon() { + return http.Post('/api/UserCoupon/coupinList') +} + +/** + * 领取个人中心优惠券 + */ +export interface IClaimMyCouponParams { + id: number +} + +export function claimMyCoupon(data: IClaimMyCouponParams) { + return http.Post('/api/UserCoupon/receiveCoupon', data) +} + + +/** + * 金额使用记录 + */ +export interface IGetUserMoneyLogParams { + page: number + size: number + month: string +} + +export function getUserMoneyLog(data: IGetUserMoneyLogParams) { + return http.Post('/api/user/moneyLogList', data) } \ No newline at end of file diff --git a/src/bundle/coupon/my-coupon.vue b/src/bundle/coupon/my-coupon.vue index f9cbf8c..d400672 100644 --- a/src/bundle/coupon/my-coupon.vue +++ b/src/bundle/coupon/my-coupon.vue @@ -11,59 +11,34 @@