Compare commits
12 Commits
a1d2f29b9d
...
feat/vip_m
| Author | SHA1 | Date | |
|---|---|---|---|
| f6cec5dd43 | |||
| ec96058d5d | |||
| 4d3c57e88b | |||
| c696e93bc5 | |||
| e5facdff6a | |||
| 6c1e1cfd2d | |||
| d4fb682852 | |||
| 587436058a | |||
| 4ed1d45873 | |||
| 6b084b2df2 | |||
| 288521ebd9 | |||
| a07b015d8e |
@ -6,7 +6,7 @@ import { useCallback, useState } from 'react';
|
|||||||
import { AgreementPopup } from '@/components/agreement-popup';
|
import { AgreementPopup } from '@/components/agreement-popup';
|
||||||
import LoginDialog from '@/components/login-dialog';
|
import LoginDialog from '@/components/login-dialog';
|
||||||
import useUserInfo from '@/hooks/use-user-info';
|
import useUserInfo from '@/hooks/use-user-info';
|
||||||
import { getAgreementSigned, isNeedLogin, setAgreementSigned } from '@/utils/user';
|
import { getAgreementSigned, isNeedLogin, requestUserInfo, setAgreementSigned } from '@/utils/user';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
@ -18,13 +18,15 @@ export enum BindPhoneStatus {
|
|||||||
|
|
||||||
export interface ILoginButtonProps extends ButtonProps {
|
export interface ILoginButtonProps extends ButtonProps {
|
||||||
needPhone?: boolean;
|
needPhone?: boolean;
|
||||||
|
needRefresh?: boolean;
|
||||||
|
onRefresh?: (() => void) | (() => Promise<void>);
|
||||||
needAssignment?: boolean;
|
needAssignment?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PREFIX = 'login-button';
|
const PREFIX = 'login-button';
|
||||||
|
|
||||||
function LoginButton(props: ILoginButtonProps) {
|
function LoginButton(props: ILoginButtonProps) {
|
||||||
const { className, children, needPhone, onClick, ...otherProps } = props;
|
const { className, children, needPhone, onRefresh, onClick, needRefresh, ...otherProps } = props;
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
const [loginVisible, setLoginVisible] = useState(false);
|
const [loginVisible, setLoginVisible] = useState(false);
|
||||||
const [assignVisible, setAssignVisible] = useState(false);
|
const [assignVisible, setAssignVisible] = useState(false);
|
||||||
@ -68,11 +70,15 @@ function LoginButton(props: ILoginButtonProps) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleLoginSuccess = useCallback(
|
const handleLoginSuccess = useCallback(
|
||||||
e => {
|
async e => {
|
||||||
setLoginVisible(false);
|
setLoginVisible(false);
|
||||||
|
if (needRefresh) {
|
||||||
|
requestUserInfo();
|
||||||
|
onRefresh && (await onRefresh());
|
||||||
|
}
|
||||||
onClick?.(e);
|
onClick?.(e);
|
||||||
},
|
},
|
||||||
[onClick]
|
[needRefresh, onClick]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
import { Button, Image } from '@tarojs/components';
|
import { Button, Image } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
|
||||||
import { Popup, Dialog } from '@taroify/core';
|
import { Dialog, Popup } from '@taroify/core';
|
||||||
import { Fragment, useCallback, useState } from 'react';
|
import { Fragment, useCallback, useState } from 'react';
|
||||||
|
|
||||||
import JobBuy from '@/components/product-dialog/steps-ui/job-buy';
|
import JobBuy from '@/components/product-dialog/steps-ui/job-buy';
|
||||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||||
import { PageUrl } from '@/constants/app';
|
import { PageUrl } from '@/constants/app';
|
||||||
|
import { CacheKey } from '@/constants/cache-key';
|
||||||
import { GET_CONTACT_TYPE } from '@/constants/job';
|
import { GET_CONTACT_TYPE } from '@/constants/job';
|
||||||
import { navigateTo } from '@/utils/route';
|
import { switchTab, navigateTo } from '@/utils/route';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
|
isCreateResume?: boolean;
|
||||||
onConfirm: (type: GET_CONTACT_TYPE) => void;
|
onConfirm: (type: GET_CONTACT_TYPE) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,14 +32,22 @@ const GET_CONTACT_TYPE_OPTIONS = [
|
|||||||
type: GET_CONTACT_TYPE.VIP,
|
type: GET_CONTACT_TYPE.VIP,
|
||||||
icon: 'https://publiccdn.neighbourhood.com.cn/img/diamond.svg',
|
icon: 'https://publiccdn.neighbourhood.com.cn/img/diamond.svg',
|
||||||
title: '播络会员',
|
title: '播络会员',
|
||||||
desc: '开通会员每天可查看10个',
|
desc: '开通会员每天免费查看',
|
||||||
btnText: '开通',
|
btnText: '开通',
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// type: GET_CONTACT_TYPE.GROUP,
|
||||||
|
// icon: 'https://publiccdn.neighbourhood.com.cn/img/group-avatar.png',
|
||||||
|
// title: '进群领会员(免费报单)',
|
||||||
|
// desc: '群内定期发放会员,免费报单',
|
||||||
|
// btnText: '进群',
|
||||||
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
export function PrejobPopup({ onCancel, onConfirm }: IProps) {
|
export function PrejobPopup({ onCancel, isCreateResume, onConfirm }: IProps) {
|
||||||
const [openPopup, setOpenPopup] = useState(true);
|
const [openPopup, setOpenPopup] = useState(true);
|
||||||
const [openDialog, setOpenDialog] = useState(false);
|
const [openDialog, setOpenDialog] = useState(false);
|
||||||
|
const [clicked, setClicked] = useState(!!Taro.getStorageSync(CacheKey.JOIN_GROUP_POPUP_CLICKED));
|
||||||
const handleClick = (type: GET_CONTACT_TYPE) => () => {
|
const handleClick = (type: GET_CONTACT_TYPE) => () => {
|
||||||
if (type === GET_CONTACT_TYPE.MATERIAL) {
|
if (type === GET_CONTACT_TYPE.MATERIAL) {
|
||||||
navigateTo(PageUrl.MaterialUploadVideo);
|
navigateTo(PageUrl.MaterialUploadVideo);
|
||||||
@ -47,6 +57,12 @@ export function PrejobPopup({ onCancel, onConfirm }: IProps) {
|
|||||||
setOpenPopup(false);
|
setOpenPopup(false);
|
||||||
setOpenDialog(true);
|
setOpenDialog(true);
|
||||||
}
|
}
|
||||||
|
if (type === GET_CONTACT_TYPE.GROUP) {
|
||||||
|
Taro.setStorageSync(CacheKey.JOIN_GROUP_POPUP_CLICKED, true);
|
||||||
|
setClicked(true);
|
||||||
|
switchTab(PageUrl.GroupV2);
|
||||||
|
onConfirm(type);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const handleAfterBuy = useCallback(async () => {
|
const handleAfterBuy = useCallback(async () => {
|
||||||
onConfirm(GET_CONTACT_TYPE.VIP);
|
onConfirm(GET_CONTACT_TYPE.VIP);
|
||||||
@ -58,6 +74,9 @@ export function PrejobPopup({ onCancel, onConfirm }: IProps) {
|
|||||||
<div className={`${PREFIX}__title`}>以下方式任选其一均可获取联系方式</div>
|
<div className={`${PREFIX}__title`}>以下方式任选其一均可获取联系方式</div>
|
||||||
<div className={`${PREFIX}__body`}>
|
<div className={`${PREFIX}__body`}>
|
||||||
{GET_CONTACT_TYPE_OPTIONS.map(option => {
|
{GET_CONTACT_TYPE_OPTIONS.map(option => {
|
||||||
|
if (clicked && option.type === GET_CONTACT_TYPE.GROUP) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className={`${PREFIX}__item`} key={option.type}>
|
<div className={`${PREFIX}__item`} key={option.type}>
|
||||||
<div className={`${PREFIX}__item-icon ${option.type}`}>
|
<div className={`${PREFIX}__item-icon ${option.type}`}>
|
||||||
@ -81,7 +100,7 @@ export function PrejobPopup({ onCancel, onConfirm }: IProps) {
|
|||||||
</Popup>
|
</Popup>
|
||||||
<Dialog open={openDialog} onClose={onCancel}>
|
<Dialog open={openDialog} onClose={onCancel}>
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
<JobBuy onConfirm={handleAfterBuy} buyOnly />
|
<JobBuy onConfirm={handleAfterBuy} isCreateResume={isCreateResume} />
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|||||||
175
src/components/product-dialog/job-contact/index.tsx
Normal file
175
src/components/product-dialog/job-contact/index.tsx
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
|
||||||
|
import { Dialog } from '@taroify/core';
|
||||||
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
import { DialogStatus, PREFIX } from '@/components/product-dialog/const';
|
||||||
|
import JobBuy from '@/components/product-dialog/steps-ui/job-buy';
|
||||||
|
import ContactCustomerService from '@/components/product-dialog/steps-ui/job-contact-customer';
|
||||||
|
import ContactDirect from '@/components/product-dialog/steps-ui/job-contact-direct';
|
||||||
|
import UnableUnlockContent from '@/components/product-dialog/steps-ui/job-unable';
|
||||||
|
import { DeclarationType, ProductType } from '@/constants/product';
|
||||||
|
import { JobDetails } from '@/types/job';
|
||||||
|
import { GetProductIsUnlockResponse, ProductInfo } from '@/types/product';
|
||||||
|
import { logWithPrefix } from '@/utils/common';
|
||||||
|
import { requestUseProduct } from '@/utils/product';
|
||||||
|
import Toast from '@/utils/toast';
|
||||||
|
|
||||||
|
import '../index.less';
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
data: JobDetails;
|
||||||
|
/** Product use record from parent - if exists, user has already unlocked this job */
|
||||||
|
productRecord?: GetProductIsUnlockResponse | null;
|
||||||
|
/** Product balance info from parent */
|
||||||
|
productInfo?: ProductInfo;
|
||||||
|
/** Callback to refresh product balance in parent after purchase */
|
||||||
|
onRefreshBalance?: () => Promise<ProductInfo | undefined>;
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const PRODUCT_CODE = ProductType.VIP;
|
||||||
|
const log = logWithPrefix('product-job-contact-dialog');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Integrated dialog component for job contact flow
|
||||||
|
* Handles: balance check -> buy if needed -> use product -> show contact info
|
||||||
|
*
|
||||||
|
* @param productRecord - Pass from parent to avoid duplicate API calls
|
||||||
|
* @param productInfo - Pass from parent to avoid duplicate API calls
|
||||||
|
* @param onRefreshBalance - Callback to refresh balance in parent after purchase
|
||||||
|
*/
|
||||||
|
function ProductJobContactDialog(props: IProps) {
|
||||||
|
const { data, productRecord, productInfo, onRefreshBalance, onClose } = props;
|
||||||
|
const [status, setStatus] = useState<DialogStatus>(DialogStatus.LOADING);
|
||||||
|
const [publisherAcctNo, setPublisherAcctNo] = useState<string>('');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle contact display based on declaration type
|
||||||
|
*/
|
||||||
|
const showContactResult = useCallback((declarationTypeResult?: ProductInfo['declarationTypeResult']) => {
|
||||||
|
if (declarationTypeResult?.type === DeclarationType.Direct && declarationTypeResult.publisherAcctNo) {
|
||||||
|
log('show JOB_CONTACT_DIRECT', declarationTypeResult.publisherAcctNo);
|
||||||
|
setPublisherAcctNo(declarationTypeResult.publisherAcctNo);
|
||||||
|
setStatus(DialogStatus.JOB_CONTACT_DIRECT);
|
||||||
|
} else {
|
||||||
|
log('show JOB_CONTACT_CS');
|
||||||
|
setStatus(DialogStatus.JOB_CONTACT_CS);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use product and show contact info
|
||||||
|
*/
|
||||||
|
const consumeProductAndShowContact = useCallback(async () => {
|
||||||
|
const productResult = await requestUseProduct(PRODUCT_CODE, { jobId: data.id });
|
||||||
|
log('consumeProductAndShowContact result', productResult);
|
||||||
|
// Refresh balance in parent after consuming product
|
||||||
|
await onRefreshBalance?.();
|
||||||
|
showContactResult(productResult?.declarationTypeResult);
|
||||||
|
}, [data.id, showContactResult, onRefreshBalance]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback after successful purchase
|
||||||
|
* Refresh balance via parent callback and use product to show contact info
|
||||||
|
*/
|
||||||
|
const handleAfterBuy = useCallback(async () => {
|
||||||
|
log('handleAfterBuy - start');
|
||||||
|
try {
|
||||||
|
Taro.showLoading({ mask: true, title: '加载中...' });
|
||||||
|
|
||||||
|
// Refresh balance via parent callback
|
||||||
|
await onRefreshBalance?.();
|
||||||
|
|
||||||
|
// Use product and show contact info after purchase
|
||||||
|
await consumeProductAndShowContact();
|
||||||
|
} catch (e) {
|
||||||
|
log('handleAfterBuy error', e);
|
||||||
|
Toast.error('出错了,请重试');
|
||||||
|
onClose();
|
||||||
|
} finally {
|
||||||
|
Taro.hideLoading();
|
||||||
|
}
|
||||||
|
}, [consumeProductAndShowContact, onRefreshBalance, onClose]);
|
||||||
|
|
||||||
|
const handleReport = useCallback(() => {
|
||||||
|
log('report', data.id);
|
||||||
|
}, [data.id]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize dialog on mount
|
||||||
|
*/
|
||||||
|
useEffect(() => {
|
||||||
|
let isMounted = true;
|
||||||
|
|
||||||
|
const init = async () => {
|
||||||
|
try {
|
||||||
|
Taro.showLoading({ mask: true, title: '加载中...' });
|
||||||
|
|
||||||
|
log('init with productRecord', productRecord);
|
||||||
|
log('init with productInfo', productInfo);
|
||||||
|
|
||||||
|
// Step 1: Already unlocked - show contact directly
|
||||||
|
if (productRecord) {
|
||||||
|
log('show JOB_CONTACT_DIRECT from productRecord', productRecord.declarationTypeResult);
|
||||||
|
showContactResult(productRecord.declarationTypeResult);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2: No productInfo - error state
|
||||||
|
if (!productInfo) {
|
||||||
|
log('no productInfo provided, closing');
|
||||||
|
Toast.error('出错了,请重试');
|
||||||
|
onClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 3: Determine status based on balance
|
||||||
|
if (!productInfo.isPaidVip && !productInfo.freeBalance) {
|
||||||
|
log('show JOB_BUY');
|
||||||
|
if (isMounted) setStatus(DialogStatus.JOB_BUY);
|
||||||
|
} else if (!productInfo.balance) {
|
||||||
|
log('show JOB_UNABLE_UNLOCK');
|
||||||
|
if (isMounted) setStatus(DialogStatus.JOB_UNABLE_UNLOCK);
|
||||||
|
} else {
|
||||||
|
await consumeProductAndShowContact();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log('init error', e);
|
||||||
|
Toast.error('出错了,请重试');
|
||||||
|
onClose();
|
||||||
|
} finally {
|
||||||
|
Taro.hideLoading();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
isMounted = false;
|
||||||
|
};
|
||||||
|
// Only run on mount - props are captured at dialog open time
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (status === DialogStatus.LOADING) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog className={PREFIX} onClose={onClose} open>
|
||||||
|
<Dialog.Content>
|
||||||
|
{status === DialogStatus.JOB_CONTACT_CS && <ContactCustomerService onAfterConfirm={onClose} />}
|
||||||
|
{status === DialogStatus.JOB_CONTACT_DIRECT && (
|
||||||
|
<ContactDirect publisherAcctNo={publisherAcctNo} onAfterConfirm={onClose} onReport={handleReport} />
|
||||||
|
)}
|
||||||
|
{status === DialogStatus.JOB_BUY && (
|
||||||
|
<JobBuy onConfirm={handleAfterBuy} isCreateResume={productInfo?.isCreateResume} />
|
||||||
|
)}
|
||||||
|
{status === DialogStatus.JOB_UNABLE_UNLOCK && <UnableUnlockContent onConfirm={onClose} />}
|
||||||
|
</Dialog.Content>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ProductJobContactDialog;
|
||||||
@ -2,7 +2,7 @@ import Taro from '@tarojs/taro';
|
|||||||
|
|
||||||
import { Button } from '@taroify/core';
|
import { Button } from '@taroify/core';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { Fragment, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import Badge from '@/components/badge';
|
import Badge from '@/components/badge';
|
||||||
import { PREFIX } from '@/components/product-dialog/const';
|
import { PREFIX } from '@/components/product-dialog/const';
|
||||||
@ -11,9 +11,17 @@ import { OrderStatus, OrderType, ProductSpecId, ProductType } from '@/constants/
|
|||||||
import { SubscribeTempId } from '@/constants/subscribe';
|
import { SubscribeTempId } from '@/constants/subscribe';
|
||||||
import { logWithPrefix } from '@/utils/common';
|
import { logWithPrefix } from '@/utils/common';
|
||||||
import { collectEvent, reportEvent } from '@/utils/event';
|
import { collectEvent, reportEvent } from '@/utils/event';
|
||||||
import { getOrderPrice, isCancelPay, requestCreatePayInfo, requestOrderInfo, requestPayment } from '@/utils/product';
|
import {
|
||||||
|
getOrderPrice,
|
||||||
|
isCancelPay,
|
||||||
|
requestCreatePayInfo,
|
||||||
|
requestOrderInfo,
|
||||||
|
requestPayment,
|
||||||
|
requestProductTypeList,
|
||||||
|
} from '@/utils/product';
|
||||||
import { postSubscribe, subscribeMessage } from '@/utils/subscribe';
|
import { postSubscribe, subscribeMessage } from '@/utils/subscribe';
|
||||||
import Toast from '@/utils/toast';
|
import Toast from '@/utils/toast';
|
||||||
|
import { ProductSpecResult } from '@/types/product';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onNext: () => void;
|
onNext: () => void;
|
||||||
@ -82,22 +90,35 @@ const subscribe = async () => {
|
|||||||
postSubscribe(TEMP_IDS, successIds);
|
postSubscribe(TEMP_IDS, successIds);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getJsonContent = (jsonString: string) => {
|
||||||
|
try {
|
||||||
|
return JSON.parse(jsonString);
|
||||||
|
} catch (e) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export default function CompanyPublishJobBuy(props: IProps) {
|
export default function CompanyPublishJobBuy(props: IProps) {
|
||||||
const { onNext } = props;
|
const { onNext } = props;
|
||||||
const [selectItem, setSelectItem] = useState(LIST[0]);
|
const [productList, setProductList] = useState<ProductSpecResult[]>([]);
|
||||||
|
const [selectItem, setSelectItem] = useState<ProductSpecResult | undefined>();
|
||||||
|
|
||||||
const handleClickItem = useCallback((newSelectItem: Item) => setSelectItem(newSelectItem), []);
|
const handleClickItem = useCallback((newSelectItem: ProductSpecResult) => setSelectItem(newSelectItem), []);
|
||||||
|
|
||||||
const handleBuy = useCallback(async () => {
|
const handleBuy = useCallback(async () => {
|
||||||
log('handleBuy');
|
log('handleBuy');
|
||||||
reportEvent(ReportEventId.CLICK_PAY_PUBLISH_JOB);
|
reportEvent(ReportEventId.CLICK_PAY_PUBLISH_JOB);
|
||||||
|
if (!selectItem) {
|
||||||
|
Toast.error('请选择购买的产品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Taro.showLoading();
|
Taro.showLoading();
|
||||||
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
||||||
type: OrderType.CompanyVip,
|
type: OrderType.CompanyVip,
|
||||||
amt: getOrderPrice(selectItem.amt),
|
amt: selectItem.payPrice,
|
||||||
productCode: ProductType.BOSS_VIP_NEW,
|
productCode: ProductType.BOSS_VIP_NEW,
|
||||||
productSpecId: selectItem.id,
|
productSpecId: selectItem.productSpecId,
|
||||||
});
|
});
|
||||||
log('handleBuy payInfo', payOrderNo, createPayInfo);
|
log('handleBuy payInfo', payOrderNo, createPayInfo);
|
||||||
await requestPayment({
|
await requestPayment({
|
||||||
@ -121,8 +142,14 @@ export default function CompanyPublishJobBuy(props: IProps) {
|
|||||||
log('handleBuy error', e);
|
log('handleBuy error', e);
|
||||||
}
|
}
|
||||||
}, [selectItem, onNext]);
|
}, [selectItem, onNext]);
|
||||||
|
const handleGetProductInfo = useCallback(async () => {
|
||||||
|
const result = await requestProductTypeList(ProductType.BOSS_VIP_NEW);
|
||||||
|
setProductList(result);
|
||||||
|
setSelectItem(result[0]);
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
handleGetProductInfo();
|
||||||
collectEvent(CollectEventName.CREATE_ORDER_VIEW, { orderType: OrderType.BossVip, source: 'user-page' });
|
collectEvent(CollectEventName.CREATE_ORDER_VIEW, { orderType: OrderType.BossVip, source: 'user-page' });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@ -130,19 +157,21 @@ export default function CompanyPublishJobBuy(props: IProps) {
|
|||||||
<div className={`${PREFIX}__company-publish-job-buy`}>
|
<div className={`${PREFIX}__company-publish-job-buy`}>
|
||||||
<div className={`${PREFIX}__company-publish-job-buy__header`}>发认证通告限时折扣</div>
|
<div className={`${PREFIX}__company-publish-job-buy__header`}>发认证通告限时折扣</div>
|
||||||
<div className={`${PREFIX}__company-publish-job-buy__price-container`}>
|
<div className={`${PREFIX}__company-publish-job-buy__price-container`}>
|
||||||
{LIST.map(item => (
|
{productList.map(item => (
|
||||||
<div
|
<div
|
||||||
key={item.price}
|
key={item.payPrice}
|
||||||
className={classNames(`${PREFIX}__company-publish-job-buy__item`, {
|
className={classNames(`${PREFIX}__company-publish-job-buy__item`, {
|
||||||
selected: item.amt === selectItem.amt,
|
selected: selectItem && item.payPrice === selectItem.payPrice,
|
||||||
disabled: item.amt === 0,
|
disabled: item.payPrice === 0,
|
||||||
})}
|
})}
|
||||||
onClick={item.amt === 0 ? undefined : () => handleClickItem(item)}
|
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={classNames(`${PREFIX}__company-publish-job-buy__item__title`, { free: item.payPrice === 0 })}
|
||||||
>
|
>
|
||||||
<div className={classNames(`${PREFIX}__company-publish-job-buy__item__title`, { free: item.amt === 0 })}>
|
|
||||||
{item.title}
|
{item.title}
|
||||||
</div>
|
</div>
|
||||||
<div className={`${PREFIX}__company-publish-job-buy__item__price`}>{item.price}</div>
|
<div className={`${PREFIX}__company-publish-job-buy__item__price`}>{item.priceText}</div>
|
||||||
{item.badge && <Badge className={`${PREFIX}__company-publish-job-buy__item__badge`} text={item.badge} />}
|
{item.badge && <Badge className={`${PREFIX}__company-publish-job-buy__item__badge`} text={item.badge} />}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
@ -152,8 +181,10 @@ export default function CompanyPublishJobBuy(props: IProps) {
|
|||||||
<div className={`${PREFIX}__company-publish-job-buy__divider__title`}>包含</div>
|
<div className={`${PREFIX}__company-publish-job-buy__divider__title`}>包含</div>
|
||||||
<div className={`${PREFIX}__company-publish-job-buy__divider__right-line`} />
|
<div className={`${PREFIX}__company-publish-job-buy__divider__right-line`} />
|
||||||
</div>
|
</div>
|
||||||
|
{selectItem && (
|
||||||
|
<Fragment>
|
||||||
<div className={`${PREFIX}__company-publish-job-buy__contents`}>
|
<div className={`${PREFIX}__company-publish-job-buy__contents`}>
|
||||||
{selectItem.contents.map(i => (
|
{getJsonContent(selectItem.contentsJson).map(i => (
|
||||||
<div
|
<div
|
||||||
className={classNames(`${PREFIX}__company-publish-job-buy__content`, { highlight: i.highlight })}
|
className={classNames(`${PREFIX}__company-publish-job-buy__content`, { highlight: i.highlight })}
|
||||||
key={i.content}
|
key={i.content}
|
||||||
@ -164,8 +195,10 @@ export default function CompanyPublishJobBuy(props: IProps) {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<Button className={`${PREFIX}__company-publish-job-buy__button`} onClick={handleBuy}>
|
<Button className={`${PREFIX}__company-publish-job-buy__button`} onClick={handleBuy}>
|
||||||
{`支付${selectItem.amt}元`}
|
{`支付${selectItem.showPrice}元`}
|
||||||
</Button>
|
</Button>
|
||||||
|
</Fragment>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,55 +2,64 @@ import Taro from '@tarojs/taro';
|
|||||||
|
|
||||||
import { Button } from '@taroify/core';
|
import { Button } from '@taroify/core';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { Fragment, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import Badge from '@/components/badge';
|
import Badge from '@/components/badge';
|
||||||
import { PREFIX } from '@/components/product-dialog/const';
|
import { PREFIX } from '@/components/product-dialog/const';
|
||||||
|
import { PageUrl } from '@/constants/app';
|
||||||
import { CollectEventName } from '@/constants/event';
|
import { CollectEventName } from '@/constants/event';
|
||||||
import { OrderStatus, OrderType, ProductSpecId, ProductType } from '@/constants/product';
|
import { OrderStatus, OrderType, ProductType } from '@/constants/product';
|
||||||
import { SubscribeTempId } from '@/constants/subscribe';
|
import { SubscribeTempId } from '@/constants/subscribe';
|
||||||
|
import { ProductSpecResult } from '@/types/product';
|
||||||
import { logWithPrefix } from '@/utils/common';
|
import { logWithPrefix } from '@/utils/common';
|
||||||
import { collectEvent } from '@/utils/event';
|
import { collectEvent } from '@/utils/event';
|
||||||
import { getOrderPrice, isCancelPay, requestCreatePayInfo, requestOrderInfo, requestPayment } from '@/utils/product';
|
import {
|
||||||
|
isCancelPay,
|
||||||
|
requestCreatePayInfo,
|
||||||
|
requestOrderInfo,
|
||||||
|
requestPayment,
|
||||||
|
requestProductTypeList,
|
||||||
|
} from '@/utils/product';
|
||||||
|
import { navigateTo } from '@/utils/route';
|
||||||
import { postSubscribe, subscribeMessage } from '@/utils/subscribe';
|
import { postSubscribe, subscribeMessage } from '@/utils/subscribe';
|
||||||
import Toast from '@/utils/toast';
|
import Toast from '@/utils/toast';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
buyOnly?: boolean;
|
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
|
isCreateResume?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Item {
|
// interface Item {
|
||||||
id: ProductSpecId;
|
// id: ProductSpecId;
|
||||||
title: string;
|
// title: string;
|
||||||
content: string;
|
// content: string;
|
||||||
buyOnlyContent?: string;
|
// buyOnlyContent?: string;
|
||||||
price: string;
|
// price: string;
|
||||||
amt: number;
|
// amt: number;
|
||||||
badge?: string;
|
// badge?: string;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const LIST: Item[] = [
|
// const LIST: Item[] = [
|
||||||
{ id: ProductSpecId.WeeklyVIP, title: '非会员', content: '每日2次', price: '免费', amt: 0 },
|
// { id: ProductSpecId.WeeklyVIP, title: '非会员', content: '每日2次', price: '免费', amt: 0 },
|
||||||
{
|
// {
|
||||||
id: ProductSpecId.DailyVIP,
|
// id: ProductSpecId.DailyVIP,
|
||||||
title: '日会员',
|
// title: '日会员',
|
||||||
content: '每日+10次',
|
// content: '每日+10次',
|
||||||
buyOnlyContent: '每日12次',
|
// buyOnlyContent: '每日12次',
|
||||||
price: '60播豆',
|
// price: '60播豆',
|
||||||
amt: 6,
|
// amt: 6,
|
||||||
badge: '限时体验',
|
// badge: '限时体验',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: ProductSpecId.WeeklyVIP,
|
// id: ProductSpecId.WeeklyVIP,
|
||||||
title: '周会员',
|
// title: '周会员',
|
||||||
content: '每日+10次',
|
// content: '每日+10次',
|
||||||
buyOnlyContent: '每日12次',
|
// buyOnlyContent: '每日12次',
|
||||||
price: '180播豆',
|
// price: '180播豆',
|
||||||
amt: 18,
|
// amt: 18,
|
||||||
badge: ' 超值',
|
// badge: ' 超值',
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
|
|
||||||
const log = logWithPrefix('job-buy');
|
const log = logWithPrefix('job-buy');
|
||||||
const SUBSCRIBE_ID = SubscribeTempId.SUBSCRIBE_VIP;
|
const SUBSCRIBE_ID = SubscribeTempId.SUBSCRIBE_VIP;
|
||||||
@ -66,20 +75,26 @@ const subscribe = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function JobBuy(props: IProps) {
|
export default function JobBuy(props: IProps) {
|
||||||
const { onConfirm, buyOnly } = props;
|
const { onConfirm, isCreateResume } = props;
|
||||||
const [selectItem, setSelectItem] = useState(LIST[1]);
|
const [productList, setProductList] = useState<ProductSpecResult[]>([]);
|
||||||
|
const [selectItem, setSelectItem] = useState<ProductSpecResult | undefined>();
|
||||||
|
|
||||||
const handleClickItem = useCallback((newSelectItem: Item) => setSelectItem(newSelectItem), []);
|
const handleClickItem = useCallback((newSelectItem: ProductSpecResult) => setSelectItem(newSelectItem), []);
|
||||||
|
|
||||||
const handleBuy = useCallback(async () => {
|
const handleBuy = useCallback(async () => {
|
||||||
log('handleBuy', selectItem);
|
log('handleBuy', selectItem);
|
||||||
|
if (!selectItem) {
|
||||||
|
Toast.error('请选择购买的产品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Taro.showLoading();
|
Taro.showLoading();
|
||||||
|
|
||||||
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
||||||
type: OrderType.VIP,
|
type: OrderType.VIP,
|
||||||
amt: getOrderPrice(selectItem.amt),
|
amt: selectItem.payPrice,
|
||||||
productCode: ProductType.VIP,
|
productCode: ProductType.VIP,
|
||||||
productSpecId: selectItem.id,
|
productSpecId: selectItem.productSpecId,
|
||||||
});
|
});
|
||||||
log('handleBuy payInfo', payOrderNo, createPayInfo);
|
log('handleBuy payInfo', payOrderNo, createPayInfo);
|
||||||
await requestPayment({
|
await requestPayment({
|
||||||
@ -104,59 +119,81 @@ export default function JobBuy(props: IProps) {
|
|||||||
}
|
}
|
||||||
}, [selectItem, onConfirm]);
|
}, [selectItem, onConfirm]);
|
||||||
|
|
||||||
|
const handleGetProductInfo = useCallback(async () => {
|
||||||
|
const result = await requestProductTypeList(ProductType.VIP);
|
||||||
|
setProductList(result);
|
||||||
|
setSelectItem(result[0]);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleResume = useCallback(() => {
|
||||||
|
navigateTo(PageUrl.MaterialUploadVideo);
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
handleGetProductInfo();
|
||||||
collectEvent(CollectEventName.CREATE_ORDER_VIEW, { orderType: OrderType.VIP });
|
collectEvent(CollectEventName.CREATE_ORDER_VIEW, { orderType: OrderType.VIP });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${PREFIX}__job-buy`}>
|
<div className={`${PREFIX}__job-buy`}>
|
||||||
{buyOnly ? (
|
{isCreateResume ? (
|
||||||
<div className={`${PREFIX}__job-buy__header`}>开通播络会员即可直接查看联系方式</div>
|
<Fragment>
|
||||||
) : (
|
|
||||||
<div className={`${PREFIX}__job-buy__header`}>
|
<div className={`${PREFIX}__job-buy__header`}>
|
||||||
<div>今日通告对接次数</div>
|
<div>今日免费查看次数</div>
|
||||||
<div className="highlight">已用完</div>
|
<div className="highlight">已用完</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
{buyOnly ? (
|
|
||||||
<div className={`${PREFIX}__job-buy__describe`}>每天可获取12个联系方式</div>
|
|
||||||
) : (
|
|
||||||
<div className={`${PREFIX}__job-buy__describe`}>
|
<div className={`${PREFIX}__job-buy__describe`}>
|
||||||
<div>请</div>
|
<div>请</div>
|
||||||
<div className="highlight">明日</div>
|
<div className="highlight">明日</div>
|
||||||
<div>再来 或 </div>
|
<div>再来</div>
|
||||||
|
<div> 或 </div>
|
||||||
<div className="highlight">升级会员</div>
|
<div className="highlight">升级会员</div>
|
||||||
</div>
|
</div>
|
||||||
|
</Fragment>
|
||||||
|
) : (
|
||||||
|
<Fragment>
|
||||||
|
<div className={`${PREFIX}__job-buy__header`}>
|
||||||
|
<div>开通会员即可查看联系方式</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__job-buy__describe`}>
|
||||||
|
<div>完善模卡,每日可免费查看 </div>
|
||||||
|
<div className="highlight" onClick={handleResume}>
|
||||||
|
去完善
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
<div className={`${PREFIX}__job-buy__container`}>
|
<div className={`${PREFIX}__job-buy__container`}>
|
||||||
{LIST.map(item => {
|
{productList.map(item => {
|
||||||
if (buyOnly && !item.amt) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={item.price}
|
key={item.payPrice}
|
||||||
className={classNames(`${PREFIX}__job-buy__item`, {
|
className={classNames(`${PREFIX}__job-buy__item`, {
|
||||||
selected: item.amt === selectItem.amt,
|
selected: selectItem && item.payPrice === selectItem.payPrice,
|
||||||
disabled: item.amt === 0,
|
disabled: item.payPrice === 0,
|
||||||
})}
|
})}
|
||||||
onClick={item.amt === 0 ? undefined : () => handleClickItem(item)}
|
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
||||||
>
|
>
|
||||||
<div className={classNames(`${PREFIX}__job-buy__item__title`, { free: item.amt === 0 })}>
|
<div className={classNames(`${PREFIX}__job-buy__item__title`, { free: item.payPrice === 0 })}>
|
||||||
{item.title}
|
{item.title}
|
||||||
</div>
|
</div>
|
||||||
<div className={`${PREFIX}__job-buy__item__content`}>{buyOnly ? item.buyOnlyContent : item.content}</div>
|
<div className={`${PREFIX}__job-buy__item__content`}>{item.contentSingle}</div>
|
||||||
<div className={`${PREFIX}__job-buy__item__price`}>{item.price}</div>
|
<div className={`${PREFIX}__job-buy__item__price`}>{item.showPrice}元</div>
|
||||||
{item.badge && <Badge className={`${PREFIX}__job-buy__item__badge`} text={item.badge} />}
|
{item.badge && <Badge className={`${PREFIX}__job-buy__item__badge`} text={item.badge} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
{selectItem && (
|
||||||
<div className={`${PREFIX}__job-buy__hint`}>
|
<div className={`${PREFIX}__job-buy__hint`}>
|
||||||
注:日会员有效期为 <div className="highlight">支付后24小时</div>
|
注:{selectItem?.title}有效期为
|
||||||
|
<div className="highlight">
|
||||||
|
支付后{selectItem?.expire > 1 ? `${selectItem.expire}天` : `${selectItem.expire * 24}小时`}
|
||||||
</div>
|
</div>
|
||||||
<Button className={`${PREFIX}__job-buy__button`} onClick={handleBuy}>
|
</div>
|
||||||
{`支付 ${selectItem.amt} 元`}
|
)}
|
||||||
|
<Button className={`${PREFIX}__job-buy__button`} disabled={!selectItem} onClick={handleBuy}>
|
||||||
|
{`支付 ${selectItem?.showPrice} 元`}
|
||||||
</Button>
|
</Button>
|
||||||
{/* <div className={`${PREFIX}__job-buy__tips`}>{`已选:${selectItem.title},含进本地群服务`}</div> */}
|
{/* <div className={`${PREFIX}__job-buy__tips`}>{`已选:${selectItem.title},含进本地群服务`}</div> */}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ interface IContactDirectProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function ContactDirect(props: IContactDirectProps) {
|
export default function ContactDirect(props: IContactDirectProps) {
|
||||||
const { publisherAcctNo, onAfterConfirm, onReport } = props;
|
const { publisherAcctNo, onAfterConfirm } = props;
|
||||||
|
|
||||||
const handleCopyAndContact = async () => {
|
const handleCopyAndContact = async () => {
|
||||||
await copy(publisherAcctNo);
|
await copy(publisherAcctNo);
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export enum EventName {
|
|||||||
ADD_GROUP = 'add_group',
|
ADD_GROUP = 'add_group',
|
||||||
SELECT_CITY = 'select_city',
|
SELECT_CITY = 'select_city',
|
||||||
CREATE_PROFILE = 'create_profile',
|
CREATE_PROFILE = 'create_profile',
|
||||||
|
READ_CONTACT = 'read_contact',
|
||||||
UPDATE_PROFILE = 'update_profile',
|
UPDATE_PROFILE = 'update_profile',
|
||||||
EDIT_JOB_DESCRIBE = 'edit_job_describe',
|
EDIT_JOB_DESCRIBE = 'edit_job_describe',
|
||||||
JOB_UPDATE = 'job_update',
|
JOB_UPDATE = 'job_update',
|
||||||
|
|||||||
@ -13,4 +13,5 @@ export enum CacheKey {
|
|||||||
AGREEMENT_SIGNED = '__agreement_signed__',
|
AGREEMENT_SIGNED = '__agreement_signed__',
|
||||||
CITY_CODES = '__city_codes__',
|
CITY_CODES = '__city_codes__',
|
||||||
JOIN_GROUP_CARD_CLICKED = '__join_group_card_clicked__',
|
JOIN_GROUP_CARD_CLICKED = '__join_group_card_clicked__',
|
||||||
|
JOIN_GROUP_POPUP_CLICKED = '__join_group_popup_clicked__',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,4 +213,5 @@ export const FULL_PRICE_OPTIONS = FULL_EMPLOY_SALARY_OPTIONS.filter(o => !!o.val
|
|||||||
export enum GET_CONTACT_TYPE {
|
export enum GET_CONTACT_TYPE {
|
||||||
VIP = 'vip',
|
VIP = 'vip',
|
||||||
MATERIAL = 'material',
|
MATERIAL = 'material',
|
||||||
|
GROUP = 'group',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,6 +41,8 @@ export enum API {
|
|||||||
PRODUCT_USE_RECORD = '/product/getProductUseRecord', // 查询某个产品是否已经解锁
|
PRODUCT_USE_RECORD = '/product/getProductUseRecord', // 查询某个产品是否已经解锁
|
||||||
USE_PRODUCT = '/product/use', // 使用某个产品扣费/次数
|
USE_PRODUCT = '/product/use', // 使用某个产品扣费/次数
|
||||||
ALLOW_BUY_PRODUCT = '/product/allowBuyProduct', // 是否可以购买某个产品
|
ALLOW_BUY_PRODUCT = '/product/allowBuyProduct', // 是否可以购买某个产品
|
||||||
|
LIST_PRODUCT_TYPE = '/product/listByType/{productType}',
|
||||||
|
|
||||||
CS_QR_CODE = '/customerService/get', // 客服微信二维码
|
CS_QR_CODE = '/customerService/get', // 客服微信二维码
|
||||||
CREATE_PAY_ORDER = '/payOrder/create', // 创建支付订单
|
CREATE_PAY_ORDER = '/payOrder/create', // 创建支付订单
|
||||||
GET_PAY_ORDER = '/payOrder/get', // 订单查询
|
GET_PAY_ORDER = '/payOrder/get', // 订单查询
|
||||||
|
|||||||
@ -269,6 +269,21 @@
|
|||||||
flex: 2 2;
|
flex: 2 2;
|
||||||
.button(@height: 88px; @fontSize: 32px; @fontWeight: 500; @borderRadius: 44px;);
|
.button(@height: 88px; @fontSize: 32px; @fontWeight: 500; @borderRadius: 44px;);
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
&-tag {
|
||||||
|
position: absolute;
|
||||||
|
right: 8px;
|
||||||
|
top: -12px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
padding: 2px 8px;
|
||||||
|
background: #FF5051;
|
||||||
|
border-radius: 20px 24px 24px 0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,7 +12,7 @@ import { JoinGroupHint } from '@/components/join-group-hint';
|
|||||||
import LoginButton from '@/components/login-button';
|
import LoginButton from '@/components/login-button';
|
||||||
import PageLoading from '@/components/page-loading';
|
import PageLoading from '@/components/page-loading';
|
||||||
import { PrejobPopup } from '@/components/prejob-popup';
|
import { PrejobPopup } from '@/components/prejob-popup';
|
||||||
import ProductJobDialog from '@/components/product-dialog/job';
|
import ProductJobContactDialog from '@/components/product-dialog/job-contact';
|
||||||
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
|
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
|
||||||
import { EventName, PageUrl, RoleType } from '@/constants/app';
|
import { EventName, PageUrl, RoleType } from '@/constants/app';
|
||||||
import { CertificationStatusType } from '@/constants/company';
|
import { CertificationStatusType } from '@/constants/company';
|
||||||
@ -27,6 +27,7 @@ import { RESPONSE_ERROR_CODE } from '@/http/constant';
|
|||||||
import { HttpError } from '@/http/error';
|
import { HttpError } from '@/http/error';
|
||||||
import { JobDetails } from '@/types/job';
|
import { JobDetails } from '@/types/job';
|
||||||
import { IMaterialMessage } from '@/types/message';
|
import { IMaterialMessage } from '@/types/message';
|
||||||
|
import { GetProductIsUnlockResponse, ProductInfo } from '@/types/product';
|
||||||
import { switchRoleType } from '@/utils/app';
|
import { switchRoleType } from '@/utils/app';
|
||||||
import { copy, logWithPrefix } from '@/utils/common';
|
import { copy, logWithPrefix } from '@/utils/common';
|
||||||
import { reportEvent } from '@/utils/event';
|
import { reportEvent } from '@/utils/event';
|
||||||
@ -40,8 +41,7 @@ import { getJumpUrl, getPageQuery, navigateTo } from '@/utils/route';
|
|||||||
import { getCommonShareMessage } from '@/utils/share';
|
import { getCommonShareMessage } from '@/utils/share';
|
||||||
import { formatDate } from '@/utils/time';
|
import { formatDate } from '@/utils/time';
|
||||||
import Toast from '@/utils/toast';
|
import Toast from '@/utils/toast';
|
||||||
import { isNeedCreateMaterial } from '@/utils/user';
|
import { isNeedPhone } from '@/utils/user';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
const PREFIX = 'job-detail';
|
const PREFIX = 'job-detail';
|
||||||
@ -70,8 +70,30 @@ const getMapCallout = (data: JobDetails): MapProps.callout | undefined => {
|
|||||||
const AnchorFooter = (props: { data: JobDetails }) => {
|
const AnchorFooter = (props: { data: JobDetails }) => {
|
||||||
const { data } = props;
|
const { data } = props;
|
||||||
const [errorTips, setErrorTips] = useState<string>('');
|
const [errorTips, setErrorTips] = useState<string>('');
|
||||||
const [dialogVisible, setDialogVisible] = useState(false);
|
const [showJobContactDialog, setShowJobContactDialog] = useState(false);
|
||||||
const [showMaterialGuide, setShowMaterialGuide] = useState(false);
|
const [showMaterialGuide, setShowMaterialGuide] = useState(false);
|
||||||
|
const [productInfo, setProductInfo] = useState<undefined | ProductInfo>();
|
||||||
|
const [productRecord, setProductRecord] = useState<undefined | GetProductIsUnlockResponse>();
|
||||||
|
const userInfo = useUserInfo();
|
||||||
|
const needPhone = isNeedPhone(userInfo);
|
||||||
|
|
||||||
|
const getProductRecord = useCallback(async () => {
|
||||||
|
const result = await requestProductUseRecord(ProductType.VIP, { jobId: data.id });
|
||||||
|
setProductRecord(result);
|
||||||
|
}, [data.id]);
|
||||||
|
|
||||||
|
const getProductBalance = useCallback(async (loading?: boolean) => {
|
||||||
|
if (loading) {
|
||||||
|
Taro.showLoading();
|
||||||
|
}
|
||||||
|
const [, resp] = await requestProductBalance(ProductType.VIP);
|
||||||
|
setProductInfo(resp);
|
||||||
|
console.log(resp);
|
||||||
|
if (loading) {
|
||||||
|
Taro.hideLoading();
|
||||||
|
}
|
||||||
|
return resp;
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleClickContact = useCallback(async () => {
|
const handleClickContact = useCallback(async () => {
|
||||||
log('handleClickContact');
|
log('handleClickContact');
|
||||||
@ -79,21 +101,8 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
reportEvent(ReportEventId.CLICK_JOB_CONTACT);
|
reportEvent(ReportEventId.CLICK_JOB_CONTACT);
|
||||||
try {
|
|
||||||
const needCreateMaterial = await isNeedCreateMaterial();
|
|
||||||
|
|
||||||
if (data.sourcePlat !== 'bl') {
|
try {
|
||||||
if (needCreateMaterial) {
|
|
||||||
const result = await requestProductUseRecord(ProductType.VIP, { jobId: data.id });
|
|
||||||
if (!result) {
|
|
||||||
const [time, isPaidVip] = await requestProductBalance(ProductType.VIP);
|
|
||||||
if (time <= 0 || !isPaidVip) {
|
|
||||||
setShowMaterialGuide(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (data.isAuthed) {
|
if (data.isAuthed) {
|
||||||
const toUserId = data.userId;
|
const toUserId = data.userId;
|
||||||
if (isChatWithSelf(toUserId)) {
|
if (isChatWithSelf(toUserId)) {
|
||||||
@ -102,7 +111,7 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
}
|
}
|
||||||
const chat = await postCreateChat(toUserId);
|
const chat = await postCreateChat(toUserId);
|
||||||
let materialMessage: null | IMaterialMessage = null;
|
let materialMessage: null | IMaterialMessage = null;
|
||||||
if (!needCreateMaterial) {
|
if (!!productInfo?.isCreateResume) {
|
||||||
const profile = await requestProfileDetail();
|
const profile = await requestProfileDetail();
|
||||||
if (profile) {
|
if (profile) {
|
||||||
materialMessage = {
|
materialMessage = {
|
||||||
@ -124,7 +133,13 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
jobId: data.id,
|
jobId: data.id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setDialogVisible(true);
|
// Show material guide if no resume and no VIP and no free balance
|
||||||
|
if (!productRecord && !productInfo?.isCreateResume && !productInfo?.isPaidVip && !productInfo?.freeBalance) {
|
||||||
|
setShowMaterialGuide(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Open integrated dialog - it handles buy + contact internally
|
||||||
|
setShowJobContactDialog(true);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const e = error as HttpError;
|
const e = error as HttpError;
|
||||||
@ -135,31 +150,99 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
Toast.error('请求失败请重试');
|
Toast.error('请求失败请重试');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [data]);
|
}, [data, productInfo?.freeBalance, productInfo?.isCreateResume, productInfo?.isPaidVip]);
|
||||||
|
|
||||||
const handleDialogHidden = useCallback(() => {
|
const handleDialogClose = useCallback(() => {
|
||||||
setDialogVisible(false);
|
setShowJobContactDialog(false);
|
||||||
}, []);
|
// Refresh data after dialog closes
|
||||||
const handleConfirmPrejob = useCallback((type: GET_CONTACT_TYPE) => {
|
getProductRecord();
|
||||||
|
}, [getProductRecord]);
|
||||||
|
|
||||||
|
const handleConfirmPrejob = useCallback(
|
||||||
|
(type: GET_CONTACT_TYPE) => {
|
||||||
setShowMaterialGuide(false);
|
setShowMaterialGuide(false);
|
||||||
if (GET_CONTACT_TYPE.VIP === type) {
|
if (GET_CONTACT_TYPE.VIP === type) {
|
||||||
setDialogVisible(true);
|
getProductBalance().then(() => {
|
||||||
|
setShowJobContactDialog(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, []);
|
},
|
||||||
|
[getProductBalance]
|
||||||
|
);
|
||||||
|
|
||||||
|
// const unAuthedButtonText = useMemo(() => {
|
||||||
|
// if (haveSeen) {
|
||||||
|
// return '查看联系方式';
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (productInfo?.isPaidVip) {
|
||||||
|
// return '您是会员,可直接查看';
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (productInfo?.freeBalance) {
|
||||||
|
// return `还剩${productInfo.freeBalance}次查看次数`;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return productInfo?.isCreateResume? '升级会员即可查看': '创建模卡,免费查看';
|
||||||
|
// }, [productInfo, haveSeen]);
|
||||||
|
|
||||||
|
const handleRefresh = useCallback(async () => {
|
||||||
|
await getProductBalance(true);
|
||||||
|
}, [getProductBalance]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
Taro.eventCenter.on(EventName.CREATE_PROFILE, getProductBalance);
|
||||||
|
return () => {
|
||||||
|
Taro.eventCenter.off(EventName.CREATE_PROFILE);
|
||||||
|
};
|
||||||
|
}, [getProductBalance]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getProductBalance();
|
||||||
|
}, [getProductBalance]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getProductRecord();
|
||||||
|
}, [getProductRecord]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={`${PREFIX}__footer`}>
|
<div className={`${PREFIX}__footer`}>
|
||||||
<Button className={`${PREFIX}__share-button`} openType="share">
|
<Button className={`${PREFIX}__share-button`} openType="share">
|
||||||
分享
|
分享
|
||||||
</Button>
|
</Button>
|
||||||
<LoginButton className={`${PREFIX}__contact-publisher`} onClick={handleClickContact}>
|
<LoginButton
|
||||||
{data.isAuthed ? '在线沟通' : '立即联系'}
|
needRefresh
|
||||||
|
onRefresh={handleRefresh}
|
||||||
|
className={`${PREFIX}__contact-publisher`}
|
||||||
|
onClick={handleClickContact}
|
||||||
|
>
|
||||||
|
{data.isAuthed ? '在线沟通' : '查看联系方式'}
|
||||||
|
{needPhone ? (
|
||||||
|
<div className={`${PREFIX}__contact-publisher-tag`}>登录后可免费报单</div>
|
||||||
|
) : !productRecord && (data.isAuthed || productInfo?.content) ? (
|
||||||
|
<div className={`${PREFIX}__contact-publisher-tag`}>
|
||||||
|
{data.isAuthed ? '急招岗位可免费查看' : productInfo?.content}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</LoginButton>
|
</LoginButton>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{dialogVisible && <ProductJobDialog data={data} onClose={handleDialogHidden} />}
|
{showJobContactDialog && (
|
||||||
|
<ProductJobContactDialog
|
||||||
|
data={data}
|
||||||
|
productRecord={productRecord}
|
||||||
|
productInfo={productInfo}
|
||||||
|
onRefreshBalance={getProductBalance}
|
||||||
|
onClose={handleDialogClose}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{showMaterialGuide && (
|
{showMaterialGuide && (
|
||||||
<PrejobPopup onCancel={() => setShowMaterialGuide(false)} onConfirm={handleConfirmPrejob} />
|
<PrejobPopup
|
||||||
|
isCreateResume={productInfo?.isCreateResume}
|
||||||
|
onCancel={() => setShowMaterialGuide(false)}
|
||||||
|
onConfirm={handleConfirmPrejob}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
<CommonDialog
|
<CommonDialog
|
||||||
content={errorTips}
|
content={errorTips}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ const COMMENT_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-comme
|
|||||||
export default function BizService() {
|
export default function BizService() {
|
||||||
const inviteCode = useInviteCode();
|
const inviteCode = useInviteCode();
|
||||||
const cityOperators = useCityOperators();
|
const cityOperators = useCityOperators();
|
||||||
const [value, setValue] = useState('2');
|
const [value, setValue] = useState('0');
|
||||||
|
|
||||||
const handleClickDelegate = useCallback(() => {
|
const handleClickDelegate = useCallback(() => {
|
||||||
navigateTo(PageUrl.GroupDelegatePublish);
|
navigateTo(PageUrl.GroupDelegatePublish);
|
||||||
@ -80,7 +80,40 @@ export default function BizService() {
|
|||||||
<HomePage type={PageType.BatchPublish}>
|
<HomePage type={PageType.BatchPublish}>
|
||||||
<div className={PREFIX}>
|
<div className={PREFIX}>
|
||||||
<Tabs className={`${PREFIX}__tabs`} value={value} onChange={handleChange}>
|
<Tabs className={`${PREFIX}__tabs`} value={value} onChange={handleChange}>
|
||||||
<Tabs.TabPane value="0" title="群代发">
|
<Tabs.TabPane value="0" title="代招">
|
||||||
|
<div className={`${PREFIX}__recruitment`}>
|
||||||
|
<div className={`${PREFIX}__recruitment-card`}>
|
||||||
|
<div className={`${PREFIX}__recruitment-h5`}>服务城市</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>江、沪、皖-上海、南京、合肥</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>粤、闽-广州、深圳、佛山、厦门、福州、泉州</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>京、鲁-北京、青岛</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>鄂、豫、湘、陕-长沙、武汉、郑州、西安</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>川、渝、云-成都、重庆、昆明</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-h5`}>服务方式及收费标准</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>服务方式:提供录屏和基本资料供挑选,挑中安排面试</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>收费标准:安排一场面试200元</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>收费方式:预付费,按安排面试场数扣费</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-h5`}>服务能力</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-body`}>
|
||||||
|
我们在每个城市均有数量众多的主播群,少则几十个,多则上千个,有各种类型和层次的带货主播资源
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__recruitment-btn-group`}>
|
||||||
|
<Button className={`${PREFIX}__recruitment-btn`} onClick={handleOpenService}>
|
||||||
|
点此咨询
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane
|
||||||
|
value="1"
|
||||||
|
title={
|
||||||
|
<>
|
||||||
|
群代发
|
||||||
|
<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
>
|
||||||
<div className={`${PREFIX}__delegate`}>
|
<div className={`${PREFIX}__delegate`}>
|
||||||
<Image
|
<Image
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@ -109,15 +142,7 @@ export default function BizService() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane
|
<Tabs.TabPane value="2" title="主播群">
|
||||||
value="1"
|
|
||||||
title={
|
|
||||||
<>
|
|
||||||
主播群
|
|
||||||
<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<SearchCity
|
<SearchCity
|
||||||
onSelectCity={handleSelectCity}
|
onSelectCity={handleSelectCity}
|
||||||
currentCity={getCurrentCityCode()}
|
currentCity={getCurrentCityCode()}
|
||||||
@ -126,31 +151,6 @@ export default function BizService() {
|
|||||||
banner="点击城市名称,进本地通告群,免费招主播"
|
banner="点击城市名称,进本地通告群,免费招主播"
|
||||||
/>
|
/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane value="2" title="代招">
|
|
||||||
<div className={`${PREFIX}__recruitment`}>
|
|
||||||
<div className={`${PREFIX}__recruitment-card`}>
|
|
||||||
<div className={`${PREFIX}__recruitment-h5`}>服务城市</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>江、沪、皖-上海、南京、合肥</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>粤、闽-广州、深圳、佛山、厦门、福州、泉州</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>京、鲁-北京、青岛</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>鄂、豫、湘、陕-长沙、武汉、郑州、西安</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>川、渝、云-成都、重庆、昆明</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-h5`}>服务方式及收费标准</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>服务方式:提供录屏和基本资料供挑选,挑中安排面试</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>收费标准:安排一场面试200元</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>收费方式:预付费,按安排面试场数扣费</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-h5`}>服务能力</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-body`}>
|
|
||||||
我们在每个城市均有数量众多的主播群,少则几十个,多则上千个,有各种类型和层次的带货主播资源
|
|
||||||
</div>
|
|
||||||
<div className={`${PREFIX}__recruitment-btn-group`}>
|
|
||||||
<Button className={`${PREFIX}__recruitment-btn`} onClick={handleOpenService}>
|
|
||||||
点此咨询
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Tabs.TabPane>
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
</HomePage>
|
</HomePage>
|
||||||
|
|||||||
@ -8,13 +8,18 @@ export interface DeclarationTypeResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductInfo {
|
export interface ProductInfo {
|
||||||
productCode: ProductType;
|
// productCode: ProductType;
|
||||||
productId: ProductType;
|
// productId: ProductType;
|
||||||
|
|
||||||
balance: number;
|
balance: number;
|
||||||
created: number;
|
plaidBalance: number;
|
||||||
updated: number;
|
freeBalance: number;
|
||||||
isPaidVip?: boolean;
|
content: string;
|
||||||
// 报单类型信息,只有 use 接口返回值才有
|
created: string;
|
||||||
|
updated: string;
|
||||||
|
isPaidVip: boolean;
|
||||||
|
isCreateResume: boolean;
|
||||||
|
allowBuyProduct: boolean;
|
||||||
declarationTypeResult?: DeclarationTypeResult;
|
declarationTypeResult?: DeclarationTypeResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,3 +112,21 @@ export interface GetOrderInfoRequest {
|
|||||||
payOrderNo: string;
|
payOrderNo: string;
|
||||||
userId: string;
|
userId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductSpecResult {
|
||||||
|
productId: string;
|
||||||
|
productSpecId: ProductSpecId;
|
||||||
|
productType: ProductType;
|
||||||
|
productName: string;
|
||||||
|
title: string;
|
||||||
|
priceText: string;
|
||||||
|
expire: number;
|
||||||
|
payPrice: number; // 分
|
||||||
|
showPrice: number;
|
||||||
|
originalPrice: number;
|
||||||
|
badge: string;
|
||||||
|
contentSingle: string;
|
||||||
|
contentsJson: string;
|
||||||
|
sort: number;
|
||||||
|
createTime: string;
|
||||||
|
}
|
||||||
|
|||||||
@ -15,12 +15,10 @@ export const isDesktop = (() => {
|
|||||||
return info.platform === 'windows' || info.platform === 'mac';
|
return info.platform === 'windows' || info.platform === 'mac';
|
||||||
})();
|
})();
|
||||||
|
|
||||||
export const logWithPrefix = isDev()
|
export const logWithPrefix =
|
||||||
? (prefix: string) =>
|
(prefix: string) =>
|
||||||
(...args: BL.Anything[]) =>
|
(...args: BL.Anything[]) =>
|
||||||
console.log(`[${prefix}]`, ...args)
|
console.log(`[${prefix}]`, ...args);
|
||||||
: (_prefix: string) =>
|
|
||||||
(..._args: BL.Anything[]) => {};
|
|
||||||
|
|
||||||
export const safeJsonParse = <T = BL.Anything>(str: string, defaultValue: BL.Anything = {}): T => {
|
export const safeJsonParse = <T = BL.Anything>(str: string, defaultValue: BL.Anything = {}): T => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -15,7 +15,9 @@ import {
|
|||||||
CreatePayOrderParams,
|
CreatePayOrderParams,
|
||||||
GetOrderInfoRequest,
|
GetOrderInfoRequest,
|
||||||
OrderInfo,
|
OrderInfo,
|
||||||
|
ProductSpecResult,
|
||||||
} from '@/types/product';
|
} from '@/types/product';
|
||||||
|
import { buildUrl } from '@/utils/common';
|
||||||
import { getUserId } from '@/utils/user';
|
import { getUserId } from '@/utils/user';
|
||||||
|
|
||||||
export const isCancelPay = err => err?.errMsg === 'requestPayment:fail cancel';
|
export const isCancelPay = err => err?.errMsg === 'requestPayment:fail cancel';
|
||||||
@ -44,6 +46,11 @@ export async function requestProductUseRecord(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function requestProductTypeList(productType: ProductType) {
|
||||||
|
const list = await http.get<ProductSpecResult[]>(buildUrl(API.LIST_PRODUCT_TYPE, { productType }));
|
||||||
|
return list.sort((a, b) => a.sort - b.sort);
|
||||||
|
}
|
||||||
|
|
||||||
// 使用某一个产品
|
// 使用某一个产品
|
||||||
export async function requestUseProduct(
|
export async function requestUseProduct(
|
||||||
productCode: ProductType,
|
productCode: ProductType,
|
||||||
@ -54,13 +61,14 @@ export async function requestUseProduct(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取某个产品的剩余解锁次数
|
// 获取某个产品的剩余解锁次数
|
||||||
export async function requestProductBalance(productCode: ProductType): Promise<[number, boolean | undefined]> {
|
export async function requestProductBalance(productCode: ProductType): Promise<[number, ProductInfo]> {
|
||||||
const data: GetProductDetailRequest = { productCode, userId: getUserId() };
|
const data: GetProductDetailRequest = { productCode, userId: getUserId() };
|
||||||
const { balance, isPaidVip } = await http.post<ProductInfo>(API.GET_PRODUCT_DETAIL, {
|
const result = await http.post<ProductInfo>(API.GET_PRODUCT_DETAIL, {
|
||||||
data,
|
data,
|
||||||
contentType: 'application/x-www-form-urlencoded',
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
});
|
});
|
||||||
return [balance, isPaidVip];
|
|
||||||
|
return [result.balance, result];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否可以购买某一个产品
|
// 是否可以购买某一个产品
|
||||||
|
|||||||
Reference in New Issue
Block a user