feat:
This commit is contained in:
@ -34,7 +34,7 @@ function GoBatchTag({ cityCode, jobId }: { cityCode: string; jobId: JobManageInf
|
||||
e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
navigateTo(PageUrl.GroupDelegatePublish, { cityCode, jobId });
|
||||
navigateTo(PageUrl.AccelerateDelegatePublish, { cityCode, jobId });
|
||||
},
|
||||
[cityCode, jobId]
|
||||
);
|
||||
|
||||
@ -8,7 +8,7 @@ import PageLoading from '@/components/page-loading';
|
||||
import { PublishJobQrCodeDialog } from '@/components/product-dialog/publish-job';
|
||||
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
|
||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||
import { ISelectOption } from '@/components/select';
|
||||
import { ISelectOption, PopupSelect } from '@/components/select';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { JobManageStatus } from '@/constants/job';
|
||||
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;
|
||||
return { price, originalPrice, productSpecId };
|
||||
};
|
||||
|
||||
export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string; jobId: string }) {
|
||||
const cityOptions: CityOption[] = cityValues.map(value => ({ value, label: value.cityName }));
|
||||
export default function UserBatchPublish({ cityCode, jobId }: { cityCode?: string; jobId?: string }) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [showQrCode, setShowQrCode] = useState(false);
|
||||
const [selectable, setSelectable] = useState(false);
|
||||
const [showCitySelect, setShowCitySelect] = useState(false);
|
||||
const [city, setCity] = useState<CityOption['value'] | null>(null);
|
||||
const { price, originalPrice, productSpecId } = calcPrice(city);
|
||||
const [showPublishJob, setShowPublishJob] = useState(false);
|
||||
|
||||
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 handleClickBuy = useCallback(async () => {
|
||||
@ -108,12 +115,14 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
||||
return;
|
||||
}
|
||||
|
||||
const jobDetail = await requestJobDetail(jobId);
|
||||
if (jobId && cityCode) {
|
||||
const jobDetail = await requestJobDetail(jobId);
|
||||
|
||||
if (jobDetail.status !== JobManageStatus.Open) {
|
||||
Taro.hideLoading();
|
||||
setShowPublishJob(true);
|
||||
return;
|
||||
if (jobDetail.status !== JobManageStatus.Open) {
|
||||
Taro.hideLoading();
|
||||
setShowPublishJob(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const { payOrderNo, createPayInfo } = await requestCreatePayInfo({
|
||||
@ -146,11 +155,13 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
||||
}, [jobId, price, productSpecId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!cityCode) {
|
||||
return;
|
||||
}
|
||||
// if (!cityCode) {
|
||||
// return;
|
||||
// }
|
||||
try {
|
||||
const initCity = cityValues.find(o => o.cityCode === cityCode);
|
||||
const initCity = cityCode ? cityValues.find(o => o.cityCode === cityCode) : cityValues[0];
|
||||
|
||||
setSelectable(!cityCode);
|
||||
|
||||
setLoading(false);
|
||||
if (initCity) {
|
||||
@ -174,8 +185,18 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
||||
<div className={`${PREFIX}__illustrate`}>
|
||||
服务方式:帮您把招聘需求<div className="underline">发到本地主播群,投递量大幅增加</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__title`}>当前通告城市</div>
|
||||
<Cell align="center" className={`${PREFIX}__cell`} title={city ? city.cityName : '暂不支持代发'} />
|
||||
{selectable ? (
|
||||
<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 && (
|
||||
<Fragment>
|
||||
<div className={`${PREFIX}__extra`} onClick={handleClickViewGroup}>
|
||||
@ -196,6 +217,13 @@ export default function UserBatchPublish({ cityCode, jobId }: { cityCode: string
|
||||
)}
|
||||
<SafeBottomPadding />
|
||||
<div>
|
||||
<PopupSelect
|
||||
value={city}
|
||||
options={cityOptions}
|
||||
open={showCitySelect}
|
||||
onSelect={handleSelectCity}
|
||||
onClose={() => setShowCitySelect(false)}
|
||||
/>
|
||||
<PublishJobQrCodeDialog onClose={() => setShowQrCode(false)} open={showQrCode} />
|
||||
<Dialog open={showBuy} onClose={() => setShowBuy(false)}>
|
||||
<Dialog.Content>
|
||||
|
||||
@ -77,6 +77,7 @@ export enum PageUrl {
|
||||
Partner = 'pages/partner/index',
|
||||
WithdrawRecord = 'pages/withdraw-record/index',
|
||||
GroupDelegatePublish = 'pages/group-delegate-publish/index',
|
||||
AccelerateDelegatePublish = 'pages/accelerate-delegate-publish/index',
|
||||
GiveVip = 'pages/give-vip/index',
|
||||
GroupOwnerCertificate = 'pages/group-owner-certification/index',
|
||||
PartnerShareVip = 'pages/partner-share-vip/index',
|
||||
|
||||
@ -48,7 +48,7 @@ const CompanyTabs: TabItemType[] = [
|
||||
{
|
||||
type: PageType.BatchPublish,
|
||||
pagePath: PageUrl.UserBatchPublish,
|
||||
text: '代招',
|
||||
text: '代发代招',
|
||||
},
|
||||
];
|
||||
|
||||
@ -101,6 +101,7 @@ export const APP_CONFIG: AppConfigType = {
|
||||
PageUrl.GiveVip,
|
||||
PageUrl.GroupOwnerCertificate,
|
||||
PageUrl.PartnerShareVip,
|
||||
PageUrl.AccelerateDelegatePublish,
|
||||
// PageUrl.DevDebug,
|
||||
],
|
||||
window: {
|
||||
|
||||
@ -15,11 +15,15 @@ import { postPublishJob } from '@/utils/job';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
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 [showBuy, setShowBuy] = useState(false);
|
||||
|
||||
const handlePublishJob = useCallback(async () => {
|
||||
if (!jobId) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (userInfo.bossAuthStatus !== CertificationStatusType.Success) {
|
||||
store.dispatch(cacheJobId(jobId));
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
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 { 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} />
|
||||
<UserBatchPublish />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ export default function GroupOwnerCertification() {
|
||||
<div>一般1天内完成,超时未完成认证请重新分享或者咨询运营</div>
|
||||
</div>
|
||||
<Button className={`${PREFIX}__share`} openType="share">
|
||||
分享小程序
|
||||
分享认证页到群
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// import { Image } from '@tarojs/components';
|
||||
import { Image } from '@tarojs/components';
|
||||
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { Button, Tabs } from '@taroify/core';
|
||||
@ -12,29 +12,29 @@ import useInviteCode from '@/hooks/use-invite-code';
|
||||
import { switchRoleType } from '@/utils/app';
|
||||
import { openCustomerServiceChat } from '@/utils/common';
|
||||
import { getCurrentCityCode } from '@/utils/location';
|
||||
import { getPageQuery } from '@/utils/route';
|
||||
import { getPageQuery, navigateTo } from '@/utils/route';
|
||||
import { getCommonShareMessage } from '@/utils/share';
|
||||
import { checkCityCode } from '@/utils/user';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'page-biz-service';
|
||||
// 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 EXAMPLE_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-example.png';
|
||||
const COMMENT_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-comments.png';
|
||||
export default function BizService() {
|
||||
const inviteCode = useInviteCode();
|
||||
const cityOperators = useCityOperators();
|
||||
const [value, setValue] = useState('2');
|
||||
|
||||
// const handleClickDelegate = useCallback(() => {
|
||||
// navigateTo(PageUrl.GroupDelegatePublish);
|
||||
// }, []);
|
||||
// const handlePreview = (current: string) => {
|
||||
// Taro.previewImage({
|
||||
// current,
|
||||
// urls: [EXAMPLE_IMAGE, COMMENT_IMAGE],
|
||||
// });
|
||||
// };
|
||||
const handleClickDelegate = useCallback(() => {
|
||||
navigateTo(PageUrl.GroupDelegatePublish);
|
||||
}, []);
|
||||
const handlePreview = (current: string) => {
|
||||
Taro.previewImage({
|
||||
current,
|
||||
urls: [EXAMPLE_IMAGE, COMMENT_IMAGE],
|
||||
});
|
||||
};
|
||||
const handleOpenService = useCallback(() => {
|
||||
openCustomerServiceChat('https://work.weixin.qq.com/kfid/kfcd60708731367168d');
|
||||
}, []);
|
||||
@ -80,41 +80,41 @@ export default function BizService() {
|
||||
<HomePage type={PageType.BatchPublish}>
|
||||
<div className={PREFIX}>
|
||||
<Tabs className={`${PREFIX}__tabs`} value={value} onChange={handleChange}>
|
||||
{/*<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="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`} />*/}
|
||||
<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />
|
||||
</>
|
||||
}
|
||||
>
|
||||
|
||||
@ -51,5 +51,8 @@ export const requestBatchPublishGroups = async () => {
|
||||
};
|
||||
|
||||
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