feat: 群代发改版
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Button, Image, Text } from '@tarojs/components';
|
||||
import { Button, Text } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { Cell } from '@taroify/core';
|
||||
@ -35,29 +35,36 @@ interface CityOption extends ISelectOption<CityValue> {
|
||||
|
||||
const PREFIX = 'user-batch-publish';
|
||||
const log = logWithPrefix(PREFIX);
|
||||
const SERVICE_ILLUSTRATE = `群发次数:每日一次,连发3天
|
||||
群发内容:仅限主播招聘通告,违规内容不发
|
||||
联系方法:通告中留通告主联系方式,主播直接联系`;
|
||||
const SERVICE_ILLUSTRATE = `服务方式:帮您把招聘需求发到众多同城合作主播群
|
||||
群发次数:每日1次,连发3天
|
||||
内容要求:仅限带货主播招聘需求,其他不发
|
||||
主播联系:内容中留招聘方联系方式,主播直接联系`;
|
||||
const cityValues: CityValue[] = [
|
||||
{ cityCode: '440100', cityName: '广州', count: 300 },
|
||||
{ cityCode: '440100', cityName: '广州', count: 300 }, // 800
|
||||
{ cityCode: '440300', cityName: '深圳', count: 100 },
|
||||
{ cityCode: '330100', cityName: '杭州', count: 300 },
|
||||
{ cityCode: '110100', cityName: '北京', count: 100 },
|
||||
{ cityCode: '510100', cityName: '成都', count: 50 },
|
||||
{ cityCode: '330100', cityName: '杭州', count: 300 }, // 750
|
||||
{ cityCode: '110100', cityName: '北京', count: 100 }, // 150
|
||||
{ cityCode: '510100', cityName: '成都', count: 100 },
|
||||
// { cityCode: '500100', cityName: '重庆', count: 50 },
|
||||
{ cityCode: '430100', cityName: '长沙', count: 50 },
|
||||
{ cityCode: '350200', cityName: '厦门', count: 50 },
|
||||
{ cityCode: '310100', cityName: '上海', count: 100 },
|
||||
{ cityCode: '420100', cityName: '武汉', count: 50 },
|
||||
{ cityCode: '610100', cityName: '西安', count: 50 },
|
||||
{ cityCode: '410100', cityName: '郑州', count: 100 },
|
||||
{ cityCode: '310100', cityName: '上海', count: 100 }, // 150
|
||||
{ cityCode: '420100', cityName: '武汉', count: 50 }, // 80
|
||||
{ cityCode: '610100', cityName: '西安', count: 50 }, // 60
|
||||
{ cityCode: '410100', cityName: '郑州', count: 100 }, // 150
|
||||
].sort((a, b) => b.count - a.count);
|
||||
const MIN_GROUP_SIZE = 20;
|
||||
const GROUP_OPTIONS = [
|
||||
{ value: MIN_GROUP_SIZE, productSpecId: ProductSpecId.GroupBatchPublish20, label: '20', price: 18 },
|
||||
{ value: 50, productSpecId: ProductSpecId.GroupBatchPublish50, label: '50', price: 40 },
|
||||
{ value: 60, productSpecId: ProductSpecId.GroupBatchPublish60, label: '60', price: 48 },
|
||||
{ value: 80, productSpecId: ProductSpecId.GroupBatchPublish80, label: '80', price: 58 },
|
||||
{ value: 100, productSpecId: ProductSpecId.GroupBatchPublish100, label: '100', price: 68 },
|
||||
{ value: 150, productSpecId: ProductSpecId.GroupBatchPublish150, label: '150', price: 98 },
|
||||
{ value: 300, productSpecId: ProductSpecId.GroupBatchPublish300, label: '300', price: 128 },
|
||||
{ value: 500, productSpecId: ProductSpecId.GroupBatchPublish500, label: '500', price: 188 },
|
||||
{ value: 500, productSpecId: ProductSpecId.GroupBatchPublish500, label: '500', price: 188 }, // 168
|
||||
{ value: 750, productSpecId: ProductSpecId.GroupBatchPublish750, label: '750', price: 188 },
|
||||
{ value: 800, productSpecId: ProductSpecId.GroupBatchPublish800, label: '800', price: 198 },
|
||||
{ value: 1000, productSpecId: ProductSpecId.GroupBatchPublish1000, label: '1000', price: 288 },
|
||||
];
|
||||
|
||||
@ -156,7 +163,7 @@ export default function UserBatchPublish() {
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<Image mode="widthFix" className={`${PREFIX}__header-image`} src="https://neighbourhood.cn/pubJob.png" />
|
||||
{/*<Image mode="widthFix" className={`${PREFIX}__header-image`} src="https://neighbourhood.cn/pubJob.png" />*/}
|
||||
<div className={`${PREFIX}__title`}>请选择城市</div>
|
||||
<Cell isLink align="center" className={`${PREFIX}__cell`} title={city?.cityName} onClick={handleClickCity} />
|
||||
<div className={`${PREFIX}__title`}>可购买群数</div>
|
||||
|
@ -74,6 +74,7 @@ export enum PageUrl {
|
||||
PrivacyWebview = 'pages/privacy-webview/index',
|
||||
Partner = 'pages/partner/index',
|
||||
WithdrawRecord = 'pages/withdraw-record/index',
|
||||
GroupDelegatePublish = 'pages/group-delegate-publish/index',
|
||||
}
|
||||
|
||||
export enum PluginUrl {
|
||||
|
@ -32,9 +32,14 @@ export enum ProductSpecId {
|
||||
NewMonthlyVIP = 'VIP_M_NEW', // 18 每天五次
|
||||
GroupBatchPublish20 = 'GROUP_BATCH_PUSH_20',
|
||||
GroupBatchPublish50 = 'GROUP_BATCH_PUSH_50',
|
||||
GroupBatchPublish60 = 'GROUP_BATCH_PUSH_60',
|
||||
GroupBatchPublish80 = 'GROUP_BATCH_PUSH_80',
|
||||
GroupBatchPublish100 = 'GROUP_BATCH_PUSH_100',
|
||||
GroupBatchPublish150 = 'GROUP_BATCH_PUSH_150',
|
||||
GroupBatchPublish300 = 'GROUP_BATCH_PUSH_300',
|
||||
GroupBatchPublish500 = 'GROUP_BATCH_PUSH_500',
|
||||
GroupBatchPublish750 = 'GROUP_BATCH_PUSH_750',
|
||||
GroupBatchPublish800 = 'GROUP_BATCH_PUSH_800',
|
||||
GroupBatchPublish1000 = 'GROUP_BATCH_PUSH_1000',
|
||||
BOSS_PUB_JOB_1 = 'BOSS_PUB_JOB_1', // 旧版企业发通告会员
|
||||
BOSS_VIP_NEW_1 = 'BOSS_VIP_NEW_1', // 新版企业发通告会员 - 周
|
||||
|
@ -48,7 +48,7 @@ const CompanyTabs: TabItemType[] = [
|
||||
{
|
||||
type: PageType.BatchPublish,
|
||||
pagePath: PageUrl.UserBatchPublish,
|
||||
text: '代招代发',
|
||||
text: '免费招',
|
||||
},
|
||||
];
|
||||
|
||||
@ -97,6 +97,7 @@ export const APP_CONFIG: AppConfigType = {
|
||||
PageUrl.PrivacyWebview,
|
||||
PageUrl.Partner,
|
||||
PageUrl.WithdrawRecord,
|
||||
PageUrl.GroupDelegatePublish,
|
||||
// PageUrl.DevDebug,
|
||||
],
|
||||
window: {
|
||||
|
@ -186,7 +186,7 @@ export default function AnchorPage() {
|
||||
});
|
||||
|
||||
useShareAppMessage(() => {
|
||||
return getCommonShareMessage(true, inviteCode, '数万名优质主播等你来挑');
|
||||
return getCommonShareMessage({ useCapture: true, inviteCode, title: '数万名优质主播等你来挑' });
|
||||
});
|
||||
|
||||
useDidShow(() => requestUnreadMessageCount());
|
||||
|
3
src/pages/group-delegate-publish/index.config.ts
Normal file
3
src/pages/group-delegate-publish/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '群代发',
|
||||
});
|
0
src/pages/group-delegate-publish/index.less
Normal file
0
src/pages/group-delegate-publish/index.less
Normal file
12
src/pages/group-delegate-publish/index.tsx
Normal file
12
src/pages/group-delegate-publish/index.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import UserBatchPublish from '@/components/user-batch-publish';
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'group-delegate-publish';
|
||||
|
||||
export default function Partner() {
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<UserBatchPublish />
|
||||
</div>
|
||||
);
|
||||
}
|
@ -24,7 +24,7 @@ export default function GroupV2() {
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
});
|
||||
|
||||
useShareAppMessage(() => getCommonShareMessage(true, inviteCode));
|
||||
useShareAppMessage(() => getCommonShareMessage({ inviteCode }));
|
||||
|
||||
const handleSelectCity = useCallback(cityCode => {
|
||||
if (!checkCityCode(cityCode)) {
|
||||
|
@ -235,7 +235,7 @@ export default function JobDetail() {
|
||||
|
||||
useShareAppMessage(() => {
|
||||
if (!data) {
|
||||
return getCommonShareMessage(true, inviteCode);
|
||||
return getCommonShareMessage({ inviteCode });
|
||||
}
|
||||
return {
|
||||
title: getJobTitle(data) || '',
|
||||
|
@ -121,7 +121,7 @@ export default function Job() {
|
||||
path: getJumpUrl(PageUrl.Job, { sortType, c: inviteCode }),
|
||||
};
|
||||
}
|
||||
return getCommonShareMessage(true, inviteCode);
|
||||
return getCommonShareMessage({ inviteCode });
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -70,7 +70,7 @@ export default function MaterialProfilePage() {
|
||||
|
||||
useShareAppMessage(async () => {
|
||||
const shareMessage = await getMaterialShareMessage(profile, false);
|
||||
return shareMessage || getCommonShareMessage(false);
|
||||
return shareMessage || getCommonShareMessage({ useCapture: false });
|
||||
});
|
||||
|
||||
if (!profile) {
|
||||
|
@ -20,7 +20,7 @@ export default function Partner() {
|
||||
};
|
||||
useShareAppMessage(() => {
|
||||
console.log('Partner inviteCode', inviteCode);
|
||||
return getCommonShareMessage(false, inviteCode);
|
||||
return getCommonShareMessage({ useCapture: false, inviteCode });
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -21,6 +21,72 @@
|
||||
padding-top: var(--tabs-wrap-height);
|
||||
}
|
||||
}
|
||||
&__header-image {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
}
|
||||
&__delegate {
|
||||
& {
|
||||
padding: 24px;
|
||||
padding-bottom: calc(120px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
&-fix {
|
||||
width: 100%;
|
||||
background: #f5f6fa;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 110px;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
}
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 298px;
|
||||
}
|
||||
&-card {
|
||||
background: #fff;
|
||||
padding: 24px;
|
||||
border-radius: 24px;
|
||||
&.image {
|
||||
padding: 1px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
&-h5 {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
line-height: 32px;
|
||||
color: @blColor;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 24px;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
&-body {
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
line-height: 48px;
|
||||
color: @blColorG2;
|
||||
&.link {
|
||||
margin-top: 16px;
|
||||
color: @blHighlightColor;
|
||||
}
|
||||
}
|
||||
&-btn {
|
||||
.button(@width: 100%; @height: 80px; @fontSize: 32px);
|
||||
margin-top: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
&__recruitment {
|
||||
padding: 24px;
|
||||
|
@ -1,24 +1,37 @@
|
||||
import { useShareAppMessage } from '@tarojs/taro';
|
||||
import { Image } from '@tarojs/components';
|
||||
import Taro, { useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { Button, Tabs } from '@taroify/core';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import HomePage from '@/components/home-page';
|
||||
import SearchCity from '@/components/search-city';
|
||||
import UserBatchPublish from '@/components/user-batch-publish';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { GROUPS } from '@/constants/group';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import { openCustomerServiceChat } from '@/utils/common';
|
||||
import { getCurrentCityCode } from '@/utils/location';
|
||||
import { 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';
|
||||
export default function BizService() {
|
||||
const inviteCode = useInviteCode();
|
||||
|
||||
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');
|
||||
}, []);
|
||||
@ -31,13 +44,42 @@ export default function BizService() {
|
||||
openCustomerServiceChat(group.serviceUrl);
|
||||
}
|
||||
}, []);
|
||||
useShareAppMessage(() => getCommonShareMessage(true, inviteCode));
|
||||
useShareAppMessage(() => getCommonShareMessage({ inviteCode }));
|
||||
|
||||
return (
|
||||
<HomePage>
|
||||
<div className={PREFIX}>
|
||||
<Tabs className={`${PREFIX}__tabs`} defaultValue={0}>
|
||||
<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`}>群发次数:每日1次,连发3天</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="免费招">
|
||||
<SearchCity
|
||||
onSelectCity={handleSelectCity}
|
||||
currentCity={getCurrentCityCode()}
|
||||
@ -46,9 +88,6 @@ export default function BizService() {
|
||||
banner="点击城市名称,进本地通告群,免费招主播"
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane value={1} title="群代发">
|
||||
<UserBatchPublish />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane value={2} title="代招">
|
||||
<div className={`${PREFIX}__recruitment`}>
|
||||
<div className={`${PREFIX}__recruitment-card`}>
|
||||
|
@ -38,7 +38,7 @@ export default function User() {
|
||||
[]
|
||||
);
|
||||
|
||||
useShareAppMessage(() => getCommonShareMessage(false));
|
||||
useShareAppMessage(() => getCommonShareMessage({ useCapture: false }));
|
||||
|
||||
return (
|
||||
<HomePage>
|
||||
|
@ -91,7 +91,7 @@ export default function WithdrawRecords() {
|
||||
refresh();
|
||||
}, []);
|
||||
useShareAppMessage(() => {
|
||||
return getCommonShareMessage(false, inviteCode);
|
||||
return getCommonShareMessage({ useCapture: false, inviteCode });
|
||||
});
|
||||
|
||||
return (
|
||||
|
@ -15,15 +15,27 @@ const getRandomCount = () => {
|
||||
return (seed % 300) + 500;
|
||||
};
|
||||
|
||||
export const getCommonShareMessage = (
|
||||
useCapture: boolean = true,
|
||||
inviteCode?: string,
|
||||
title?: string
|
||||
): ShareAppMessageReturn => {
|
||||
console.log('share share message', getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined));
|
||||
interface ShareAppProps {
|
||||
useCapture?: boolean;
|
||||
inviteCode?: string;
|
||||
title?: string;
|
||||
path?: PageUrl;
|
||||
params?: Record<string, BL.Anything>;
|
||||
}
|
||||
|
||||
export const getCommonShareMessage = ({
|
||||
useCapture = true,
|
||||
inviteCode,
|
||||
title,
|
||||
path,
|
||||
params = {},
|
||||
}: ShareAppProps = {}): ShareAppMessageReturn => {
|
||||
const inviteParams = inviteCode ? { c: inviteCode } : undefined;
|
||||
const sharePath = path ? getJumpUrl(path, { ...params, ...inviteParams }) : getJumpUrl(PageUrl.Job, inviteParams);
|
||||
console.log('share share message', sharePath);
|
||||
return {
|
||||
title: title || `昨天新增了${getRandomCount()}条主播通告,宝子快来看看`,
|
||||
path: getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined),
|
||||
path: sharePath,
|
||||
imageUrl: useCapture ? undefined : imageUrl,
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user