From d4fb6828522cd1209d4a180f44124a352787f413 Mon Sep 17 00:00:00 2001 From: chashaobao Date: Sun, 7 Dec 2025 21:28:15 +0800 Subject: [PATCH] feat --- src/components/prejob-popup/index.tsx | 5 +++-- src/components/product-dialog/contact/index.tsx | 4 +++- .../product-dialog/steps-ui/job-buy.tsx | 17 ++++++++++------- src/pages/job-detail/index.tsx | 8 ++++++-- src/utils/common.ts | 10 ++++------ 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/components/prejob-popup/index.tsx b/src/components/prejob-popup/index.tsx index 6872ad5..befe23e 100644 --- a/src/components/prejob-popup/index.tsx +++ b/src/components/prejob-popup/index.tsx @@ -14,6 +14,7 @@ import './index.less'; interface IProps { onCancel: () => void; + isCreateResume?: boolean; onConfirm: (type: GET_CONTACT_TYPE) => void; } @@ -43,7 +44,7 @@ const GET_CONTACT_TYPE_OPTIONS = [ }, ]; -export function PrejobPopup({ onCancel, onConfirm }: IProps) { +export function PrejobPopup({ onCancel, isCreateResume, onConfirm }: IProps) { const [openPopup, setOpenPopup] = useState(true); const [openDialog, setOpenDialog] = useState(false); const [clicked, setClicked] = useState(!!Taro.getStorageSync(CacheKey.JOIN_GROUP_POPUP_CLICKED)); @@ -99,7 +100,7 @@ export function PrejobPopup({ onCancel, onConfirm }: IProps) { - + diff --git a/src/components/product-dialog/contact/index.tsx b/src/components/product-dialog/contact/index.tsx index edfc3fe..2519ff2 100644 --- a/src/components/product-dialog/contact/index.tsx +++ b/src/components/product-dialog/contact/index.tsx @@ -45,9 +45,11 @@ function ProductContactDialog(props: Omit) { initRef.current = async () => { const handleContact = (declarationTypeResult?: ProductInfo['declarationTypeResult']) => { if (declarationTypeResult?.type === DeclarationType.Direct && declarationTypeResult.publisherAcctNo) { + console.log('set JOB_CONTACT_DIRECT', declarationTypeResult.publisherAcctNo) setStatus(DialogStatus.JOB_CONTACT_DIRECT); setPublisherAcctNo(declarationTypeResult.publisherAcctNo); } else { + console.log('set JOB_CONTACT_CS') setStatus(DialogStatus.JOB_CONTACT_CS); } }; @@ -67,8 +69,8 @@ function ProductContactDialog(props: Omit) { return; } const productInfo = await requestUseProduct(PRODUCT_CODE, { jobId: data.id }); - console.log('开始报单', productInfo); Taro.eventCenter.trigger(EventName.READ_CONTACT); + console.log('开始报单', productInfo); handleContact(productInfo ? productInfo.declarationTypeResult : undefined); } catch (e) { Toast.error('出错了,请重试'); diff --git a/src/components/product-dialog/steps-ui/job-buy.tsx b/src/components/product-dialog/steps-ui/job-buy.tsx index bb0bcdb..47fe36d 100644 --- a/src/components/product-dialog/steps-ui/job-buy.tsx +++ b/src/components/product-dialog/steps-ui/job-buy.tsx @@ -26,6 +26,7 @@ import Toast from '@/utils/toast'; interface IProps { onConfirm: () => void; + isCreateResume?: boolean; } // interface Item { @@ -74,7 +75,7 @@ const subscribe = async () => { }; export default function JobBuy(props: IProps) { - const { onConfirm } = props; + const { onConfirm, isCreateResume } = props; const [productList, setProductList] = useState([]); const [selectItem, setSelectItem] = useState(); @@ -139,13 +140,15 @@ export default function JobBuy(props: IProps) {
免费查看次数已用完
请升级会员
-
-
完善模卡
-
赠10次查看
-
- 去完善 + {!isCreateResume && ( +
+
完善模卡
+
赠5次查看
+
+ 去完善 +
-
+ )}
{productList.map(item => { return ( diff --git a/src/pages/job-detail/index.tsx b/src/pages/job-detail/index.tsx index b2a641e..d019f94 100644 --- a/src/pages/job-detail/index.tsx +++ b/src/pages/job-detail/index.tsx @@ -237,12 +237,16 @@ const AnchorFooter = (props: { data: JobDetails }) => { /> )} {showMaterialGuide && ( - setShowMaterialGuide(false)} onConfirm={handleConfirmPrejob} /> + setShowMaterialGuide(false)} + onConfirm={handleConfirmPrejob} + /> )} {showBuyDialog && ( - + )} diff --git a/src/utils/common.ts b/src/utils/common.ts index f6e881c..cffa537 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -15,12 +15,10 @@ export const isDesktop = (() => { return info.platform === 'windows' || info.platform === 'mac'; })(); -export const logWithPrefix = isDev() - ? (prefix: string) => - (...args: BL.Anything[]) => - console.log(`[${prefix}]`, ...args) - : (_prefix: string) => - (..._args: BL.Anything[]) => {}; +export const logWithPrefix = + (prefix: string) => + (...args: BL.Anything[]) => + console.log(`[${prefix}]`, ...args); export const safeJsonParse = (str: string, defaultValue: BL.Anything = {}): T => { try {