feat:
This commit is contained in:
@ -41,6 +41,8 @@ export enum API {
|
||||
PRODUCT_USE_RECORD = '/product/getProductUseRecord', // 查询某个产品是否已经解锁
|
||||
USE_PRODUCT = '/product/use', // 使用某个产品扣费/次数
|
||||
ALLOW_BUY_PRODUCT = '/product/allowBuyProduct', // 是否可以购买某个产品
|
||||
LIST_PRODUCT_TYPE = '/product/listByType/{productType}',
|
||||
|
||||
CS_QR_CODE = '/customerService/get', // 客服微信二维码
|
||||
CREATE_PAY_ORDER = '/payOrder/create', // 创建支付订单
|
||||
GET_PAY_ORDER = '/payOrder/get', // 订单查询
|
||||
|
||||
@ -153,7 +153,7 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
||||
分享
|
||||
</Button>
|
||||
<LoginButton className={`${PREFIX}__contact-publisher`} onClick={handleClickContact}>
|
||||
{data.isAuthed ? '在线沟通' : '立即联系'}
|
||||
{data.isAuthed ? '急招岗位可免费查看' : '查看联系方式'}
|
||||
</LoginButton>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -107,3 +107,20 @@ export interface GetOrderInfoRequest {
|
||||
payOrderNo: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface ProductSpecResult {
|
||||
productId: string;
|
||||
productSpecId: string;
|
||||
productType: ProductType;
|
||||
productName: string;
|
||||
title: string;
|
||||
priceText: string;
|
||||
payPrice: number; // 分
|
||||
showPrice: number;
|
||||
originalPrice: number;
|
||||
badge: string;
|
||||
contentSingle: string;
|
||||
contentsJson: string;
|
||||
sort: number;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
@ -14,8 +14,9 @@ import {
|
||||
CreatePayInfoResponse,
|
||||
CreatePayOrderParams,
|
||||
GetOrderInfoRequest,
|
||||
OrderInfo,
|
||||
OrderInfo, ProductSpecResult,
|
||||
} from '@/types/product';
|
||||
import { buildUrl } from '@/utils/common';
|
||||
import { getUserId } from '@/utils/user';
|
||||
|
||||
export const isCancelPay = err => err?.errMsg === 'requestPayment:fail cancel';
|
||||
@ -44,6 +45,10 @@ export async function requestProductUseRecord(
|
||||
});
|
||||
}
|
||||
|
||||
export async function requestProductTypeList(productType: ProductType) {
|
||||
return await http.get<ProductSpecResult[]>(buildUrl(API.LIST_PRODUCT_TYPE, { productType }));
|
||||
}
|
||||
|
||||
// 使用某一个产品
|
||||
export async function requestUseProduct(
|
||||
productCode: ProductType,
|
||||
|
||||
Reference in New Issue
Block a user