feat: 增加尊享产品
This commit is contained in:
@@ -1,5 +1,28 @@
|
||||
import { get, post } from '@/utils/request.ts';
|
||||
|
||||
// 商品分类类型
|
||||
export enum GoodsCategoryType {
|
||||
Vip = 'Vip',
|
||||
PremiumPackage = 'PremiumPackage',
|
||||
}
|
||||
|
||||
// 商品信息接口
|
||||
export interface GoodsItem {
|
||||
goodsName: string; // 商品名称
|
||||
originalPrice: number; // 原价
|
||||
referencePrice: number; // 参考价格(月均价)
|
||||
goodsPrice: number; // 实际价格
|
||||
discountAmount: number | null; // 折扣金额
|
||||
goodsCategory: string; // 商品分类
|
||||
remark: string | null; // 备注(标签)
|
||||
discountDescription: string | null; // 折扣描述
|
||||
}
|
||||
|
||||
// 获取商品列表
|
||||
export function getGoodsList(categoryType: GoodsCategoryType) {
|
||||
return get<GoodsItem[]>(`/pay/GoodsList?GoodsCategoryType=${categoryType}`).json();
|
||||
}
|
||||
|
||||
// 创建订单并发起支付
|
||||
export function createOrder(params: any) {
|
||||
return post<any>(`/pay/Order`, params).json();
|
||||
|
||||
@@ -22,5 +22,5 @@ export function getWechatAuth(data: any) {
|
||||
|
||||
// 获取尊享服务Token包额度
|
||||
export function getPremiumTokenPackage() {
|
||||
return get<any>('/account/premium/token-package').json();
|
||||
return get<any>('/usage-statistics/premium-token-usage').json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user