diff --git a/src/http/api.ts b/src/http/api.ts
index d733e38..7d8f2e1 100644
--- a/src/http/api.ts
+++ b/src/http/api.ts
@@ -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', // 订单查询
diff --git a/src/pages/job-detail/index.tsx b/src/pages/job-detail/index.tsx
index 35d61a0..8114e77 100644
--- a/src/pages/job-detail/index.tsx
+++ b/src/pages/job-detail/index.tsx
@@ -153,7 +153,7 @@ const AnchorFooter = (props: { data: JobDetails }) => {
分享
- {data.isAuthed ? '在线沟通' : '立即联系'}
+ {data.isAuthed ? '急招岗位可免费查看' : '查看联系方式'}
diff --git a/src/types/product.ts b/src/types/product.ts
index 239a452..90ae46d 100644
--- a/src/types/product.ts
+++ b/src/types/product.ts
@@ -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;
+}
diff --git a/src/utils/product.ts b/src/utils/product.ts
index c473758..6c715a9 100644
--- a/src/utils/product.ts
+++ b/src/utils/product.ts
@@ -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
(buildUrl(API.LIST_PRODUCT_TYPE, { productType }));
+}
+
// 使用某一个产品
export async function requestUseProduct(
productCode: ProductType,