Compare commits
15 Commits
d4fb682852
...
feat/3.7/i
| Author | SHA1 | Date | |
|---|---|---|---|
| 34e8a775e4 | |||
| c586e4b227 | |||
| 23879fe88d | |||
| 14853bcda2 | |||
| 365f3f6dd6 | |||
| f6cec5dd43 | |||
| dfa73624eb | |||
| 3f782b6be3 | |||
| e38114d32b | |||
| ec96058d5d | |||
| 4d3c57e88b | |||
| a1d2f29b9d | |||
| c696e93bc5 | |||
| e5facdff6a | |||
| 6c1e1cfd2d |
24
src/app.tsx
24
src/app.tsx
@ -15,6 +15,29 @@ import { requestUserInfo, updateLastLoginTime } from '@/utils/user';
|
|||||||
import './app.less';
|
import './app.less';
|
||||||
|
|
||||||
function App({ children }: PropsWithChildren<BL.Anything>) {
|
function App({ children }: PropsWithChildren<BL.Anything>) {
|
||||||
|
const checkBasicUpdate = () => {
|
||||||
|
if (process.env.TARO_ENV !== 'weapp' || !Taro.canIUse('getUpdateManager')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const manager = Taro.getUpdateManager();
|
||||||
|
manager.onCheckForUpdate(res => {
|
||||||
|
console.log('onCheckForUpdate', res);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 新版本下载完成
|
||||||
|
manager.onUpdateReady(() => {
|
||||||
|
Taro.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '新版本已经准备好,是否重启应用?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||||
|
manager.applyUpdate();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
useLaunch(async ({ query }) => {
|
useLaunch(async ({ query }) => {
|
||||||
console.log('App launched.');
|
console.log('App launched.');
|
||||||
await http.init(getInviteCodeFromQuery(query));
|
await http.init(getInviteCodeFromQuery(query));
|
||||||
@ -30,6 +53,7 @@ function App({ children }: PropsWithChildren<BL.Anything>) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useDidShow(options => {
|
useDidShow(options => {
|
||||||
|
checkBasicUpdate();
|
||||||
requestCityConfigs();
|
requestCityConfigs();
|
||||||
|
|
||||||
console.log(options);
|
console.log(options);
|
||||||
|
|||||||
22
src/components/invite-operations-banner/index.less
Normal file
22
src/components/invite-operations-banner/index.less
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@import '@/styles/variables.less';
|
||||||
|
@import '@/styles/common.less';
|
||||||
|
|
||||||
|
.invite-operations-fragment-banner {
|
||||||
|
width: 100%;
|
||||||
|
height: 90px;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
|
||||||
|
&__image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__close {
|
||||||
|
width: 64px;
|
||||||
|
height: 38px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
40
src/components/invite-operations-banner/index.tsx
Normal file
40
src/components/invite-operations-banner/index.tsx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { Image } from '@tarojs/components';
|
||||||
|
|
||||||
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
import { PageUrl } from '@/constants/app';
|
||||||
|
import { getPartnerBannerClose, setPartnerBannerClose } from '@/utils/partner';
|
||||||
|
import { navigateTo } from '@/utils/route';
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
|
const PREFIX = 'invite-operations-fragment-banner';
|
||||||
|
|
||||||
|
export default function InviteOperationsBanner() {
|
||||||
|
const [bannerClose, setBannerClose] = useState<boolean>(getPartnerBannerClose());
|
||||||
|
|
||||||
|
const handlePartnerBannerClose = useCallback(e => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
setBannerClose(true);
|
||||||
|
setPartnerBannerClose();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = useCallback(async () => {
|
||||||
|
navigateTo(PageUrl.InviteOperations);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
if (bannerClose) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={PREFIX} onClick={handleClick}>
|
||||||
|
<Image
|
||||||
|
className={`${PREFIX}__image`}
|
||||||
|
src="https://publiccdn.neighbourhood.com.cn/img/invite-operations-banner.png"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
<div className={`${PREFIX}__close`} onClick={handlePartnerBannerClose} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -34,7 +34,7 @@ function GoBatchTag({ cityCode, jobId }: { cityCode: string; jobId: JobManageInf
|
|||||||
e => {
|
e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
navigateTo(PageUrl.GroupDelegatePublish, { cityCode, jobId });
|
navigateTo(PageUrl.AccelerateDelegatePublish, { cityCode, jobId });
|
||||||
},
|
},
|
||||||
[cityCode, jobId]
|
[cityCode, jobId]
|
||||||
);
|
);
|
||||||
|
|||||||
@ -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 (
|
||||||
|
|||||||
@ -146,25 +146,6 @@ export default function PartnerIntro() {
|
|||||||
</Swiper>
|
</Swiper>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={`${PREFIX}__block`}>
|
|
||||||
<div className={`${PREFIX}__title`}>
|
|
||||||
群主认证
|
|
||||||
<div className={`${PREFIX}__recommend`}>
|
|
||||||
<GoodJob />
|
|
||||||
强烈推荐
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className={`${PREFIX}__card ${PREFIX}__special`}>
|
|
||||||
<div className={`${PREFIX}__body`}>
|
|
||||||
<div className="center">
|
|
||||||
完成群主认证后,群成员通过该群访问任何人分享的播络小程序进行注册,你都能获得分成
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Button className={`${PREFIX}__service`} onClick={handleConfirm}>
|
|
||||||
立即认证
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className={`${PREFIX}__block`}>
|
<div className={`${PREFIX}__block`}>
|
||||||
<div className={`${PREFIX}__title`}>3重收益</div>
|
<div className={`${PREFIX}__title`}>3重收益</div>
|
||||||
<div className={`${PREFIX}__card`}>
|
<div className={`${PREFIX}__card`}>
|
||||||
@ -194,6 +175,25 @@ export default function PartnerIntro() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className={`${PREFIX}__block`}>
|
||||||
|
<div className={`${PREFIX}__title`}>
|
||||||
|
群主认证
|
||||||
|
<div className={`${PREFIX}__recommend`}>
|
||||||
|
<GoodJob />
|
||||||
|
强烈推荐
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__card ${PREFIX}__special`}>
|
||||||
|
<div className={`${PREFIX}__body`}>
|
||||||
|
<div className="center">
|
||||||
|
完成群主认证后,群成员通过该群访问任何人分享的播络小程序进行注册,你都能获得分成
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Button className={`${PREFIX}__service`} onClick={handleConfirm}>
|
||||||
|
立即认证
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className={`${PREFIX}__block`}>
|
<div className={`${PREFIX}__block`}>
|
||||||
<div className={`${PREFIX}__title`}>交流群</div>
|
<div className={`${PREFIX}__title`}>交流群</div>
|
||||||
<div className={`${PREFIX}__card ${PREFIX}__special`}>
|
<div className={`${PREFIX}__card ${PREFIX}__special`}>
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import SafeBottomPadding from '@/components/safe-bottom-padding';
|
|||||||
import { PageUrl } from '@/constants/app';
|
import { PageUrl } from '@/constants/app';
|
||||||
import { CacheKey } from '@/constants/cache-key';
|
import { CacheKey } from '@/constants/cache-key';
|
||||||
import { GET_CONTACT_TYPE } from '@/constants/job';
|
import { GET_CONTACT_TYPE } from '@/constants/job';
|
||||||
import { switchTab, navigateTo } from '@/utils/route';
|
import { navigateTo, switchTab } from '@/utils/route';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
@ -35,12 +35,19 @@ const GET_CONTACT_TYPE_OPTIONS = [
|
|||||||
desc: '开通会员每天免费查看',
|
desc: '开通会员每天免费查看',
|
||||||
btnText: '开通',
|
btnText: '开通',
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// type: GET_CONTACT_TYPE.GROUP,
|
||||||
|
// icon: 'https://publiccdn.neighbourhood.com.cn/img/group-avatar.png',
|
||||||
|
// title: '进群领会员(免费报单)',
|
||||||
|
// desc: '群内定期发放会员,免费报单',
|
||||||
|
// btnText: '进群',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
type: GET_CONTACT_TYPE.GROUP,
|
type: GET_CONTACT_TYPE.INVITE,
|
||||||
icon: 'https://publiccdn.neighbourhood.com.cn/img/group-avatar.png',
|
icon: 'https://publiccdn.neighbourhood.com.cn/img/invite-operations.png',
|
||||||
title: '进群领会员(免费报单)',
|
title: '邀请运营进群(送会员)',
|
||||||
desc: '群内定期发放会员,免费报单',
|
desc: '每邀请进一个主播群送一个日会员',
|
||||||
btnText: '进群',
|
btnText: '邀请',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -53,6 +60,10 @@ export function PrejobPopup({ onCancel, isCreateResume, onConfirm }: IProps) {
|
|||||||
navigateTo(PageUrl.MaterialUploadVideo);
|
navigateTo(PageUrl.MaterialUploadVideo);
|
||||||
onConfirm(type);
|
onConfirm(type);
|
||||||
}
|
}
|
||||||
|
if (type === GET_CONTACT_TYPE.INVITE) {
|
||||||
|
navigateTo(PageUrl.InviteOperations);
|
||||||
|
onConfirm(type);
|
||||||
|
}
|
||||||
if (type === GET_CONTACT_TYPE.VIP) {
|
if (type === GET_CONTACT_TYPE.VIP) {
|
||||||
setOpenPopup(false);
|
setOpenPopup(false);
|
||||||
setOpenDialog(true);
|
setOpenDialog(true);
|
||||||
|
|||||||
@ -1,106 +0,0 @@
|
|||||||
import Taro from '@tarojs/taro';
|
|
||||||
|
|
||||||
import { Dialog } from '@taroify/core';
|
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
||||||
|
|
||||||
import { DialogStatus, PREFIX } from '@/components/product-dialog/const';
|
|
||||||
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 { EventName } from '@/constants/app';
|
|
||||||
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;
|
|
||||||
productRecord?: GetProductIsUnlockResponse;
|
|
||||||
productInfo?: ProductInfo;
|
|
||||||
onClose: () => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
const PRODUCT_CODE = ProductType.VIP;
|
|
||||||
const log = logWithPrefix('product-contact-dialog');
|
|
||||||
|
|
||||||
function ProductContactDialog(props: Omit<IProps, 'visible'>) {
|
|
||||||
const { data, productInfo: productInfoProps, productRecord, onClose } = props;
|
|
||||||
const [status, setStatus] = useState<DialogStatus>(DialogStatus.LOADING);
|
|
||||||
const [publisherAcctNo, setPublisherAcctNo] = useState<string>('');
|
|
||||||
const initRef = useRef(() => {});
|
|
||||||
|
|
||||||
const handleCloseDialog = useCallback(() => {
|
|
||||||
onClose();
|
|
||||||
}, [onClose]);
|
|
||||||
|
|
||||||
const handleReport = useCallback(() => {
|
|
||||||
log('report', data.id);
|
|
||||||
}, [data]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
Taro.showLoading();
|
|
||||||
// if (1 < 2) {
|
|
||||||
// setStatus(DialogStatus.JOB_CONTACT_CS);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
log('requestProductUseRecord result', productRecord);
|
|
||||||
if (productRecord) {
|
|
||||||
handleContact(productRecord.declarationTypeResult);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!productInfoProps?.balance) {
|
|
||||||
setStatus(DialogStatus.JOB_UNABLE_UNLOCK);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const productInfo = await requestUseProduct(PRODUCT_CODE, { jobId: data.id });
|
|
||||||
Taro.eventCenter.trigger(EventName.READ_CONTACT);
|
|
||||||
console.log('开始报单', productInfo);
|
|
||||||
handleContact(productInfo ? productInfo.declarationTypeResult : undefined);
|
|
||||||
} catch (e) {
|
|
||||||
Toast.error('出错了,请重试');
|
|
||||||
console.log(e);
|
|
||||||
handleCloseDialog();
|
|
||||||
} finally {
|
|
||||||
Taro.hideLoading();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}, [data, handleCloseDialog, productRecord, productInfoProps?.balance]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
initRef.current();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (status === DialogStatus.LOADING) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Dialog className={PREFIX} onClose={onClose} open>
|
|
||||||
<Dialog.Content>
|
|
||||||
{status === DialogStatus.JOB_CONTACT_CS && <ContactCustomerService onAfterConfirm={handleCloseDialog} />}
|
|
||||||
{status === DialogStatus.JOB_CONTACT_DIRECT && (
|
|
||||||
<ContactDirect publisherAcctNo={publisherAcctNo} onAfterConfirm={handleCloseDialog} onReport={handleReport} />
|
|
||||||
)}
|
|
||||||
{status === DialogStatus.JOB_UNABLE_UNLOCK && <UnableUnlockContent onConfirm={handleCloseDialog} />}
|
|
||||||
</Dialog.Content>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default ProductContactDialog;
|
|
||||||
@ -2,7 +2,6 @@
|
|||||||
@import '@/styles/variables.less';
|
@import '@/styles/variables.less';
|
||||||
|
|
||||||
.product-dialog {
|
.product-dialog {
|
||||||
|
|
||||||
.layout() {
|
.layout() {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -31,7 +30,7 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 72px;
|
line-height: 72px;
|
||||||
border-radius: 44px;
|
border-radius: 44px;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
background: @blHighlightColor;
|
background: @blHighlightColor;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
@ -42,7 +41,7 @@
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
color: @blHighlightColor;
|
color: @blHighlightColor;
|
||||||
background: #6D3DF514;
|
background: #6d3df514;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 32px 72px;
|
padding: 32px 72px;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
@ -73,7 +72,7 @@
|
|||||||
|
|
||||||
&__describe {
|
&__describe {
|
||||||
.describe-font();
|
.describe-font();
|
||||||
margin-top: 24px
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
@ -173,8 +172,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
border-color: #E0E0E0;
|
border-color: #e0e0e0;
|
||||||
background: #F7F7F7;
|
background: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
@ -237,9 +236,7 @@
|
|||||||
color: @blHighlightColor;
|
color: @blHighlightColor;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================= 群 ================================================= //
|
// ============================================= 群 ================================================= //
|
||||||
@ -323,7 +320,7 @@
|
|||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 2px solid #E0E0E0;
|
border: 2px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__qr-code__step-title {
|
&__qr-code__step-title {
|
||||||
@ -338,7 +335,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #E0E0E0;
|
background: #e0e0e0;
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
margin-left: 18px;
|
margin-left: 18px;
|
||||||
}
|
}
|
||||||
@ -365,7 +362,7 @@
|
|||||||
.divider {
|
.divider {
|
||||||
width: 540px;
|
width: 540px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: #E0E0E0;
|
background: #e0e0e0;
|
||||||
margin: 40px 0;
|
margin: 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +414,7 @@
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
color: @blHighlightColor
|
color: @blHighlightColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,7 +520,6 @@
|
|||||||
.button();
|
.button();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ============================================= 发布通告的企业会员 ================================================= //
|
// ============================================= 发布通告的企业会员 ================================================= //
|
||||||
&__publish-job-buy__header {
|
&__publish-job-buy__header {
|
||||||
.header-font();
|
.header-font();
|
||||||
@ -576,21 +572,21 @@
|
|||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 230px;
|
width: 182px;
|
||||||
height: 156px;
|
height: 156px;
|
||||||
.flex-column();
|
.flex-column();
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 2px solid @blHighlightColor;
|
border: 2px solid @blHighlightColor;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-right: 24px;
|
margin-right: 15px;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
border-color: #E0E0E0;
|
border-color: #e0e0e0;
|
||||||
background: #F7F7F7;
|
background: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
@ -635,11 +631,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__left-line {
|
&__left-line {
|
||||||
background: linear-gradient(270deg, #E0E0E0 0%, #FFFFFF 100%);
|
background: linear-gradient(270deg, #e0e0e0 0%, #ffffff 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__right-line {
|
&__right-line {
|
||||||
background: linear-gradient(90deg, #E0E0E0 0%, #FFFFFF 100%);
|
background: linear-gradient(90deg, #e0e0e0 0%, #ffffff 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
@ -680,5 +676,4 @@
|
|||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
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;
|
||||||
@ -9,10 +9,10 @@ import { PREFIX } from '@/components/product-dialog/const';
|
|||||||
import { CollectEventName, ReportEventId } from '@/constants/event';
|
import { CollectEventName, ReportEventId } from '@/constants/event';
|
||||||
import { OrderStatus, OrderType, ProductSpecId, ProductType } from '@/constants/product';
|
import { OrderStatus, OrderType, ProductSpecId, 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, reportEvent } from '@/utils/event';
|
import { collectEvent, reportEvent } from '@/utils/event';
|
||||||
import {
|
import {
|
||||||
getOrderPrice,
|
|
||||||
isCancelPay,
|
isCancelPay,
|
||||||
requestCreatePayInfo,
|
requestCreatePayInfo,
|
||||||
requestOrderInfo,
|
requestOrderInfo,
|
||||||
@ -21,7 +21,6 @@ import {
|
|||||||
} from '@/utils/product';
|
} 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;
|
||||||
@ -161,7 +160,7 @@ export default function CompanyPublishJobBuy(props: IProps) {
|
|||||||
<div
|
<div
|
||||||
key={item.payPrice}
|
key={item.payPrice}
|
||||||
className={classNames(`${PREFIX}__company-publish-job-buy__item`, {
|
className={classNames(`${PREFIX}__company-publish-job-buy__item`, {
|
||||||
selected: selectItem && item.payPrice === selectItem.payPrice,
|
selected: selectItem && item.id === selectItem.id,
|
||||||
disabled: item.payPrice === 0,
|
disabled: item.payPrice === 0,
|
||||||
})}
|
})}
|
||||||
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
||||||
|
|||||||
@ -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';
|
||||||
@ -136,26 +136,40 @@ export default function JobBuy(props: IProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${PREFIX}__job-buy`}>
|
<div className={`${PREFIX}__job-buy`}>
|
||||||
<div className={`${PREFIX}__job-buy__header`}>
|
{isCreateResume ? (
|
||||||
<div>免费查看次数已用完</div>
|
<Fragment>
|
||||||
<div className="highlight">请升级会员</div>
|
<div className={`${PREFIX}__job-buy__header`}>
|
||||||
</div>
|
<div>今日免费查看次数</div>
|
||||||
{!isCreateResume && (
|
<div className="highlight">已用完</div>
|
||||||
<div className={`${PREFIX}__job-buy__describe`}>
|
|
||||||
<div>完善模卡</div>
|
|
||||||
<div> 赠5次查看 </div>
|
|
||||||
<div className="highlight" onClick={handleResume}>
|
|
||||||
去完善
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className={`${PREFIX}__job-buy__describe`}>
|
||||||
|
<div>请</div>
|
||||||
|
<div className="highlight">明日</div>
|
||||||
|
<div>再来</div>
|
||||||
|
<div> 或 </div>
|
||||||
|
<div className="highlight">升级会员</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`}>
|
||||||
{productList.map(item => {
|
{productList.map(item => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={item.payPrice}
|
key={item.id}
|
||||||
className={classNames(`${PREFIX}__job-buy__item`, {
|
className={classNames(`${PREFIX}__job-buy__item`, {
|
||||||
selected: selectItem && item.payPrice === selectItem.payPrice,
|
selected: selectItem && item.id === selectItem.id,
|
||||||
disabled: item.payPrice === 0,
|
disabled: item.payPrice === 0,
|
||||||
})}
|
})}
|
||||||
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
onClick={item.payPrice === 0 ? undefined : () => handleClickItem(item)}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import PageLoading from '@/components/page-loading';
|
|||||||
import { PublishJobQrCodeDialog } from '@/components/product-dialog/publish-job';
|
import { PublishJobQrCodeDialog } from '@/components/product-dialog/publish-job';
|
||||||
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 SafeBottomPadding from '@/components/safe-bottom-padding';
|
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||||
import { ISelectOption } from '@/components/select';
|
import { ISelectOption, PopupSelect } from '@/components/select';
|
||||||
import { PageUrl } from '@/constants/app';
|
import { PageUrl } from '@/constants/app';
|
||||||
import { JobManageStatus } from '@/constants/job';
|
import { JobManageStatus } from '@/constants/job';
|
||||||
import { OrderStatus, OrderType, ProductSpecId, ProductType } from '@/constants/product';
|
import { OrderStatus, OrderType, ProductSpecId, ProductType } from '@/constants/product';
|
||||||
@ -77,16 +77,23 @@ const calcPrice = (city: CityValue | null) => {
|
|||||||
const productSpecId = GROUP_OPTIONS.find(o => o.value === count)?.productSpecId || ProductSpecId.GroupBatchPublish20;
|
const productSpecId = GROUP_OPTIONS.find(o => o.value === count)?.productSpecId || ProductSpecId.GroupBatchPublish20;
|
||||||
return { price, originalPrice, productSpecId };
|
return { price, originalPrice, productSpecId };
|
||||||
};
|
};
|
||||||
|
const cityOptions: CityOption[] = cityValues.map(value => ({ value, label: value.cityName }));
|
||||||
export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string; jobId: string }) {
|
export default function UserBatchPublish({ cityCode, jobId }: { cityCode?: string; jobId?: string }) {
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [showQrCode, setShowQrCode] = useState(false);
|
const [showQrCode, setShowQrCode] = useState(false);
|
||||||
|
const [selectable, setSelectable] = useState(false);
|
||||||
|
const [showCitySelect, setShowCitySelect] = useState(false);
|
||||||
const [city, setCity] = useState<CityOption['value'] | null>(null);
|
const [city, setCity] = useState<CityOption['value'] | null>(null);
|
||||||
const { price, originalPrice, productSpecId } = calcPrice(city);
|
const { price, originalPrice, productSpecId } = calcPrice(city);
|
||||||
const [showPublishJob, setShowPublishJob] = useState(false);
|
const [showPublishJob, setShowPublishJob] = useState(false);
|
||||||
|
|
||||||
const [showBuy, setShowBuy, handlePublishJob] = usePublishJob(jobId);
|
const [showBuy, setShowBuy, handlePublishJob] = usePublishJob(jobId);
|
||||||
|
const handleClickCity = useCallback(() => setShowCitySelect(true), []);
|
||||||
|
|
||||||
|
const handleSelectCity = useCallback(value => {
|
||||||
|
setCity(value);
|
||||||
|
setShowCitySelect(false);
|
||||||
|
}, []);
|
||||||
const handleClickViewGroup = useCallback(() => navigateTo(PageUrl.GroupList, { city: city?.cityCode }), [city]);
|
const handleClickViewGroup = useCallback(() => navigateTo(PageUrl.GroupList, { city: city?.cityCode }), [city]);
|
||||||
|
|
||||||
const handleClickBuy = useCallback(async () => {
|
const handleClickBuy = useCallback(async () => {
|
||||||
@ -108,12 +115,14 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const jobDetail = await requestJobDetail(jobId);
|
if (jobId && cityCode) {
|
||||||
|
const jobDetail = await requestJobDetail(jobId);
|
||||||
|
|
||||||
if (jobDetail.status !== JobManageStatus.Open) {
|
if (jobDetail.status !== JobManageStatus.Open) {
|
||||||
Taro.hideLoading();
|
Taro.hideLoading();
|
||||||
setShowPublishJob(true);
|
setShowPublishJob(true);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
||||||
@ -146,11 +155,13 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
|||||||
}, [jobId, price, productSpecId]);
|
}, [jobId, price, productSpecId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!cityCode) {
|
// if (!cityCode) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
try {
|
try {
|
||||||
const initCity = cityValues.find(o => o.cityCode === cityCode);
|
const initCity = cityCode ? cityValues.find(o => o.cityCode === cityCode) : cityValues[0];
|
||||||
|
|
||||||
|
setSelectable(!cityCode);
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
if (initCity) {
|
if (initCity) {
|
||||||
@ -174,8 +185,18 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
|||||||
<div className={`${PREFIX}__illustrate`}>
|
<div className={`${PREFIX}__illustrate`}>
|
||||||
服务方式:帮您把招聘需求<div className="underline">发到本地主播群,投递量大幅增加</div>
|
服务方式:帮您把招聘需求<div className="underline">发到本地主播群,投递量大幅增加</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`${PREFIX}__title`}>当前通告城市</div>
|
{selectable ? (
|
||||||
<Cell align="center" className={`${PREFIX}__cell`} title={city ? city.cityName : '暂不支持代发'} />
|
<Fragment>
|
||||||
|
<div className={`${PREFIX}__title`}>请选择城市</div>
|
||||||
|
<Cell isLink align="center" className={`${PREFIX}__cell`} title={city?.cityName} onClick={handleClickCity} />
|
||||||
|
</Fragment>
|
||||||
|
) : (
|
||||||
|
<Fragment>
|
||||||
|
<div className={`${PREFIX}__title`}>当前通告城市</div>
|
||||||
|
<Cell align="center" className={`${PREFIX}__cell`} title={city ? city.cityName : '暂不支持代发'} />
|
||||||
|
</Fragment>
|
||||||
|
)}
|
||||||
|
|
||||||
{city && (
|
{city && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className={`${PREFIX}__extra`} onClick={handleClickViewGroup}>
|
<div className={`${PREFIX}__extra`} onClick={handleClickViewGroup}>
|
||||||
@ -196,6 +217,13 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
|||||||
)}
|
)}
|
||||||
<SafeBottomPadding />
|
<SafeBottomPadding />
|
||||||
<div>
|
<div>
|
||||||
|
<PopupSelect
|
||||||
|
value={city}
|
||||||
|
options={cityOptions}
|
||||||
|
open={showCitySelect}
|
||||||
|
onSelect={handleSelectCity}
|
||||||
|
onClose={() => setShowCitySelect(false)}
|
||||||
|
/>
|
||||||
<PublishJobQrCodeDialog onClose={() => setShowQrCode(false)} open={showQrCode} />
|
<PublishJobQrCodeDialog onClose={() => setShowQrCode(false)} open={showQrCode} />
|
||||||
<Dialog open={showBuy} onClose={() => setShowBuy(false)}>
|
<Dialog open={showBuy} onClose={() => setShowBuy(false)}>
|
||||||
<Dialog.Content>
|
<Dialog.Content>
|
||||||
|
|||||||
@ -37,6 +37,7 @@ export enum OpenSource {
|
|||||||
AnchorPage = 'anchor_page',
|
AnchorPage = 'anchor_page',
|
||||||
MaterialViewPage = 'material_view_page',
|
MaterialViewPage = 'material_view_page',
|
||||||
GroupOwnerCertificate = 'group_owner_certificate',
|
GroupOwnerCertificate = 'group_owner_certificate',
|
||||||
|
InviteOperations = 'invite_operations',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PageUrl {
|
export enum PageUrl {
|
||||||
@ -78,9 +79,11 @@ export enum PageUrl {
|
|||||||
Partner = 'pages/partner/index',
|
Partner = 'pages/partner/index',
|
||||||
WithdrawRecord = 'pages/withdraw-record/index',
|
WithdrawRecord = 'pages/withdraw-record/index',
|
||||||
GroupDelegatePublish = 'pages/group-delegate-publish/index',
|
GroupDelegatePublish = 'pages/group-delegate-publish/index',
|
||||||
|
AccelerateDelegatePublish = 'pages/accelerate-delegate-publish/index',
|
||||||
GiveVip = 'pages/give-vip/index',
|
GiveVip = 'pages/give-vip/index',
|
||||||
GroupOwnerCertificate = 'pages/group-owner-certification/index',
|
GroupOwnerCertificate = 'pages/group-owner-certification/index',
|
||||||
PartnerShareVip = 'pages/partner-share-vip/index',
|
PartnerShareVip = 'pages/partner-share-vip/index',
|
||||||
|
InviteOperations = 'pages/invite-operations/index',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PluginUrl {
|
export enum PluginUrl {
|
||||||
|
|||||||
@ -214,4 +214,5 @@ export enum GET_CONTACT_TYPE {
|
|||||||
VIP = 'vip',
|
VIP = 'vip',
|
||||||
MATERIAL = 'material',
|
MATERIAL = 'material',
|
||||||
GROUP = 'group',
|
GROUP = 'group',
|
||||||
|
INVITE = 'invite',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { useCallback, useEffect, useState } from 'react';
|
|||||||
import EmployTypeSelect from '@/components/employ-type-select';
|
import EmployTypeSelect from '@/components/employ-type-select';
|
||||||
import JobList, { IJobListProps } from '@/components/job-list';
|
import JobList, { IJobListProps } from '@/components/job-list';
|
||||||
import Overlay from '@/components/overlay';
|
import Overlay from '@/components/overlay';
|
||||||
import PartnerBanner from '@/components/partner-banner';
|
// import PartnerBanner from '@/components/partner-banner';
|
||||||
import SalarySelect from '@/components/salary-select';
|
import SalarySelect from '@/components/salary-select';
|
||||||
import SearchInput from '@/components/search';
|
import SearchInput from '@/components/search';
|
||||||
import { APP_TAB_BAR_ID, PageUrl } from '@/constants/app';
|
import { APP_TAB_BAR_ID, PageUrl } from '@/constants/app';
|
||||||
@ -30,6 +30,7 @@ import { Coordinate } from '@/types/location';
|
|||||||
import { logWithPrefix } from '@/utils/common';
|
import { logWithPrefix } from '@/utils/common';
|
||||||
import { navigateTo } from '@/utils/route';
|
import { navigateTo } from '@/utils/route';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
import InviteOperationsBanner from '@/components/invite-operations-banner';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
cityCode: string;
|
cityCode: string;
|
||||||
@ -173,7 +174,8 @@ function JobFragment(props: IProps) {
|
|||||||
<Tabs className={`${PREFIX}__type-tabs`} value={tabType} onChange={onTypeChange}>
|
<Tabs className={`${PREFIX}__type-tabs`} value={tabType} onChange={onTypeChange}>
|
||||||
{JOB_TABS.map(tab => (
|
{JOB_TABS.map(tab => (
|
||||||
<Tabs.TabPane title={tab.title} key={tab.type} value={tab.type}>
|
<Tabs.TabPane title={tab.title} key={tab.type} value={tab.type}>
|
||||||
<PartnerBanner />
|
{/*<PartnerBanner />*/}
|
||||||
|
<InviteOperationsBanner />
|
||||||
<ListWrapper
|
<ListWrapper
|
||||||
category={tab.type}
|
category={tab.type}
|
||||||
cityCode={cityCode}
|
cityCode={cityCode}
|
||||||
|
|||||||
@ -17,4 +17,25 @@
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__recommend {
|
||||||
|
display: inline-flex;
|
||||||
|
line-height: 36px;
|
||||||
|
padding: 0 8px;
|
||||||
|
height: 36px;
|
||||||
|
background: rgb(255, 80, 81);
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #fff;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
position: absolute;
|
||||||
|
left: 208px;
|
||||||
|
top: 8px;
|
||||||
|
width: 128px;
|
||||||
|
|
||||||
|
&-cell {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Image } from '@tarojs/components';
|
import { Image } from '@tarojs/components';
|
||||||
|
|
||||||
import { Cell } from '@taroify/core';
|
import { Cell } from '@taroify/core';
|
||||||
|
import { GoodJob } from '@taroify/icons';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import MaterialCard from '@/components/material-card';
|
import MaterialCard from '@/components/material-card';
|
||||||
@ -18,6 +19,8 @@ export default function AnchorFragment() {
|
|||||||
|
|
||||||
const handleClickSwitch = useCallback(() => switchRoleType(RoleType.Company), []);
|
const handleClickSwitch = useCallback(() => switchRoleType(RoleType.Company), []);
|
||||||
|
|
||||||
|
const handleClickInviteOperations = useCallback(() => navigateTo(PageUrl.InviteOperations), []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={PREFIX}>
|
<div className={PREFIX}>
|
||||||
<MaterialCard />
|
<MaterialCard />
|
||||||
@ -29,6 +32,21 @@ export default function AnchorFragment() {
|
|||||||
className={`${PREFIX}__cell`}
|
className={`${PREFIX}__cell`}
|
||||||
onClick={handleClickMyDeclaration}
|
onClick={handleClickMyDeclaration}
|
||||||
/>
|
/>
|
||||||
|
<Cell
|
||||||
|
isLink
|
||||||
|
align="center"
|
||||||
|
title={
|
||||||
|
<div className={`${PREFIX}__recommend-cell`}>
|
||||||
|
免费领主播会员
|
||||||
|
<div className={`${PREFIX}__recommend`}>
|
||||||
|
<GoodJob />
|
||||||
|
强烈推荐
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
className={`${PREFIX}__cell`}
|
||||||
|
onClick={handleClickInviteOperations}
|
||||||
|
/>
|
||||||
<Image
|
<Image
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
className={`${PREFIX}__switch-to-company`}
|
className={`${PREFIX}__switch-to-company`}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const CompanyTabs: TabItemType[] = [
|
|||||||
{
|
{
|
||||||
type: PageType.BatchPublish,
|
type: PageType.BatchPublish,
|
||||||
pagePath: PageUrl.UserBatchPublish,
|
pagePath: PageUrl.UserBatchPublish,
|
||||||
text: '代招',
|
text: '代发代招',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -101,6 +101,8 @@ export const APP_CONFIG: AppConfigType = {
|
|||||||
PageUrl.GiveVip,
|
PageUrl.GiveVip,
|
||||||
PageUrl.GroupOwnerCertificate,
|
PageUrl.GroupOwnerCertificate,
|
||||||
PageUrl.PartnerShareVip,
|
PageUrl.PartnerShareVip,
|
||||||
|
PageUrl.InviteOperations,
|
||||||
|
PageUrl.AccelerateDelegatePublish,
|
||||||
// PageUrl.DevDebug,
|
// PageUrl.DevDebug,
|
||||||
],
|
],
|
||||||
window: {
|
window: {
|
||||||
|
|||||||
@ -15,11 +15,15 @@ import { postPublishJob } from '@/utils/job';
|
|||||||
import { navigateTo } from '@/utils/route';
|
import { navigateTo } from '@/utils/route';
|
||||||
import Toast from '@/utils/toast';
|
import Toast from '@/utils/toast';
|
||||||
|
|
||||||
export const usePublishJob = (jobId: string): [boolean, Dispatch<SetStateAction<boolean>>, () => Promise<void>] => {
|
export const usePublishJob = (jobId?: string): [boolean, Dispatch<SetStateAction<boolean>>, () => Promise<void>] => {
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
const [showBuy, setShowBuy] = useState(false);
|
const [showBuy, setShowBuy] = useState(false);
|
||||||
|
|
||||||
const handlePublishJob = useCallback(async () => {
|
const handlePublishJob = useCallback(async () => {
|
||||||
|
if (!jobId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (userInfo.bossAuthStatus !== CertificationStatusType.Success) {
|
if (userInfo.bossAuthStatus !== CertificationStatusType.Success) {
|
||||||
store.dispatch(cacheJobId(jobId));
|
store.dispatch(cacheJobId(jobId));
|
||||||
@ -36,8 +40,8 @@ export const usePublishJob = (jobId: string): [boolean, Dispatch<SetStateAction<
|
|||||||
Taro.hideLoading();
|
Taro.hideLoading();
|
||||||
const e = error as HttpError;
|
const e = error as HttpError;
|
||||||
const errorCode = e.errorCode;
|
const errorCode = e.errorCode;
|
||||||
const errorMsg = e.info?.() || e.message;
|
const errorMsg = e.errorMsg || e.info?.() || e.message;
|
||||||
collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: e.info?.() || e.message });
|
collectEvent(CollectEventName.PUBLISH_OPEN_JOB_FAILED, { jobId, error: errorMsg });
|
||||||
if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_FREE_BALANCE) {
|
if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_FREE_BALANCE) {
|
||||||
setShowBuy(true);
|
setShowBuy(true);
|
||||||
} else if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_BALANCE) {
|
} else if (errorCode === RESPONSE_ERROR_CODE.INSUFFICIENT_BALANCE) {
|
||||||
@ -46,7 +50,7 @@ export const usePublishJob = (jobId: string): [boolean, Dispatch<SetStateAction<
|
|||||||
} else if (errorCode === RESPONSE_ERROR_CODE.BOSS_VIP_EXPIRED) {
|
} else if (errorCode === RESPONSE_ERROR_CODE.BOSS_VIP_EXPIRED) {
|
||||||
Toast.info('该通告已到期,请创建新通告', 3000);
|
Toast.info('该通告已到期,请创建新通告', 3000);
|
||||||
} else {
|
} else {
|
||||||
Toast.error(errorMsg || '发布失败请重试', 3000);
|
Toast.info(errorMsg || '发布失败请重试', 3000);
|
||||||
}
|
}
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@ export enum RESPONSE_ERROR_CODE {
|
|||||||
INSUFFICIENT_FREE_BALANCE = 'INSUFFICIENT_FREE_BALANCE', // 免费查看次数(未购买会员)超限
|
INSUFFICIENT_FREE_BALANCE = 'INSUFFICIENT_FREE_BALANCE', // 免费查看次数(未购买会员)超限
|
||||||
BOSS_VIP_EXPIRED = 'BOSS_VIP_EXPIRED', // 会员过期
|
BOSS_VIP_EXPIRED = 'BOSS_VIP_EXPIRED', // 会员过期
|
||||||
CHAT_MSG_SEND_NOT_ALLOW = 'CHAT_MSG_SEND_NOT_ALLOW',
|
CHAT_MSG_SEND_NOT_ALLOW = 'CHAT_MSG_SEND_NOT_ALLOW',
|
||||||
|
JOB_EXIST_ONE_PUBLISHED = 'JOB_EXIST_ONE_PUBLISHED',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RESPONSE_ERROR_INFO: { [key in RESPONSE_ERROR_CODE]?: string } = {
|
export const RESPONSE_ERROR_INFO: { [key in RESPONSE_ERROR_CODE]?: string } = {
|
||||||
|
|||||||
3
src/pages/accelerate-delegate-publish/index.config.ts
Normal file
3
src/pages/accelerate-delegate-publish/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
navigationBarTitleText: '加速招聘',
|
||||||
|
});
|
||||||
0
src/pages/accelerate-delegate-publish/index.less
Normal file
0
src/pages/accelerate-delegate-publish/index.less
Normal file
25
src/pages/accelerate-delegate-publish/index.tsx
Normal file
25
src/pages/accelerate-delegate-publish/index.tsx
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { useLoad } from '@tarojs/taro';
|
||||||
|
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
import UserBatchPublish from '@/components/user-batch-publish';
|
||||||
|
import { getPageQuery } from '@/utils/route';
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
|
const PREFIX = 'group-delegate-publish';
|
||||||
|
|
||||||
|
export default function Partner() {
|
||||||
|
const [cityCode, setCityCode] = useState('');
|
||||||
|
const [jobId, setJobId] = useState('');
|
||||||
|
|
||||||
|
useLoad(() => {
|
||||||
|
const query = getPageQuery<{ cityCode: string; jobId: string }>();
|
||||||
|
setCityCode(query.cityCode);
|
||||||
|
setJobId(query.jobId);
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<div className={PREFIX}>
|
||||||
|
<UserBatchPublish cityCode={cityCode} jobId={jobId} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@ import { BaseEventOrig, Button, ButtonProps, Image, InputProps } from '@tarojs/c
|
|||||||
import Taro, { UploadTask } from '@tarojs/taro';
|
import Taro, { UploadTask } from '@tarojs/taro';
|
||||||
|
|
||||||
import { Dialog } from '@taroify/core';
|
import { Dialog } from '@taroify/core';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import BlFormInput from '@/components/bl-form-input';
|
import BlFormInput from '@/components/bl-form-input';
|
||||||
import BlFormItem from '@/components/bl-form-item';
|
import BlFormItem from '@/components/bl-form-item';
|
||||||
@ -30,7 +30,7 @@ import { dispatchUpdateUser, requestUserInfo } from '@/utils/user';
|
|||||||
import { uploadVideo } from '@/utils/video';
|
import { uploadVideo } from '@/utils/video';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
import { RESPONSE_ERROR_CODE } from '@/http/constant';
|
||||||
|
|
||||||
const PREFIX = 'page-certification';
|
const PREFIX = 'page-certification';
|
||||||
const log = logWithPrefix(PREFIX);
|
const log = logWithPrefix(PREFIX);
|
||||||
@ -158,8 +158,13 @@ export default function Certification() {
|
|||||||
Taro.eventCenter.trigger(EventName.COMPANY_JOB_PUBLISH_CHANGED);
|
Taro.eventCenter.trigger(EventName.COMPANY_JOB_PUBLISH_CHANGED);
|
||||||
redirectTo(PageUrl.CertificationManage);
|
redirectTo(PageUrl.CertificationManage);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('submit error', e);
|
console.error('submit error', e.errorCode, e.errorMsg);
|
||||||
Toast.error('通告发布失败');
|
console.dir(e);
|
||||||
|
if (e.errorCode === RESPONSE_ERROR_CODE.JOB_EXIST_ONE_PUBLISHED) {
|
||||||
|
Toast.info(e.errorMsg || e.errorCode, 3000);
|
||||||
|
} else {
|
||||||
|
Toast.error('通告发布失败');
|
||||||
|
}
|
||||||
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
||||||
redirectTo(PageUrl.CertificationManage);
|
redirectTo(PageUrl.CertificationManage);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
export default definePageConfig({
|
export default definePageConfig({
|
||||||
navigationBarTitleText: '加速招聘',
|
navigationBarTitleText: '群代发',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,25 +1,12 @@
|
|||||||
import { useLoad } from '@tarojs/taro';
|
|
||||||
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
import UserBatchPublish from '@/components/user-batch-publish';
|
import UserBatchPublish from '@/components/user-batch-publish';
|
||||||
import { getPageQuery } from '@/utils/route';
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
const PREFIX = 'group-delegate-publish';
|
const PREFIX = 'group-delegate-publish';
|
||||||
|
|
||||||
export default function Partner() {
|
export default function Partner() {
|
||||||
const [cityCode, setCityCode] = useState('');
|
|
||||||
const [jobId, setJobId] = useState('');
|
|
||||||
|
|
||||||
useLoad(() => {
|
|
||||||
const query = getPageQuery<{ cityCode: string; jobId: string }>();
|
|
||||||
setCityCode(query.cityCode);
|
|
||||||
setJobId(query.jobId);
|
|
||||||
});
|
|
||||||
return (
|
return (
|
||||||
<div className={PREFIX}>
|
<div className={PREFIX}>
|
||||||
<UserBatchPublish cityCode={cityCode} jobId={jobId} />
|
<UserBatchPublish />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,7 +111,7 @@ export default function GroupOwnerCertification() {
|
|||||||
<div>一般1天内完成,超时未完成认证请重新分享或者咨询运营</div>
|
<div>一般1天内完成,超时未完成认证请重新分享或者咨询运营</div>
|
||||||
</div>
|
</div>
|
||||||
<Button className={`${PREFIX}__share`} openType="share">
|
<Button className={`${PREFIX}__share`} openType="share">
|
||||||
分享小程序
|
分享认证页到群
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
3
src/pages/invite-operations/index.config.ts
Normal file
3
src/pages/invite-operations/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default definePageConfig({
|
||||||
|
navigationBarTitleText: '邀请运营',
|
||||||
|
});
|
||||||
156
src/pages/invite-operations/index.less
Normal file
156
src/pages/invite-operations/index.less
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
@import '@/styles/variables.less';
|
||||||
|
@import '@/styles/common.less';
|
||||||
|
|
||||||
|
.invite-operations {
|
||||||
|
&__main {
|
||||||
|
padding-left: 24px;
|
||||||
|
padding-right: 24px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__block {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__card {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 24px;
|
||||||
|
padding: 32px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__edging {
|
||||||
|
position: absolute;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26px;
|
||||||
|
line-height: 28px;
|
||||||
|
color: #946724;
|
||||||
|
padding: 18px 24px;
|
||||||
|
background: #FFF4F0;
|
||||||
|
border-radius:0 0 24px 24px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__lined-wrapper {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
&__lined-title {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 40px;
|
||||||
|
color: #333333;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: -68px;
|
||||||
|
width: 56px;
|
||||||
|
height: 1px;
|
||||||
|
background: #ccc;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
right: -68px;
|
||||||
|
width: 56px;
|
||||||
|
height: 1px;
|
||||||
|
background: #ccc;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&__h1 {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32px;
|
||||||
|
line-height: 40px;
|
||||||
|
color: #1d2129;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
margin-top: 32px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
color: @blHighlightColor;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__body {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 40px;
|
||||||
|
color: @blColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: #1d2129;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
left: -138px;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
right: -138px;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__copy {
|
||||||
|
.button(@height: 72px; @width: 384px; @fontSize: 28px; @fontWeight: 400; @borderRadius: 44px; @highlight: 0);
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__city-select {
|
||||||
|
background: #F7F7F7;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 34px 32px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 32px;
|
||||||
|
margin-top: 24px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
&__qrcode {
|
||||||
|
width: 280px;
|
||||||
|
height: 280px;
|
||||||
|
background: #6F7686;
|
||||||
|
display: block;
|
||||||
|
margin: auto auto 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__action-block {
|
||||||
|
background: #F7F7F7;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 32px 0;
|
||||||
|
.flex-column();
|
||||||
|
text-align: center;
|
||||||
|
color: @blHighlightColor;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
126
src/pages/invite-operations/index.tsx
Normal file
126
src/pages/invite-operations/index.tsx
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
import { Button, Image } from '@tarojs/components';
|
||||||
|
import Taro from '@tarojs/taro';
|
||||||
|
|
||||||
|
import { Arrow } from '@taroify/icons';
|
||||||
|
import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
|
import { EventName, OpenSource, PageUrl } from '@/constants/app';
|
||||||
|
import { CITY_CODE_TO_NAME_MAP } from '@/constants/city';
|
||||||
|
import useLocation from '@/hooks/use-location';
|
||||||
|
import useUserInfo from '@/hooks/use-user-info';
|
||||||
|
import { StaffInfo } from '@/types/partner';
|
||||||
|
import { copy } from '@/utils/common';
|
||||||
|
import { getStaffInfo } from '@/utils/partner';
|
||||||
|
import { navigateTo } from '@/utils/route';
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
|
const PREFIX = 'invite-operations';
|
||||||
|
|
||||||
|
export default function InviteOperations() {
|
||||||
|
const location = useLocation();
|
||||||
|
const userInfo = useUserInfo();
|
||||||
|
const [cityCode, setCityCode] = useState<string>();
|
||||||
|
const [staffInfo, setStaffInfo] = useState<StaffInfo | null>(null);
|
||||||
|
|
||||||
|
const handleClickCityMenu = useCallback(() => {
|
||||||
|
navigateTo(PageUrl.CitySearch, { city: cityCode || location.cityCode, source: OpenSource.InviteOperations });
|
||||||
|
}, [cityCode, location.cityCode]);
|
||||||
|
|
||||||
|
const handleCityChange = useCallback(data => {
|
||||||
|
console.log('handleCityChange', data);
|
||||||
|
const { openSource, cityCode: cCode } = data;
|
||||||
|
if (openSource !== OpenSource.InviteOperations) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setCityCode(cCode);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleCopy = useCallback(() => {
|
||||||
|
copy(`我的播络ID是:${userInfo.userId},邀你进群`);
|
||||||
|
}, [userInfo.userId]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
Taro.eventCenter.on(EventName.SELECT_CITY, handleCityChange);
|
||||||
|
return () => {
|
||||||
|
Taro.eventCenter.off(EventName.SELECT_CITY, handleCityChange);
|
||||||
|
};
|
||||||
|
}, [handleCityChange]);
|
||||||
|
|
||||||
|
const useCopyRef = useRef(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!userInfo.userId) return;
|
||||||
|
if (useCopyRef.current) return;
|
||||||
|
handleCopy();
|
||||||
|
useCopyRef.current = true;
|
||||||
|
}, [handleCopy, userInfo.userId]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!cityCode) return;
|
||||||
|
|
||||||
|
getStaffInfo(cityCode)
|
||||||
|
.then(data => {
|
||||||
|
setStaffInfo(data);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
setStaffInfo(null);
|
||||||
|
});
|
||||||
|
}, [cityCode]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={PREFIX}>
|
||||||
|
<div className={`${PREFIX}__main`}>
|
||||||
|
<div className={`${PREFIX}__block`}>
|
||||||
|
<div className={`${PREFIX}__lined-wrapper`}>
|
||||||
|
<div className={`${PREFIX}__lined-title ${PREFIX}__title`}>活动说明</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__card`}>
|
||||||
|
<div className={`${PREFIX}__h1 center`}>邀请播络运营进带货主播群</div>
|
||||||
|
<div className={`${PREFIX}__h1 center`} style={{ paddingBottom: `48rpx` }}>
|
||||||
|
每邀请进一个群送一个日会员
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__edging`}>注:只能邀请带货主播群,请勿邀请其他群</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__block`}>
|
||||||
|
<div className={`${PREFIX}__lined-wrapper`}>
|
||||||
|
<div className={`${PREFIX}__lined-title ${PREFIX}__title`}>邀请方法</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__card`}>
|
||||||
|
<div className={`${PREFIX}__body`}>
|
||||||
|
<div className={`${PREFIX}__h1`}>
|
||||||
|
加运营为好友并将以下信息 <div className="highlight">粘贴发送给运营</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__action-block`}>
|
||||||
|
<div>我的播络ID是:{userInfo.userId},邀你进群</div>
|
||||||
|
<Button className={`${PREFIX}__copy`} onClick={handleCopy}>
|
||||||
|
复制
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__lined-wrapper`}>
|
||||||
|
<div className={`${PREFIX}__lined-title`}>选择城市,添加运营</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__city-select`} onClick={handleClickCityMenu}>
|
||||||
|
{cityCode ? CITY_CODE_TO_NAME_MAP.get(cityCode) : '请选择城市'}
|
||||||
|
<Arrow size={16} />
|
||||||
|
</div>
|
||||||
|
{staffInfo && (
|
||||||
|
<Fragment>
|
||||||
|
<div className={`${PREFIX}__lined-wrapper`}>
|
||||||
|
<div className={`${PREFIX}__lined-title`}>长按并识别二维码添加运营</div>
|
||||||
|
</div>
|
||||||
|
<Image
|
||||||
|
className={`${PREFIX}__qrcode`}
|
||||||
|
src={staffInfo.staffQrCode}
|
||||||
|
showMenuByLongpress
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</Fragment>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -12,9 +12,8 @@ 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 ProductContactDialog from '@/components/product-dialog/contact';
|
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 JobBuy from '@/components/product-dialog/steps-ui/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';
|
||||||
import { ReportEventId } from '@/constants/event';
|
import { ReportEventId } from '@/constants/event';
|
||||||
@ -71,21 +70,29 @@ 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 [contactDialogVisible, setContactDialogVisible] = useState(false);
|
const [showJobContactDialog, setShowJobContactDialog] = useState(false);
|
||||||
const [showMaterialGuide, setShowMaterialGuide] = useState(false);
|
const [showMaterialGuide, setShowMaterialGuide] = useState(false);
|
||||||
const [showBuyDialog, setShowBuyDialog] = useState(false);
|
|
||||||
const [productInfo, setProductInfo] = useState<undefined | ProductInfo>();
|
const [productInfo, setProductInfo] = useState<undefined | ProductInfo>();
|
||||||
const [productRecord, setProductRecord] = useState<undefined | GetProductIsUnlockResponse>();
|
const [productRecord, setProductRecord] = useState<undefined | GetProductIsUnlockResponse>();
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
const needPhone = isNeedPhone(userInfo);
|
const needPhone = isNeedPhone(userInfo);
|
||||||
|
|
||||||
const getProductRecord = useCallback(async () => {
|
const getProductRecord = useCallback(async () => {
|
||||||
const result = await requestProductUseRecord(ProductType.VIP, { jobId: data.id });
|
const result = await requestProductUseRecord(ProductType.VIP, { jobId: data.id });
|
||||||
setProductRecord(result);
|
setProductRecord(result);
|
||||||
}, [data.id]);
|
}, [data.id]);
|
||||||
|
|
||||||
const getProductBalance = useCallback(async () => {
|
const getProductBalance = useCallback(async (loading?: boolean) => {
|
||||||
|
if (loading) {
|
||||||
|
Taro.showLoading();
|
||||||
|
}
|
||||||
const [, resp] = await requestProductBalance(ProductType.VIP);
|
const [, resp] = await requestProductBalance(ProductType.VIP);
|
||||||
setProductInfo(resp);
|
setProductInfo(resp);
|
||||||
|
console.log(resp);
|
||||||
|
if (loading) {
|
||||||
|
Taro.hideLoading();
|
||||||
|
}
|
||||||
|
return resp;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleClickContact = useCallback(async () => {
|
const handleClickContact = useCallback(async () => {
|
||||||
@ -126,17 +133,13 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
jobId: data.id,
|
jobId: data.id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!productInfo?.isCreateResume && !productInfo?.isPaidVip && !productInfo?.freeBalance) {
|
// Show material guide if no resume and no VIP and no free balance
|
||||||
|
if (!productRecord && !productInfo?.isCreateResume && !productInfo?.isPaidVip && !productInfo?.freeBalance) {
|
||||||
setShowMaterialGuide(true);
|
setShowMaterialGuide(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Open integrated dialog - it handles buy + contact internally
|
||||||
if (!productRecord && !productInfo.isPaidVip && !productInfo.freeBalance) {
|
setShowJobContactDialog(true);
|
||||||
setShowBuyDialog(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setContactDialogVisible(true);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const e = error as HttpError;
|
const e = error as HttpError;
|
||||||
@ -149,33 +152,24 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
}
|
}
|
||||||
}, [data, productInfo?.freeBalance, productInfo?.isCreateResume, productInfo?.isPaidVip]);
|
}, [data, productInfo?.freeBalance, productInfo?.isCreateResume, productInfo?.isPaidVip]);
|
||||||
|
|
||||||
const handleDialogHidden = useCallback(() => {
|
const handleDialogClose = useCallback(() => {
|
||||||
setContactDialogVisible(false);
|
setShowJobContactDialog(false);
|
||||||
}, []);
|
// Refresh data after dialog closes
|
||||||
|
getProductRecord();
|
||||||
|
}, [getProductRecord]);
|
||||||
|
|
||||||
const handleConfirmPrejob = useCallback(
|
const handleConfirmPrejob = useCallback(
|
||||||
(type: GET_CONTACT_TYPE) => {
|
(type: GET_CONTACT_TYPE) => {
|
||||||
setShowMaterialGuide(false);
|
setShowMaterialGuide(false);
|
||||||
if (GET_CONTACT_TYPE.VIP === type) {
|
if (GET_CONTACT_TYPE.VIP === type) {
|
||||||
getProductBalance();
|
getProductBalance().then(() => {
|
||||||
setContactDialogVisible(true);
|
setShowJobContactDialog(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[getProductBalance]
|
[getProductBalance]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleAfterBuy = useCallback(async () => {
|
|
||||||
setShowBuyDialog(false);
|
|
||||||
Taro.showLoading({ mask: true, title: '加载中...' });
|
|
||||||
await getProductBalance();
|
|
||||||
console.log('购买后重新获取次数');
|
|
||||||
setContactDialogVisible(true);
|
|
||||||
Taro.hideLoading();
|
|
||||||
}, [getProductBalance]);
|
|
||||||
|
|
||||||
const handleCancel = useCallback(() => {
|
|
||||||
setShowBuyDialog(false);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// const unAuthedButtonText = useMemo(() => {
|
// const unAuthedButtonText = useMemo(() => {
|
||||||
// if (haveSeen) {
|
// if (haveSeen) {
|
||||||
// return '查看联系方式';
|
// return '查看联系方式';
|
||||||
@ -192,13 +186,14 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
// return productInfo?.isCreateResume? '升级会员即可查看': '创建模卡,免费查看';
|
// return productInfo?.isCreateResume? '升级会员即可查看': '创建模卡,免费查看';
|
||||||
// }, [productInfo, haveSeen]);
|
// }, [productInfo, haveSeen]);
|
||||||
|
|
||||||
|
const handleRefresh = useCallback(async () => {
|
||||||
|
await getProductBalance(true);
|
||||||
|
}, [getProductBalance]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Taro.eventCenter.on(EventName.CREATE_PROFILE, getProductBalance);
|
Taro.eventCenter.on(EventName.CREATE_PROFILE, getProductBalance);
|
||||||
Taro.eventCenter.on(EventName.READ_CONTACT, getProductBalance);
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
Taro.eventCenter.off(EventName.CREATE_PROFILE);
|
Taro.eventCenter.off(EventName.CREATE_PROFILE);
|
||||||
Taro.eventCenter.off(EventName.READ_CONTACT);
|
|
||||||
};
|
};
|
||||||
}, [getProductBalance]);
|
}, [getProductBalance]);
|
||||||
|
|
||||||
@ -216,24 +211,30 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
<Button className={`${PREFIX}__share-button`} openType="share">
|
<Button className={`${PREFIX}__share-button`} openType="share">
|
||||||
分享
|
分享
|
||||||
</Button>
|
</Button>
|
||||||
<LoginButton className={`${PREFIX}__contact-publisher`} onClick={handleClickContact}>
|
<LoginButton
|
||||||
|
needRefresh
|
||||||
|
onRefresh={handleRefresh}
|
||||||
|
className={`${PREFIX}__contact-publisher`}
|
||||||
|
onClick={handleClickContact}
|
||||||
|
>
|
||||||
{data.isAuthed ? '在线沟通' : '查看联系方式'}
|
{data.isAuthed ? '在线沟通' : '查看联系方式'}
|
||||||
{!productRecord && (data.isAuthed || productInfo?.content) ? (
|
{needPhone ? (
|
||||||
|
<div className={`${PREFIX}__contact-publisher-tag`}>登录后可免费报单</div>
|
||||||
|
) : !productRecord && (data.isAuthed || productInfo?.content) ? (
|
||||||
<div className={`${PREFIX}__contact-publisher-tag`}>
|
<div className={`${PREFIX}__contact-publisher-tag`}>
|
||||||
{data.isAuthed ? '急招岗位可免费查看' : productInfo?.content}
|
{data.isAuthed ? '急招岗位可免费查看' : productInfo?.content}
|
||||||
</div>
|
</div>
|
||||||
) : needPhone ? (
|
|
||||||
<div className={`${PREFIX}__contact-publisher-tag`}>登录后可免费报单</div>
|
|
||||||
) : null}
|
) : null}
|
||||||
</LoginButton>
|
</LoginButton>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{contactDialogVisible && (
|
{showJobContactDialog && (
|
||||||
<ProductContactDialog
|
<ProductJobContactDialog
|
||||||
productInfo={productInfo}
|
|
||||||
productRecord={productRecord}
|
|
||||||
data={data}
|
data={data}
|
||||||
onClose={handleDialogHidden}
|
productRecord={productRecord}
|
||||||
|
productInfo={productInfo}
|
||||||
|
onRefreshBalance={getProductBalance}
|
||||||
|
onClose={handleDialogClose}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{showMaterialGuide && (
|
{showMaterialGuide && (
|
||||||
@ -243,13 +244,6 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
|||||||
onConfirm={handleConfirmPrejob}
|
onConfirm={handleConfirmPrejob}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{showBuyDialog && (
|
|
||||||
<Dialog open onClose={handleCancel}>
|
|
||||||
<Dialog.Content>
|
|
||||||
<JobBuy onConfirm={handleAfterBuy} isCreateResume={productInfo?.isCreateResume} />
|
|
||||||
</Dialog.Content>
|
|
||||||
</Dialog>
|
|
||||||
)}
|
|
||||||
<CommonDialog
|
<CommonDialog
|
||||||
content={errorTips}
|
content={errorTips}
|
||||||
confirm="确定"
|
confirm="确定"
|
||||||
|
|||||||
@ -41,6 +41,7 @@ import { getPageQuery, navigateBack, navigateTo } from '@/utils/route';
|
|||||||
import Toast from '@/utils/toast';
|
import Toast from '@/utils/toast';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
import { RESPONSE_ERROR_CODE } from '@/http/constant';
|
||||||
|
|
||||||
const PREFIX = 'page-job-publish';
|
const PREFIX = 'page-job-publish';
|
||||||
const log = logWithPrefix(PREFIX);
|
const log = logWithPrefix(PREFIX);
|
||||||
@ -237,8 +238,13 @@ export default function JobPublish() {
|
|||||||
navigateBack();
|
navigateBack();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
createdJobIdRef.current = '';
|
createdJobIdRef.current = '';
|
||||||
console.error('submit error', e);
|
console.error('submit error', e.errorCode, e.errorMsg);
|
||||||
Toast.error('审核失败请重试');
|
console.dir(e);
|
||||||
|
if (e.errorCode === RESPONSE_ERROR_CODE.JOB_EXIST_ONE_PUBLISHED) {
|
||||||
|
Toast.info(e.errorMsg || e.errorCode, 3000);
|
||||||
|
} else {
|
||||||
|
Toast.error('审核失败请重试');
|
||||||
|
}
|
||||||
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
||||||
} finally {
|
} finally {
|
||||||
Taro.hideLoading();
|
Taro.hideLoading();
|
||||||
@ -253,8 +259,13 @@ export default function JobPublish() {
|
|||||||
await Toast.success('发布成功', 1500, true);
|
await Toast.success('发布成功', 1500, true);
|
||||||
navigateBack();
|
navigateBack();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('submit error', e);
|
console.error('submit error', e.errorCode, e.errorMsg);
|
||||||
Toast.error('审核失败请重试');
|
console.dir(e);
|
||||||
|
if (e.errorCode === RESPONSE_ERROR_CODE.JOB_EXIST_ONE_PUBLISHED) {
|
||||||
|
Toast.info(e.errorMsg || e.errorCode, 3000);
|
||||||
|
} else {
|
||||||
|
Toast.error('审核失败请重试');
|
||||||
|
}
|
||||||
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
||||||
} finally {
|
} finally {
|
||||||
Taro.hideLoading();
|
Taro.hideLoading();
|
||||||
|
|||||||
@ -21,7 +21,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__video-list {
|
&__video-list {
|
||||||
margin-top: 16px;
|
margin-top: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__hint {
|
||||||
|
line-height: 64px;
|
||||||
|
height: 64px;
|
||||||
|
background: #fff4f0;
|
||||||
|
border-radius: 24px 24px 0px 0px;
|
||||||
|
padding: 0 24px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #946724;
|
||||||
|
|
||||||
|
+ .material-video-card {
|
||||||
|
margin-top: 0;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__footer {
|
&__footer {
|
||||||
@ -29,11 +46,11 @@
|
|||||||
left: 24px;
|
left: 24px;
|
||||||
right: 24px;
|
right: 24px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: #F5F6FA;
|
background: #f5f6fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__submit-btn {
|
&__submit-btn {
|
||||||
.button(@width: 100%, @height: 80px, @fontSize: 32px, @fontWeight: 400, @borderRadius: 48px);
|
.button(@width: 100%, @height: 80px, @fontSize: 32px, @fontWeight: 400, @borderRadius: 48px);
|
||||||
bottom: 40px;
|
bottom: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,6 +181,7 @@ export default function MaterialUploadVideo() {
|
|||||||
<div className={`${PREFIX}__header-tips`}>录屏是企业最关注的资料,建议提供多个风格和品类</div>
|
<div className={`${PREFIX}__header-tips`}>录屏是企业最关注的资料,建议提供多个风格和品类</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`${PREFIX}__video-list`}>
|
<div className={`${PREFIX}__video-list`}>
|
||||||
|
<div className={`${PREFIX}__hint`}>注:请勿乱传,也不要上传简历,会被封号</div>
|
||||||
{videoList.map(video => (
|
{videoList.map(video => (
|
||||||
<MaterialVideoCard
|
<MaterialVideoCard
|
||||||
key={video.coverUrl}
|
key={video.coverUrl}
|
||||||
|
|||||||
@ -141,7 +141,13 @@ export default function MaterialViewPage() {
|
|||||||
await postPublishJob(jobId!);
|
await postPublishJob(jobId!);
|
||||||
await handleClickContact();
|
await handleClickContact();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Toast.error('通告发布失败');
|
console.error('submit error', e.errorCode, e.errorMsg);
|
||||||
|
console.dir(e);
|
||||||
|
if (e.errorCode === RESPONSE_ERROR_CODE.JOB_EXIST_ONE_PUBLISHED) {
|
||||||
|
Toast.info(e.errorMsg || e.errorCode, 3000);
|
||||||
|
} else {
|
||||||
|
Toast.error('通告发布失败');
|
||||||
|
}
|
||||||
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
collectEvent(CollectEventName.PUBLISH_JOB_FAILED, e);
|
||||||
}
|
}
|
||||||
}, [handleClickContact, jobId]);
|
}, [handleClickContact, jobId]);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// import { Image } from '@tarojs/components';
|
import { Image } from '@tarojs/components';
|
||||||
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
|
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||||
|
|
||||||
import { Button, Tabs } from '@taroify/core';
|
import { Button, Tabs } from '@taroify/core';
|
||||||
@ -12,29 +12,29 @@ import useInviteCode from '@/hooks/use-invite-code';
|
|||||||
import { switchRoleType } from '@/utils/app';
|
import { switchRoleType } from '@/utils/app';
|
||||||
import { openCustomerServiceChat } from '@/utils/common';
|
import { openCustomerServiceChat } from '@/utils/common';
|
||||||
import { getCurrentCityCode } from '@/utils/location';
|
import { getCurrentCityCode } from '@/utils/location';
|
||||||
import { getPageQuery } from '@/utils/route';
|
import { getPageQuery, navigateTo } from '@/utils/route';
|
||||||
import { getCommonShareMessage } from '@/utils/share';
|
import { getCommonShareMessage } from '@/utils/share';
|
||||||
import { checkCityCode } from '@/utils/user';
|
import { checkCityCode } from '@/utils/user';
|
||||||
|
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
const PREFIX = 'page-biz-service';
|
const PREFIX = 'page-biz-service';
|
||||||
// const EXAMPLE_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-example.png';
|
const EXAMPLE_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-example.png';
|
||||||
// const COMMENT_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-comments.png';
|
const COMMENT_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-comments.png';
|
||||||
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);
|
||||||
// }, []);
|
}, []);
|
||||||
// const handlePreview = (current: string) => {
|
const handlePreview = (current: string) => {
|
||||||
// Taro.previewImage({
|
Taro.previewImage({
|
||||||
// current,
|
current,
|
||||||
// urls: [EXAMPLE_IMAGE, COMMENT_IMAGE],
|
urls: [EXAMPLE_IMAGE, COMMENT_IMAGE],
|
||||||
// });
|
});
|
||||||
// };
|
};
|
||||||
const handleOpenService = useCallback(() => {
|
const handleOpenService = useCallback(() => {
|
||||||
openCustomerServiceChat('https://work.weixin.qq.com/kfid/kfcd60708731367168d');
|
openCustomerServiceChat('https://work.weixin.qq.com/kfid/kfcd60708731367168d');
|
||||||
}, []);
|
}, []);
|
||||||
@ -80,53 +80,7 @@ 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}__delegate`}>*/}
|
|
||||||
{/* <Image*/}
|
|
||||||
{/* mode="widthFix"*/}
|
|
||||||
{/* className={`${PREFIX}__header-image`}*/}
|
|
||||||
{/* src="https://publiccdn.neighbourhood.com.cn/img/pub-job.png"*/}
|
|
||||||
{/* />*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-h5`}>服务说明</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-card`}>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-body`}>服务方式:帮您把招聘需求发到众多同城合作主播群</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-body`}>群发次数:杭州、广州发3次,其他城市1次</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-body`}>内容要求:仅限带货主播招聘需求,其他不发</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-body`}>主播联系:内容中留招聘方联系方式,主播直接联系</div>*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-h5`}>代发示例</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-card image`} onClick={() => handlePreview(EXAMPLE_IMAGE)}>*/}
|
|
||||||
{/* <Image className={`${PREFIX}__delegate-image`} src={EXAMPLE_IMAGE} mode="heightFix" />*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-h5`}>部分客户评价</div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-card image`} onClick={() => handlePreview(COMMENT_IMAGE)}>*/}
|
|
||||||
{/* <Image className={`${PREFIX}__delegate-image`} src={COMMENT_IMAGE} mode="heightFix" />*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/* <div className={`${PREFIX}__delegate-fix`}>*/}
|
|
||||||
{/* <Button className={`${PREFIX}__delegate-btn`} onClick={handleClickDelegate}>*/}
|
|
||||||
{/* 我要代发*/}
|
|
||||||
{/* </Button>*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/*</Tabs.TabPane>*/}
|
|
||||||
<Tabs.TabPane
|
|
||||||
value="1"
|
|
||||||
title={
|
|
||||||
<>
|
|
||||||
主播群
|
|
||||||
{/*<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />*/}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<SearchCity
|
|
||||||
onSelectCity={handleSelectCity}
|
|
||||||
currentCity={getCurrentCityCode()}
|
|
||||||
forGroup
|
|
||||||
offset={72}
|
|
||||||
banner="点击城市名称,进本地通告群,免费招主播"
|
|
||||||
/>
|
|
||||||
</Tabs.TabPane>
|
|
||||||
<Tabs.TabPane value="2" title="代招">
|
|
||||||
<div className={`${PREFIX}__recruitment`}>
|
<div className={`${PREFIX}__recruitment`}>
|
||||||
<div className={`${PREFIX}__recruitment-card`}>
|
<div className={`${PREFIX}__recruitment-card`}>
|
||||||
<div className={`${PREFIX}__recruitment-h5`}>服务城市</div>
|
<div className={`${PREFIX}__recruitment-h5`}>服务城市</div>
|
||||||
@ -151,6 +105,52 @@ export default function BizService() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane
|
||||||
|
value="1"
|
||||||
|
title={
|
||||||
|
<>
|
||||||
|
群代发
|
||||||
|
<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div className={`${PREFIX}__delegate`}>
|
||||||
|
<Image
|
||||||
|
mode="widthFix"
|
||||||
|
className={`${PREFIX}__header-image`}
|
||||||
|
src="https://publiccdn.neighbourhood.com.cn/img/pub-job.png"
|
||||||
|
/>
|
||||||
|
<div className={`${PREFIX}__delegate-h5`}>服务说明</div>
|
||||||
|
<div className={`${PREFIX}__delegate-card`}>
|
||||||
|
<div className={`${PREFIX}__delegate-body`}>服务方式:帮您把招聘需求发到众多同城合作主播群</div>
|
||||||
|
<div className={`${PREFIX}__delegate-body`}>群发次数:杭州、广州发3次,其他城市1次</div>
|
||||||
|
<div className={`${PREFIX}__delegate-body`}>内容要求:仅限带货主播招聘需求,其他不发</div>
|
||||||
|
<div className={`${PREFIX}__delegate-body`}>主播联系:内容中留招聘方联系方式,主播直接联系</div>
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__delegate-h5`}>代发示例</div>
|
||||||
|
<div className={`${PREFIX}__delegate-card image`} onClick={() => handlePreview(EXAMPLE_IMAGE)}>
|
||||||
|
<Image className={`${PREFIX}__delegate-image`} src={EXAMPLE_IMAGE} mode="heightFix" />
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__delegate-h5`}>部分客户评价</div>
|
||||||
|
<div className={`${PREFIX}__delegate-card image`} onClick={() => handlePreview(COMMENT_IMAGE)}>
|
||||||
|
<Image className={`${PREFIX}__delegate-image`} src={COMMENT_IMAGE} mode="heightFix" />
|
||||||
|
</div>
|
||||||
|
<div className={`${PREFIX}__delegate-fix`}>
|
||||||
|
<Button className={`${PREFIX}__delegate-btn`} onClick={handleClickDelegate}>
|
||||||
|
我要代发
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Tabs.TabPane>
|
||||||
|
<Tabs.TabPane value="2" title="主播群">
|
||||||
|
<SearchCity
|
||||||
|
onSelectCity={handleSelectCity}
|
||||||
|
currentCity={getCurrentCityCode()}
|
||||||
|
forGroup
|
||||||
|
offset={72}
|
||||||
|
banner="点击城市名称,进本地通告群,免费招主播"
|
||||||
|
/>
|
||||||
|
</Tabs.TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
</HomePage>
|
</HomePage>
|
||||||
|
|||||||
@ -114,6 +114,7 @@ export interface GetOrderInfoRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductSpecResult {
|
export interface ProductSpecResult {
|
||||||
|
id: string;
|
||||||
productId: string;
|
productId: string;
|
||||||
productSpecId: ProductSpecId;
|
productSpecId: ProductSpecId;
|
||||||
productType: ProductType;
|
productType: ProductType;
|
||||||
|
|||||||
@ -51,5 +51,8 @@ export const requestBatchPublishGroups = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const requestSimpleGroupList = async (cityCode?: string) => {
|
export const requestSimpleGroupList = async (cityCode?: string) => {
|
||||||
return http.post<SimpleGroupInfo[]>(API.SIMPLE_GROUP_LIST, { data: { cityCode } });
|
return http.post<SimpleGroupInfo[]>(API.SIMPLE_GROUP_LIST, {
|
||||||
|
data: { cityCode },
|
||||||
|
contentType: 'application/x-www-form-urlencoded',
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user