Compare commits
9 Commits
de2f380cd9
...
trunk
Author | SHA1 | Date | |
---|---|---|---|
260e543fe6 | |||
0cd1a46762 | |||
1ddc8b46c9 | |||
5820fa8d25 | |||
80846d507f | |||
42d1208ee4 | |||
2c48a70b6d | |||
e8cf28b6e9 | |||
de7f0e14fe |
41
src/components/join-group-hint/index.less
Normal file
41
src/components/join-group-hint/index.less
Normal file
@ -0,0 +1,41 @@
|
||||
@import '@/styles/common.less';
|
||||
@import '@/styles/variables.less';
|
||||
|
||||
.join-group-hint {
|
||||
.flex-row();
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
padding: 32px 24px;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
&__icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
&__left {
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
&-title {
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
line-height: 40px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
&-desc {
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
&__right {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&__button {
|
||||
.button(@width: 186px, @height: 64px, @fontSize: 28px, @fontWeight: 400, @borderRadius: 32px, @highlight: 0);
|
||||
}
|
||||
}
|
63
src/components/join-group-hint/index.tsx
Normal file
63
src/components/join-group-hint/index.tsx
Normal file
@ -0,0 +1,63 @@
|
||||
import { Button, Image } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { Plus } from '@taroify/icons';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import { RoleType } from '@/constants/app';
|
||||
import { CacheKey } from '@/constants/cache-key';
|
||||
import { CITY_CODE_TO_NAME_MAP } from '@/constants/city';
|
||||
import { GROUPS } from '@/constants/group';
|
||||
import { getRoleTypeWithDefault } from '@/utils/app';
|
||||
import { openCustomerServiceChat } from '@/utils/common';
|
||||
import { getCurrentCityCode } from '@/utils/location';
|
||||
import { checkCityCode, validCityCode } from '@/utils/user';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'join-group-hint';
|
||||
|
||||
const DEFAULT_GROUP = {
|
||||
name: '播络主播招聘群',
|
||||
serviceUrl: 'https://work.weixin.qq.com/kfid/kfcc60ac7b6420787a8',
|
||||
};
|
||||
|
||||
export function JoinGroupHint() {
|
||||
const cityCode = getCurrentCityCode();
|
||||
const roleType = getRoleTypeWithDefault();
|
||||
const group = GROUPS.find(g => String(g.cityCode) === cityCode);
|
||||
const [clicked, setClicked] = useState(!!Taro.getStorageSync(CacheKey.JOIN_GROUP_CARD_CLICKED));
|
||||
const handleClick = useCallback(() => {
|
||||
if (group && !checkCityCode(cityCode)) {
|
||||
return;
|
||||
}
|
||||
openCustomerServiceChat(group ? group.serviceUrl : DEFAULT_GROUP.serviceUrl);
|
||||
Taro.setStorageSync(CacheKey.JOIN_GROUP_CARD_CLICKED, true);
|
||||
setClicked(true);
|
||||
}, [cityCode, group]);
|
||||
if (!validCityCode(cityCode) || clicked) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<Image
|
||||
className={`${PREFIX}__icon`}
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/group-avatar.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<div className={`${PREFIX}__left`}>
|
||||
<div className={`${PREFIX}__left-title`}>
|
||||
{group ? `${CITY_CODE_TO_NAME_MAP.get(cityCode)}主播招聘群` : DEFAULT_GROUP.name}
|
||||
</div>
|
||||
<div className={`${PREFIX}__left-desc`}>{roleType === RoleType.Anchor ? '高薪工作早知道' : '免费招主播'}</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__right`}>
|
||||
<Button className={`${PREFIX}__button`} onClick={handleClick}>
|
||||
<Plus />
|
||||
加入该群
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
82
src/components/prejob-popup/index.less
Normal file
82
src/components/prejob-popup/index.less
Normal file
@ -0,0 +1,82 @@
|
||||
@import '@/styles/common.less';
|
||||
@import '@/styles/variables.less';
|
||||
|
||||
.prejob-popup {
|
||||
&__content {
|
||||
padding: 40px 32px;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
line-height: 48px;
|
||||
margin-bottom: 31px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__body {
|
||||
}
|
||||
|
||||
&__item {
|
||||
.flex-row();
|
||||
margin-bottom: 40px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&-icon {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&.material {
|
||||
background: #feba00;
|
||||
> image {
|
||||
width: 40px;
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
&.vip {
|
||||
background: #b094ff;
|
||||
> image {
|
||||
width: 48px;
|
||||
height: 42px;
|
||||
}
|
||||
}
|
||||
&.video {
|
||||
background: #34a853;
|
||||
> image {
|
||||
width: 46px;
|
||||
height: 44px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-main {
|
||||
padding: 0 24px;
|
||||
flex: 1;
|
||||
.title {
|
||||
font-weight: 500;
|
||||
font-size: 28px;
|
||||
line-height: 40px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.desc {
|
||||
font-size: 24px;
|
||||
line-height: 36px;
|
||||
color: @blColorG1;
|
||||
}
|
||||
}
|
||||
&-action {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__btn {
|
||||
.button(@width: 136px, @height: 72px, @fontSize: 28px, @fontWeight: 400, @borderRadius: 43px, @highlight: 0);
|
||||
background: #f2f2f2;
|
||||
}
|
||||
}
|
89
src/components/prejob-popup/index.tsx
Normal file
89
src/components/prejob-popup/index.tsx
Normal file
@ -0,0 +1,89 @@
|
||||
import { Button, Image } from '@tarojs/components';
|
||||
|
||||
import { Popup, Dialog } from '@taroify/core';
|
||||
import { Fragment, useCallback, useState } from 'react';
|
||||
|
||||
import JobBuy from '@/components/product-dialog/steps-ui/job-buy';
|
||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { GET_CONTACT_TYPE } from '@/constants/job';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
|
||||
import './index.less';
|
||||
|
||||
interface IProps {
|
||||
onCancel: () => void;
|
||||
onConfirm: (type: GET_CONTACT_TYPE) => void;
|
||||
}
|
||||
|
||||
const PREFIX = 'prejob-popup';
|
||||
|
||||
const GET_CONTACT_TYPE_OPTIONS = [
|
||||
{
|
||||
type: GET_CONTACT_TYPE.MATERIAL,
|
||||
icon: 'https://publiccdn.neighbourhood.com.cn/img/file.svg',
|
||||
title: '创建模卡(免费报单)',
|
||||
desc: '免费报单,优先推荐给企业,机会更多',
|
||||
btnText: '创建',
|
||||
},
|
||||
{
|
||||
type: GET_CONTACT_TYPE.VIP,
|
||||
icon: 'https://publiccdn.neighbourhood.com.cn/img/diamond.svg',
|
||||
title: '播络会员',
|
||||
desc: '开通会员每天可查看10个',
|
||||
btnText: '开通',
|
||||
},
|
||||
];
|
||||
|
||||
export function PrejobPopup({ onCancel, onConfirm }: IProps) {
|
||||
const [openPopup, setOpenPopup] = useState(true);
|
||||
const [openDialog, setOpenDialog] = useState(false);
|
||||
const handleClick = (type: GET_CONTACT_TYPE) => () => {
|
||||
if (type === GET_CONTACT_TYPE.MATERIAL) {
|
||||
navigateTo(PageUrl.MaterialUploadVideo);
|
||||
onConfirm(type);
|
||||
}
|
||||
if (type === GET_CONTACT_TYPE.VIP) {
|
||||
setOpenPopup(false);
|
||||
setOpenDialog(true);
|
||||
}
|
||||
};
|
||||
const handleAfterBuy = useCallback(async () => {
|
||||
onConfirm(GET_CONTACT_TYPE.VIP);
|
||||
}, [onConfirm]);
|
||||
return (
|
||||
<Fragment>
|
||||
<Popup rounded className={PREFIX} placement="bottom" open={openPopup} onClose={onCancel}>
|
||||
<div className={`${PREFIX}__content`}>
|
||||
<div className={`${PREFIX}__title`}>以下方式任选其一均可获取联系方式</div>
|
||||
<div className={`${PREFIX}__body`}>
|
||||
{GET_CONTACT_TYPE_OPTIONS.map(option => {
|
||||
return (
|
||||
<div className={`${PREFIX}__item`} key={option.type}>
|
||||
<div className={`${PREFIX}__item-icon ${option.type}`}>
|
||||
<Image mode="aspectFit" src={option.icon} />
|
||||
</div>
|
||||
<div className={`${PREFIX}__item-main`}>
|
||||
<div className="title">{option.title}</div>
|
||||
<div className="desc">{option.desc}</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__item-action`}>
|
||||
<Button className={`${PREFIX}__btn`} onClick={handleClick(option.type)}>
|
||||
{option.btnText}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<SafeBottomPadding />
|
||||
</Popup>
|
||||
<Dialog open={openDialog} onClose={onCancel}>
|
||||
<Dialog.Content>
|
||||
<JobBuy onConfirm={handleAfterBuy} buyOnly />
|
||||
</Dialog.Content>
|
||||
</Dialog>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
@ -3,6 +3,7 @@ export const PREFIX = 'product-dialog';
|
||||
export enum DialogStatus {
|
||||
// 加载中
|
||||
LOADING = 'loading',
|
||||
PRE_ACTION = 'pre_action',
|
||||
// 直接联系通告主
|
||||
JOB_CONTACT_DIRECT = 'job_contact_direct',
|
||||
// 联系客服去联系通告主 -> 订阅通知
|
||||
|
@ -82,7 +82,10 @@ function ProductGroupDialog(props: IProps) {
|
||||
return;
|
||||
}
|
||||
// 否则:如果有解锁次数,显示是否确定消费。无解锁次数,显示不无次数 UI
|
||||
const [time, detail] = await Promise.all([requestProductBalance(PRODUCT_CODE), requestGroupDetail(blGroupId)]);
|
||||
const [[time], detail] = await Promise.all([
|
||||
requestProductBalance(PRODUCT_CODE),
|
||||
requestGroupDetail(blGroupId),
|
||||
]);
|
||||
setGroupDetail(detail);
|
||||
if (time <= 0) {
|
||||
setStatus(DialogStatus.GROUP_NEED_BUY_ADD);
|
||||
|
@ -133,6 +133,7 @@
|
||||
&__header {
|
||||
.flex-row();
|
||||
.header-font();
|
||||
font-size: 32px;
|
||||
|
||||
.highlight {
|
||||
color: @blHighlightColor;
|
||||
@ -143,7 +144,8 @@
|
||||
&__describe {
|
||||
.flex-row();
|
||||
.describe-font();
|
||||
margin-top: 24px;
|
||||
margin-top: 18px;
|
||||
line-height: 40px;
|
||||
|
||||
.highlight {
|
||||
color: @blHighlightColor;
|
||||
@ -158,13 +160,13 @@
|
||||
|
||||
&__item {
|
||||
position: relative;
|
||||
width: 170px;
|
||||
width: 182px;
|
||||
height: 192px;
|
||||
.flex-column();
|
||||
justify-content: center;
|
||||
border: 2px solid @blHighlightColor;
|
||||
border-radius: 8px;
|
||||
margin-right: 24px;
|
||||
margin-right: 15px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
@ -660,4 +662,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ function ProductJobWithGroupDialog(props: Omit<IProps, 'visible'>) {
|
||||
return;
|
||||
}
|
||||
// 否则:如果有解锁次数,显示是否确定消费。无解锁次数,显示不无次数 UI
|
||||
const time = await requestProductBalance(ProductType.AddGroup);
|
||||
const [time] = await requestProductBalance(ProductType.AddGroup);
|
||||
if (time <= 0) {
|
||||
setStatus(DialogStatus.JOB_CONTACT_NEED_BUY_GROUP);
|
||||
} else {
|
||||
@ -119,7 +119,7 @@ function ProductJobWithGroupDialog(props: Omit<IProps, 'visible'>) {
|
||||
return;
|
||||
}
|
||||
// 自动报单
|
||||
const time = await requestProductBalance(ProductType.GetJob);
|
||||
const [time] = await requestProductBalance(ProductType.GetJob);
|
||||
if (time <= 0) {
|
||||
setStatus(DialogStatus.JOB_UNABLE_UNLOCK);
|
||||
} else {
|
||||
|
@ -41,7 +41,7 @@ function ProductJobDialog(props: Omit<IProps, 'visible'>) {
|
||||
}, [onClose]);
|
||||
|
||||
const handleAfterBuy = useCallback(async () => {
|
||||
const time = await requestProductBalance(PRODUCT_CODE);
|
||||
const [time] = await requestProductBalance(PRODUCT_CODE);
|
||||
if (time <= 0) {
|
||||
Toast.error('发生错误请重试');
|
||||
onClose();
|
||||
@ -83,7 +83,7 @@ function ProductJobDialog(props: Omit<IProps, 'visible'>) {
|
||||
handleContact(result.declarationTypeResult);
|
||||
return;
|
||||
}
|
||||
const time = await requestProductBalance(PRODUCT_CODE);
|
||||
const [time] = await requestProductBalance(PRODUCT_CODE);
|
||||
if (time <= 0) {
|
||||
const allowBuy = await requestAllBuyProduct(PRODUCT_CODE);
|
||||
setStatus(allowBuy ? DialogStatus.JOB_BUY : DialogStatus.JOB_UNABLE_UNLOCK);
|
||||
|
@ -115,7 +115,7 @@ export function CompanyPublishJobDialog(props: IProps) {
|
||||
try {
|
||||
const productCode = ProductType.CompanyPublishJob;
|
||||
Taro.showLoading();
|
||||
const time = await requestProductBalance(productCode);
|
||||
const [time] = await requestProductBalance(productCode);
|
||||
if (time <= 0) {
|
||||
setStatus(DialogStatus.COMPANY_PUBLISH_JOB_BUY);
|
||||
return;
|
||||
|
@ -70,7 +70,7 @@ export default function GroupBuy(props: IProps) {
|
||||
if (status !== OrderStatus.Success) {
|
||||
throw new Error('order status error');
|
||||
}
|
||||
const time = await requestProductBalance(ProductType.AddGroup);
|
||||
const [time] = await requestProductBalance(ProductType.AddGroup);
|
||||
log('handleBuy new addGroupTime', time);
|
||||
onConfirm(time);
|
||||
} catch (e) {
|
||||
|
@ -16,6 +16,7 @@ import { postSubscribe, subscribeMessage } from '@/utils/subscribe';
|
||||
import Toast from '@/utils/toast';
|
||||
|
||||
interface IProps {
|
||||
buyOnly?: boolean;
|
||||
onConfirm: () => void;
|
||||
}
|
||||
|
||||
@ -23,6 +24,7 @@ interface Item {
|
||||
id: ProductSpecId;
|
||||
title: string;
|
||||
content: string;
|
||||
buyOnlyContent?: string;
|
||||
price: string;
|
||||
amt: number;
|
||||
badge?: string;
|
||||
@ -31,17 +33,19 @@ interface Item {
|
||||
const LIST: Item[] = [
|
||||
{ id: ProductSpecId.WeeklyVIP, title: '非会员', content: '每日2次', price: '免费', amt: 0 },
|
||||
{
|
||||
id: ProductSpecId.WeeklyVIP,
|
||||
title: '周会员',
|
||||
content: '每日5次',
|
||||
id: ProductSpecId.DailyVIP,
|
||||
title: '日会员',
|
||||
content: '每日+10次',
|
||||
buyOnlyContent: '每日12次',
|
||||
price: '60播豆',
|
||||
amt: 6,
|
||||
badge: '限时体验',
|
||||
},
|
||||
{
|
||||
id: ProductSpecId.NewMonthlyVIP,
|
||||
title: '月会员',
|
||||
content: '每日5次',
|
||||
id: ProductSpecId.WeeklyVIP,
|
||||
title: '周会员',
|
||||
content: '每日+10次',
|
||||
buyOnlyContent: '每日12次',
|
||||
price: '180播豆',
|
||||
amt: 18,
|
||||
badge: ' 超值',
|
||||
@ -62,7 +66,7 @@ const subscribe = async () => {
|
||||
};
|
||||
|
||||
export default function JobBuy(props: IProps) {
|
||||
const { onConfirm } = props;
|
||||
const { onConfirm, buyOnly } = props;
|
||||
const [selectItem, setSelectItem] = useState(LIST[1]);
|
||||
|
||||
const handleClickItem = useCallback((newSelectItem: Item) => setSelectItem(newSelectItem), []);
|
||||
@ -106,32 +110,47 @@ export default function JobBuy(props: IProps) {
|
||||
|
||||
return (
|
||||
<div className={`${PREFIX}__job-buy`}>
|
||||
<div className={`${PREFIX}__job-buy__header`}>
|
||||
<div>今日通告对接次数</div>
|
||||
<div className="highlight">已用完</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__job-buy__describe`}>
|
||||
<div>请</div>
|
||||
<div className="highlight">明日</div>
|
||||
<div>再来 或 </div>
|
||||
<div className="highlight">升级会员</div>
|
||||
</div>
|
||||
{buyOnly ? (
|
||||
<div className={`${PREFIX}__job-buy__header`}>开通播络会员即可直接查看联系方式</div>
|
||||
) : (
|
||||
<div className={`${PREFIX}__job-buy__header`}>
|
||||
<div>今日通告对接次数</div>
|
||||
<div className="highlight">已用完</div>
|
||||
</div>
|
||||
)}
|
||||
{buyOnly ? (
|
||||
<div className={`${PREFIX}__job-buy__describe`}>每天可获取12个联系方式</div>
|
||||
) : (
|
||||
<div className={`${PREFIX}__job-buy__describe`}>
|
||||
<div>请</div>
|
||||
<div className="highlight">明日</div>
|
||||
<div>再来 或 </div>
|
||||
<div className="highlight">升级会员</div>
|
||||
</div>
|
||||
)}
|
||||
<div className={`${PREFIX}__job-buy__container`}>
|
||||
{LIST.map(item => (
|
||||
<div
|
||||
key={item.price}
|
||||
className={classNames(`${PREFIX}__job-buy__item`, {
|
||||
selected: item.amt === selectItem.amt,
|
||||
disabled: item.amt === 0,
|
||||
})}
|
||||
onClick={item.amt === 0 ? undefined : () => handleClickItem(item)}
|
||||
>
|
||||
<div className={classNames(`${PREFIX}__job-buy__item__title`, { free: item.amt === 0 })}>{item.title}</div>
|
||||
<div className={`${PREFIX}__job-buy__item__content`}>{item.content}</div>
|
||||
<div className={`${PREFIX}__job-buy__item__price`}>{item.price}</div>
|
||||
{item.badge && <Badge className={`${PREFIX}__job-buy__item__badge`} text={item.badge} />}
|
||||
</div>
|
||||
))}
|
||||
{LIST.map(item => {
|
||||
if (buyOnly && !item.amt) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div
|
||||
key={item.price}
|
||||
className={classNames(`${PREFIX}__job-buy__item`, {
|
||||
selected: item.amt === selectItem.amt,
|
||||
disabled: item.amt === 0,
|
||||
})}
|
||||
onClick={item.amt === 0 ? undefined : () => handleClickItem(item)}
|
||||
>
|
||||
<div className={classNames(`${PREFIX}__job-buy__item__title`, { free: item.amt === 0 })}>
|
||||
{item.title}
|
||||
</div>
|
||||
<div className={`${PREFIX}__job-buy__item__content`}>{buyOnly ? item.buyOnlyContent : item.content}</div>
|
||||
<div className={`${PREFIX}__job-buy__item__price`}>{item.price}</div>
|
||||
{item.badge && <Badge className={`${PREFIX}__job-buy__item__badge`} text={item.badge} />}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<Button className={`${PREFIX}__job-buy__button`} onClick={handleBuy}>
|
||||
{`支付 ${selectItem.amt} 元`}
|
||||
|
@ -40,18 +40,18 @@ const SERVICE_ILLUSTRATE = `服务方式:帮您把招聘需求发到众多同
|
||||
内容要求:仅限带货主播招聘需求,其他不发
|
||||
主播联系:内容中留招聘方联系方式,主播直接联系`;
|
||||
const cityValues: CityValue[] = [
|
||||
{ cityCode: '440100', cityName: '广州', count: 300 }, // 800
|
||||
{ cityCode: '440100', cityName: '广州', count: 800 },
|
||||
{ cityCode: '440300', cityName: '深圳', count: 100 },
|
||||
{ cityCode: '330100', cityName: '杭州', count: 300 }, // 750
|
||||
{ cityCode: '110100', cityName: '北京', count: 100 }, // 150
|
||||
{ cityCode: '330100', cityName: '杭州', count: 750 },
|
||||
{ cityCode: '110100', cityName: '北京', count: 150 },
|
||||
{ cityCode: '510100', cityName: '成都', count: 100 },
|
||||
// { cityCode: '500100', cityName: '重庆', count: 50 },
|
||||
{ cityCode: '500100', cityName: '重庆', count: 50 },
|
||||
{ cityCode: '430100', cityName: '长沙', count: 50 },
|
||||
{ cityCode: '350200', cityName: '厦门', count: 50 },
|
||||
{ cityCode: '310100', cityName: '上海', count: 100 }, // 150
|
||||
{ cityCode: '420100', cityName: '武汉', count: 50 }, // 80
|
||||
{ cityCode: '610100', cityName: '西安', count: 50 }, // 60
|
||||
{ cityCode: '410100', cityName: '郑州', count: 100 }, // 150
|
||||
{ cityCode: '310100', cityName: '上海', count: 150 },
|
||||
{ cityCode: '420100', cityName: '武汉', count: 80 },
|
||||
{ cityCode: '610100', cityName: '西安', count: 60 },
|
||||
{ cityCode: '410100', cityName: '郑州', count: 150 },
|
||||
].sort((a, b) => b.count - a.count);
|
||||
const MIN_GROUP_SIZE = 20;
|
||||
const GROUP_OPTIONS = [
|
||||
@ -62,7 +62,7 @@ const GROUP_OPTIONS = [
|
||||
{ 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 }, // 168
|
||||
{ value: 500, productSpecId: ProductSpecId.GroupBatchPublish500, label: '500', price: 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 },
|
||||
@ -146,7 +146,7 @@ export default function UserBatchPublish() {
|
||||
useEffect(() => {
|
||||
try {
|
||||
const cOptions: CityOption[] = cityValues.map(value => ({ value, label: value.cityName }));
|
||||
const initCity = cOptions[0].value;
|
||||
const initCity = (cOptions.find(o => o.label === '重庆') || cOptions[0]).value;
|
||||
|
||||
setLoading(false);
|
||||
setCity(initCity);
|
||||
|
@ -12,4 +12,5 @@ export enum CacheKey {
|
||||
INVITE_CODE = '__invite_code__',
|
||||
AGREEMENT_SIGNED = '__agreement_signed__',
|
||||
CITY_CODES = '__city_codes__',
|
||||
JOIN_GROUP_CARD_CLICKED = '__join_group_card_clicked__',
|
||||
}
|
||||
|
@ -174,3 +174,8 @@ export const FULL_EMPLOY_SALARY_OPTIONS = [
|
||||
export const PART_PRICE_OPTIONS = PART_EMPLOY_SALARY_OPTIONS.filter(o => !!o.value);
|
||||
|
||||
export const FULL_PRICE_OPTIONS = FULL_EMPLOY_SALARY_OPTIONS.filter(o => !!o.value);
|
||||
|
||||
export enum GET_CONTACT_TYPE {
|
||||
VIP = 'vip',
|
||||
MATERIAL = 'material',
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ export enum ProductSpecId {
|
||||
AddGroup2 = 'ADDGROUP_2',
|
||||
AddGroup3 = 'ADDGROUP_3',
|
||||
BossVip = 'BOSSVIP',
|
||||
DailyVIP = 'VIP_D',
|
||||
WeeklyVIP = 'VIP_W',
|
||||
MonthlyVIP = 'VIP_M', // 30 每天十次
|
||||
NewMonthlyVIP = 'VIP_M_NEW', // 18 每天五次
|
||||
|
@ -44,7 +44,7 @@
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
background: #0000005c;
|
||||
background: #6D3DF5B2;
|
||||
border-radius: 48px;
|
||||
}
|
||||
|
||||
@ -232,4 +232,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.join-group-hint {
|
||||
margin: 24px;
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import { navigateTo } from '@/utils/route';
|
||||
|
||||
import './index.less';
|
||||
import onChangeEventDetail = SwiperProps.onChangeEventDetail;
|
||||
import { JoinGroupHint } from '@/components/join-group-hint';
|
||||
|
||||
interface IProps {
|
||||
editable: boolean;
|
||||
@ -207,6 +208,7 @@ export default function ProfileViewFragment(props: IProps) {
|
||||
>{`${coverIndex + 1}/${profile.materialVideoInfoList.length}`}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!editable && <JoinGroupHint />}
|
||||
<div className={`${PREFIX}__body`}>
|
||||
<div className={`${PREFIX}__basic-info`}>
|
||||
<div className={`${PREFIX}__basic-info__name-container`}>
|
||||
@ -228,7 +230,9 @@ export default function ProfileViewFragment(props: IProps) {
|
||||
{index ? (
|
||||
<div className={`${PREFIX}__info-group__header__title`}>{data.title}</div>
|
||||
) : (
|
||||
<DevDiv className={`${PREFIX}__info-group__header__title`} OnDev={onDev}>{data.title}</DevDiv>
|
||||
<DevDiv className={`${PREFIX}__info-group__header__title`} OnDev={onDev}>
|
||||
{data.title}
|
||||
</DevDiv>
|
||||
)}
|
||||
{editable && (
|
||||
<div className={`${PREFIX}__info-group__header__edit`} onClick={() => handleEditGroupItem(data.type)}>
|
||||
|
@ -35,7 +35,7 @@ const AnchorTabs: TabItemType[] = [
|
||||
{
|
||||
type: PageType.GroupV2,
|
||||
pagePath: PageUrl.GroupV2,
|
||||
text: '主播群',
|
||||
text: '通告群',
|
||||
},
|
||||
];
|
||||
|
||||
@ -48,7 +48,7 @@ const CompanyTabs: TabItemType[] = [
|
||||
{
|
||||
type: PageType.BatchPublish,
|
||||
pagePath: PageUrl.UserBatchPublish,
|
||||
text: '免费招',
|
||||
text: '代招代发',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -26,6 +26,7 @@ export enum RESPONSE_ERROR_CODE {
|
||||
INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE', // 聊天或者模卡查看超出限制
|
||||
INSUFFICIENT_FREE_BALANCE = 'INSUFFICIENT_FREE_BALANCE', // 免费查看次数(未购买会员)超限
|
||||
BOSS_VIP_EXPIRED = 'BOSS_VIP_EXPIRED', // 会员过期
|
||||
CHAT_MSG_SEND_NOT_ALLOW = 'CHAT_MSG_SEND_NOT_ALLOW',
|
||||
}
|
||||
|
||||
export const RESPONSE_ERROR_INFO: { [key in RESPONSE_ERROR_CODE]?: string } = {
|
||||
|
@ -170,7 +170,6 @@ export default function AnchorPage() {
|
||||
|
||||
const query = getPageQuery();
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
console.log('哈哈哈 useLoad');
|
||||
|
||||
try {
|
||||
const { jobResults = [] } = await requestJobManageList({ status: JobManageStatus.Open });
|
||||
|
@ -7,14 +7,15 @@ import { CertificationStatusIcon } from '@/components/certification-status';
|
||||
import CommonDialog from '@/components/common-dialog';
|
||||
import DevDiv from '@/components/dev-div';
|
||||
import JobRecommendList from '@/components/job-recommend-list';
|
||||
import { JoinGroupHint } from '@/components/join-group-hint';
|
||||
import LoginButton from '@/components/login-button';
|
||||
import MaterialGuide from '@/components/material-guide';
|
||||
import PageLoading from '@/components/page-loading';
|
||||
import { PrejobPopup } from '@/components/prejob-popup';
|
||||
import ProductJobDialog from '@/components/product-dialog/job';
|
||||
import { RoleType, EventName, PageUrl } from '@/constants/app';
|
||||
import { CertificationStatusType } from '@/constants/company';
|
||||
import { CollectEventName, ReportEventId } from '@/constants/event';
|
||||
import { EMPLOY_TYPE_TITLE_MAP } from '@/constants/job';
|
||||
import { EMPLOY_TYPE_TITLE_MAP, GET_CONTACT_TYPE } from '@/constants/job';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import useUserInfo from '@/hooks/use-user-info';
|
||||
import useRoleType from '@/hooks/user-role-type';
|
||||
@ -75,9 +76,12 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
||||
reportEvent(ReportEventId.CLICK_JOB_CONTACT);
|
||||
try {
|
||||
const needCreateMaterial = await isNeedCreateMaterial();
|
||||
if (needCreateMaterial) {
|
||||
setShowMaterialGuide(true);
|
||||
return;
|
||||
|
||||
if (data.sourcePlat !== 'bl') {
|
||||
if (needCreateMaterial) {
|
||||
setShowMaterialGuide(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.isAuthed) {
|
||||
const toUserId = data.userId;
|
||||
@ -85,19 +89,27 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
||||
Toast.error('不能与自己聊天');
|
||||
return;
|
||||
}
|
||||
const profile = await requestProfileDetail();
|
||||
const chat = await postCreateChat(toUserId);
|
||||
const materialMessage: IMaterialMessage = {
|
||||
id: profile.id,
|
||||
name: profile.name,
|
||||
age: profile.age,
|
||||
height: profile.height,
|
||||
weight: profile.weight,
|
||||
shoeSize: profile.shoeSize,
|
||||
gender: profile.gender,
|
||||
workedSecCategoryStr: profile.workedSecCategoryStr,
|
||||
};
|
||||
navigateTo(PageUrl.MessageChat, { chatId: chat.chatId, material: materialMessage, jobId: data.id });
|
||||
let materialMessage: null | IMaterialMessage = null;
|
||||
if (!needCreateMaterial) {
|
||||
const profile = await requestProfileDetail();
|
||||
materialMessage = {
|
||||
id: profile.id,
|
||||
name: profile.name,
|
||||
age: profile.age,
|
||||
height: profile.height,
|
||||
weight: profile.weight,
|
||||
shoeSize: profile.shoeSize,
|
||||
gender: profile.gender,
|
||||
workedSecCategoryStr: profile.workedSecCategoryStr,
|
||||
};
|
||||
}
|
||||
navigateTo(PageUrl.MessageChat, {
|
||||
chatId: chat.chatId,
|
||||
initText: !materialMessage,
|
||||
material: materialMessage,
|
||||
jobId: data.id,
|
||||
});
|
||||
} else {
|
||||
setDialogVisible(true);
|
||||
}
|
||||
@ -112,7 +124,15 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
const handleDialogHidden = useCallback(() => setDialogVisible(false), []);
|
||||
const handleDialogHidden = useCallback(() => {
|
||||
setDialogVisible(false);
|
||||
}, []);
|
||||
const handleConfirmPrejob = useCallback((type: GET_CONTACT_TYPE) => {
|
||||
setShowMaterialGuide(false);
|
||||
if (GET_CONTACT_TYPE.VIP === type) {
|
||||
setDialogVisible(true);
|
||||
}
|
||||
}, []);
|
||||
return (
|
||||
<>
|
||||
<div className={`${PREFIX}__footer`}>
|
||||
@ -125,7 +145,9 @@ const AnchorFooter = (props: { data: JobDetails }) => {
|
||||
</div>
|
||||
<div>
|
||||
{dialogVisible && <ProductJobDialog data={data} onClose={handleDialogHidden} />}
|
||||
{showMaterialGuide && <MaterialGuide onClose={() => setShowMaterialGuide(false)} />}
|
||||
{showMaterialGuide && (
|
||||
<PrejobPopup onCancel={() => setShowMaterialGuide(false)} onConfirm={handleConfirmPrejob} />
|
||||
)}
|
||||
<CommonDialog
|
||||
content={errorTips}
|
||||
confirm="确定"
|
||||
@ -219,9 +241,11 @@ export default function JobDetail() {
|
||||
}, []);
|
||||
|
||||
useLoad(async () => {
|
||||
switchRoleType(RoleType.Anchor);
|
||||
const query = getPageQuery<Pick<JobDetails, 'id'> & { c: string; share: string }>();
|
||||
|
||||
const query = getPageQuery<Pick<JobDetails, 'id'> & { c: string }>();
|
||||
if (query?.share === 'true') {
|
||||
switchRoleType(RoleType.Anchor);
|
||||
}
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
const jobId = query?.id;
|
||||
if (!jobId) {
|
||||
@ -282,6 +306,8 @@ export default function JobDetail() {
|
||||
{data.companyName && <div className={`${PREFIX}__company`}>{`公司:${data.companyName}`}</div>}
|
||||
</div>
|
||||
|
||||
{!isOwner && <JoinGroupHint />}
|
||||
|
||||
<div className={`${PREFIX}__content`}>
|
||||
<div className={`${PREFIX}__content-title`}>职位描述</div>
|
||||
<div className={`${PREFIX}__tags`}>
|
||||
|
@ -3,8 +3,8 @@ import Taro, { useDidShow, useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||
import { Tabs } from '@taroify/core';
|
||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { AgreementPopup } from '@/components/agreement-popup';
|
||||
import HomePage from '@/components/home-page';
|
||||
import { LoginGuide } from '@/components/login-guide';
|
||||
import MaterialGuide from '@/components/material-guide';
|
||||
import { EventName, OpenSource, PageType, PageUrl, RoleType } from '@/constants/app';
|
||||
import { EmployType, JOB_PAGE_TABS, SortType } from '@/constants/job';
|
||||
@ -21,8 +21,7 @@ import { getInviteCodeFromQueryAndUpdate } from '@/utils/partner';
|
||||
import { getJumpUrl, getPageQuery, navigateTo } from '@/utils/route';
|
||||
import { getCommonShareMessage } from '@/utils/share';
|
||||
import Toast from '@/utils/toast';
|
||||
import { isNeedCreateMaterial } from '@/utils/user';
|
||||
|
||||
import { getAgreementSigned, setAgreementSigned } from '@/utils/user';
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'job';
|
||||
@ -40,9 +39,19 @@ export default function Job() {
|
||||
longitude: location.longitude,
|
||||
});
|
||||
const [showMaterialGuide, setShowMaterialGuide] = useState(false);
|
||||
const [showAuthorize, setShowAuthorize] = useState(false);
|
||||
const cityValuesChangedRef = useRef(false);
|
||||
const [openAgreementPopup, setAgreementPopupOpen] = useState(typeof getAgreementSigned() !== 'boolean');
|
||||
|
||||
const getLocation = async () => {
|
||||
if (await isNotNeedAuthorizeLocation()) {
|
||||
log('not need authorize location');
|
||||
requestLocation();
|
||||
} else {
|
||||
log('show authorize location dialog');
|
||||
// setShowAuthorize(true);
|
||||
requestLocation(true);
|
||||
}
|
||||
};
|
||||
const handleTypeChange = useCallback(value => setTabType(value), []);
|
||||
|
||||
const handleClickCity = useCallback(
|
||||
@ -76,12 +85,19 @@ export default function Job() {
|
||||
setCityCode(code);
|
||||
}, []);
|
||||
|
||||
const handleAfterBindPhone = useCallback(async () => {
|
||||
if (await isNeedCreateMaterial()) {
|
||||
setShowMaterialGuide(true);
|
||||
}
|
||||
}, []);
|
||||
const handleCancelAgreementPopup = () => {
|
||||
setAgreementPopupOpen(false);
|
||||
setAgreementSigned(false);
|
||||
|
||||
getLocation();
|
||||
};
|
||||
|
||||
const handleConfirmAgreementPopup = () => {
|
||||
setAgreementPopupOpen(false);
|
||||
setAgreementSigned(true);
|
||||
|
||||
getLocation();
|
||||
};
|
||||
useEffect(() => {
|
||||
Taro.eventCenter.on(EventName.SELECT_CITY, handleCityChange);
|
||||
return () => {
|
||||
@ -104,13 +120,8 @@ export default function Job() {
|
||||
setSortType(type);
|
||||
}
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
if (await isNotNeedAuthorizeLocation()) {
|
||||
log('not need authorize location');
|
||||
requestLocation();
|
||||
} else {
|
||||
log('show authorize location dialog');
|
||||
setShowAuthorize(true);
|
||||
requestLocation(true);
|
||||
if (!openAgreementPopup) {
|
||||
getLocation();
|
||||
}
|
||||
});
|
||||
|
||||
@ -149,8 +160,12 @@ export default function Job() {
|
||||
))}
|
||||
</Tabs>
|
||||
<div>
|
||||
<LoginGuide disabled={showAuthorize} onAfterBind={handleAfterBindPhone} />
|
||||
{showMaterialGuide && <MaterialGuide onClose={() => setShowMaterialGuide(false)} />}
|
||||
<AgreementPopup
|
||||
open={openAgreementPopup}
|
||||
onCancel={handleCancelAgreementPopup}
|
||||
onConfirm={handleConfirmAgreementPopup}
|
||||
/>
|
||||
</div>
|
||||
</HomePage>
|
||||
);
|
||||
|
@ -72,6 +72,7 @@ interface ILoadProps {
|
||||
chatId: string;
|
||||
jobId?: string;
|
||||
job?: string;
|
||||
initText?: boolean;
|
||||
material?: string;
|
||||
}
|
||||
|
||||
@ -90,6 +91,7 @@ export default function MessageChat() {
|
||||
const [input, setInput] = useState('');
|
||||
const [showMore, setShowMore] = useState(false);
|
||||
const [chat, setChat] = useState<IChatInfo | null>(null);
|
||||
const [initText, setInitText] = useState('');
|
||||
const [reject, setReject] = useState<boolean>(false);
|
||||
const [receiver, setReceiver] = useState<IChatUser | null>(null);
|
||||
const [messages, setMessages] = useState<IChatMessage[]>([]);
|
||||
@ -100,7 +102,7 @@ export default function MessageChat() {
|
||||
const [material, setMaterial] = useState<IMaterialMessage>();
|
||||
const [scrollItemId, setScrollItemId] = useState<string>();
|
||||
const scrollToLowerRef = useRef(false);
|
||||
const autoSendRef = useRef({ sendJob: false, sendMaterial: false });
|
||||
const autoSendRef = useRef({ sendJob: false, sendMaterial: false, sendText: false });
|
||||
const loadMoreRef = useRef(async (chatId: string, currentMessages: IChatMessage[], forceScroll?: boolean) => {
|
||||
try {
|
||||
const lastMsgId = last(currentMessages)?.msgId;
|
||||
@ -167,6 +169,9 @@ export default function MessageChat() {
|
||||
) {
|
||||
tips = '今日申请交换联系方式次数已用完,当前每日限制为5次';
|
||||
duration = 3000;
|
||||
} else if (errorCode === RESPONSE_ERROR_CODE.CHAT_MSG_SEND_NOT_ALLOW) {
|
||||
tips = '账号已在另一台设备上切换身份,本条消息未发送成功,请在本设备重新切换身份后,再发送消息';
|
||||
duration = 5000;
|
||||
}
|
||||
tips.length > 7 ? Toast.info(tips, duration) : Toast.error(tips, duration);
|
||||
}
|
||||
@ -275,7 +280,11 @@ export default function MessageChat() {
|
||||
}
|
||||
job && handleSendJobMessage();
|
||||
material && handleSendMaterialMessage();
|
||||
}, [chat, job, material, handleSendJobMessage, handleSendMaterialMessage]);
|
||||
if (initText && !autoSendRef.current.sendText) {
|
||||
autoSendRef.current.sendText = true;
|
||||
handleSendMessage({ type: MessageType.Text, content: '你好,想了解下这个岗位' });
|
||||
}
|
||||
}, [chat, job, material, handleSendJobMessage, handleSendMaterialMessage, initText, handleSendMessage]);
|
||||
|
||||
useLoad(async () => {
|
||||
const query = getPageQuery<ILoadProps>();
|
||||
@ -306,6 +315,9 @@ export default function MessageChat() {
|
||||
setScrollItemId(getScrollItemId(last(chatDetail.messages)?.msgId));
|
||||
parseJob && setJob(parseJob);
|
||||
parseMaterial && setMaterial(parseMaterial);
|
||||
if (!parseMaterial && query.initText && watchType === ChatWatchType.AnchorReject) {
|
||||
setInitText('你好,想了解下这个岗位');
|
||||
}
|
||||
Taro.setNavigationBarTitle({ title: toUserInfo.nickName });
|
||||
setReceiver(toUserInfo);
|
||||
setReject(!watchStatus);
|
||||
|
@ -1,88 +1,94 @@
|
||||
import { Image } from '@tarojs/components';
|
||||
import { useLoad } from '@tarojs/taro';
|
||||
|
||||
import { useState } from 'react';
|
||||
|
||||
import { AgreementPopup } from '@/components/agreement-popup';
|
||||
import Slogan from '@/components/slogan';
|
||||
import { PageUrl, RoleType } from '@/constants/app';
|
||||
import { ANCHOR_TAB_LIST, COMPANY_TAB_LIST } from '@/hooks/use-config';
|
||||
import store from '@/store';
|
||||
import { changeHomePage } from '@/store/actions';
|
||||
// import { useEffect, useState } from 'react';
|
||||
// import { AgreementPopup } from '@/components/agreement-popup';
|
||||
// import Slogan from '@/components/slogan';
|
||||
// import { PageUrl, RoleType } from '@/constants/app';
|
||||
// import { ANCHOR_TAB_LIST, COMPANY_TAB_LIST } from '@/hooks/use-config';
|
||||
// import store from '@/store';
|
||||
// import { changeHomePage } from '@/store/actions';
|
||||
import { RoleType } from '@/constants/app';
|
||||
import { getRoleType, switchDefaultTab, switchRoleType } from '@/utils/app';
|
||||
import { switchTab } from '@/utils/route';
|
||||
import { getAgreementSigned, setAgreementSigned } from '@/utils/user';
|
||||
// import { switchTab } from '@/utils/route';
|
||||
// import { getAgreementSigned, setAgreementSigned } from '@/utils/user';
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'page-start';
|
||||
|
||||
export default function Start() {
|
||||
const [open, setOpen] = useState(typeof getAgreementSigned() !== 'boolean');
|
||||
// const [open, setOpen] = useState(typeof getAgreementSigned() !== 'boolean');
|
||||
const mode = getRoleType();
|
||||
useLoad(() => {
|
||||
switchDefaultTab();
|
||||
if (!mode) {
|
||||
switchRoleType(RoleType.Anchor).then(() => {
|
||||
switchDefaultTab();
|
||||
});
|
||||
} else {
|
||||
switchDefaultTab();
|
||||
}
|
||||
});
|
||||
const handleAnchor = async () => {
|
||||
await switchRoleType(RoleType.Anchor);
|
||||
store.dispatch(changeHomePage(ANCHOR_TAB_LIST[0].type));
|
||||
await switchTab(ANCHOR_TAB_LIST[0].pagePath as PageUrl);
|
||||
};
|
||||
// const handleAnchor = async () => {
|
||||
// await switchRoleType(RoleType.Anchor);
|
||||
// store.dispatch(changeHomePage(ANCHOR_TAB_LIST[0].type));
|
||||
// await switchTab(ANCHOR_TAB_LIST[0].pagePath as PageUrl);
|
||||
// };
|
||||
|
||||
const handleCompany = async () => {
|
||||
await switchRoleType(RoleType.Company);
|
||||
store.dispatch(changeHomePage(COMPANY_TAB_LIST[0].type));
|
||||
await switchTab(COMPANY_TAB_LIST[0].pagePath as PageUrl);
|
||||
};
|
||||
// const handleCompany = async () => {
|
||||
// await switchRoleType(RoleType.Company);
|
||||
// store.dispatch(changeHomePage(COMPANY_TAB_LIST[0].type));
|
||||
// await switchTab(COMPANY_TAB_LIST[0].pagePath as PageUrl);
|
||||
// };
|
||||
|
||||
const handleCancel = () => {
|
||||
setOpen(false);
|
||||
setAgreementSigned(false);
|
||||
};
|
||||
|
||||
const handleConfirm = () => {
|
||||
setOpen(false);
|
||||
setAgreementSigned(true);
|
||||
};
|
||||
// const handleCancel = () => {
|
||||
// setOpen(false);
|
||||
// setAgreementSigned(false);
|
||||
// };
|
||||
//
|
||||
// const handleConfirm = () => {
|
||||
// setOpen(false);
|
||||
// setAgreementSigned(true);
|
||||
// };
|
||||
return (
|
||||
<div className={`${PREFIX} ${mode ? '' : 'color-bg'}`}>
|
||||
{mode && (
|
||||
<div className={`${PREFIX}__app`}>
|
||||
<Image className={`${PREFIX}__icon`} mode="aspectFit" src={require('@/statics/svg/slogan.svg')} />
|
||||
<div className={`${PREFIX}__text`}>每天推荐海量高薪通告 </div>
|
||||
</div>
|
||||
)}
|
||||
<div className={`${PREFIX}`}>
|
||||
{/*{mode && (*/}
|
||||
<div className={`${PREFIX}__app`}>
|
||||
<Image className={`${PREFIX}__icon`} mode="aspectFit" src={require('@/statics/svg/slogan.svg')} />
|
||||
<div className={`${PREFIX}__text`}>每天推荐海量高薪通告 </div>
|
||||
</div>
|
||||
{/*)}*/}
|
||||
{!mode && (
|
||||
<>
|
||||
<div className={`${PREFIX}__role-app`}>
|
||||
<div className={`${PREFIX}__greet`}>Hi,很高兴见到你</div>
|
||||
<div className={`${PREFIX}__title`}>请选择您的身份</div>
|
||||
<div className={`${PREFIX}__card`} onClick={handleAnchor}>
|
||||
<Image
|
||||
className={`${PREFIX}__avatar anchor`}
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/avatar_f.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<div className={`${PREFIX}__content`}>
|
||||
<div className="title">我是主播</div>
|
||||
<div className="desc">我要找工作</div>
|
||||
</div>
|
||||
<Image src={require('@/statics/svg/arrow-right.svg')} mode="aspectFill" className={`${PREFIX}__arrow`} />
|
||||
</div>
|
||||
<div className={`${PREFIX}__card`} onClick={handleCompany}>
|
||||
<Image
|
||||
className={`${PREFIX}__avatar company`}
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/avatar_m.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<div className={`${PREFIX}__content`}>
|
||||
<div className="title">我是企业</div>
|
||||
<div className="desc">我要招主播</div>
|
||||
</div>
|
||||
<Image src={require('@/statics/svg/arrow-right.svg')} mode="aspectFill" className={`${PREFIX}__arrow`} />
|
||||
</div>
|
||||
</div>
|
||||
<Slogan />
|
||||
<AgreementPopup open={open} onCancel={handleCancel} onConfirm={handleConfirm} />
|
||||
{/*<div className={`${PREFIX}__role-app`}>*/}
|
||||
{/* <div className={`${PREFIX}__greet`}>Hi,很高兴见到你</div>*/}
|
||||
{/* <div className={`${PREFIX}__title`}>请选择您的身份</div>*/}
|
||||
{/* <div className={`${PREFIX}__card`} onClick={handleAnchor}>*/}
|
||||
{/* <Image*/}
|
||||
{/* className={`${PREFIX}__avatar anchor`}*/}
|
||||
{/* src="https://publiccdn.neighbourhood.com.cn/img/avatar_f.png"*/}
|
||||
{/* mode="aspectFill"*/}
|
||||
{/* />*/}
|
||||
{/* <div className={`${PREFIX}__content`}>*/}
|
||||
{/* <div className="title">我是主播</div>*/}
|
||||
{/* <div className="desc">我要找工作</div>*/}
|
||||
{/* </div>*/}
|
||||
{/* <Image src={require('@/statics/svg/arrow-right.svg')} mode="aspectFill" className={`${PREFIX}__arrow`} />*/}
|
||||
{/* </div>*/}
|
||||
{/* <div className={`${PREFIX}__card`} onClick={handleCompany}>*/}
|
||||
{/* <Image*/}
|
||||
{/* className={`${PREFIX}__avatar company`}*/}
|
||||
{/* src="https://publiccdn.neighbourhood.com.cn/img/avatar_m.png"*/}
|
||||
{/* mode="aspectFill"*/}
|
||||
{/* />*/}
|
||||
{/* <div className={`${PREFIX}__content`}>*/}
|
||||
{/* <div className="title">我是企业</div>*/}
|
||||
{/* <div className="desc">我要招主播</div>*/}
|
||||
{/* </div>*/}
|
||||
{/* <Image src={require('@/statics/svg/arrow-right.svg')} mode="aspectFill" className={`${PREFIX}__arrow`} />*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
{/*<Slogan />*/}
|
||||
{/*<AgreementPopup open={open} onCancel={handleCancel} onConfirm={handleConfirm} />*/}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
@ -21,9 +21,9 @@
|
||||
padding-top: var(--tabs-wrap-height);
|
||||
}
|
||||
|
||||
.taroify-tabs__nav .taroify-tabs__tab:nth-child(2) .taroify-badge-wrapper {
|
||||
left: 18px;
|
||||
}
|
||||
//.taroify-tabs__nav .taroify-tabs__tab:nth-child(2) .taroify-badge-wrapper {
|
||||
// left: 18px;
|
||||
//}
|
||||
}
|
||||
|
||||
&__star {
|
||||
|
@ -17,7 +17,6 @@ import { getCommonShareMessage } from '@/utils/share';
|
||||
import { checkCityCode } from '@/utils/user';
|
||||
|
||||
import './index.less';
|
||||
import { SortType } from '@/constants/job';
|
||||
|
||||
const PREFIX = 'page-biz-service';
|
||||
const EXAMPLE_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-example.png';
|
||||
@ -106,8 +105,8 @@ export default function BizService() {
|
||||
value="1"
|
||||
title={
|
||||
<>
|
||||
免费招
|
||||
<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />
|
||||
主播群
|
||||
{/*<Image src={require('@/statics/svg/star.svg')} className={`${PREFIX}__star`} />*/}
|
||||
</>
|
||||
}
|
||||
>
|
||||
|
@ -49,6 +49,7 @@ export type JobDetails = JobInfo &
|
||||
declarationType: DeclarationType; // 报单类型
|
||||
userId: string; // 发布人的 userId
|
||||
verifyFailReason?: string; // 审核不通过的原因
|
||||
sourcePlat?: string;
|
||||
};
|
||||
|
||||
export interface JobManageInfo {
|
||||
|
@ -13,6 +13,7 @@ export interface ProductInfo {
|
||||
balance: number;
|
||||
created: number;
|
||||
updated: number;
|
||||
isPaidVip?: boolean;
|
||||
// 报单类型信息,只有 use 接口返回值才有
|
||||
declarationTypeResult?: DeclarationTypeResult;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { API } from '@/http/api';
|
||||
import store from '@/store';
|
||||
import { selectLocation } from '@/store/selector';
|
||||
import {
|
||||
JobDetails,
|
||||
CreateJobInfo,
|
||||
GetJobManagesRequest,
|
||||
GetJobManagesResponse,
|
||||
GetJobsDetailsRequest,
|
||||
GetJobsRequest,
|
||||
GetJobsResponse,
|
||||
JobInfo,
|
||||
GetMyRecommendJobRequest,
|
||||
GetUserJobRequest,
|
||||
GetUserJobResponse,
|
||||
MyDeclaredJobInfo,
|
||||
MyBrowsedJobInfo,
|
||||
GetMyRecommendJobRequest,
|
||||
GetJobManagesRequest,
|
||||
GetJobManagesResponse,
|
||||
CreateJobInfo,
|
||||
JobDetails,
|
||||
JobInfo,
|
||||
JobManageInfo,
|
||||
MyBrowsedJobInfo,
|
||||
MyDeclaredJobInfo,
|
||||
} from '@/types/job';
|
||||
import { collectEvent } from '@/utils/event';
|
||||
import { getCityValues } from '@/utils/location';
|
||||
|
@ -2,7 +2,7 @@ import Taro from '@tarojs/taro';
|
||||
|
||||
import { ProductType, QrCodeType } from '@/constants/product';
|
||||
import http from '@/http';
|
||||
import { API, DOMAIN } from '@/http/api';
|
||||
import { API } from '@/http/api';
|
||||
import {
|
||||
ProductInfo,
|
||||
GetProductDetailRequest,
|
||||
@ -54,13 +54,13 @@ export async function requestUseProduct(
|
||||
}
|
||||
|
||||
// 获取某个产品的剩余解锁次数
|
||||
export async function requestProductBalance(productCode: ProductType) {
|
||||
export async function requestProductBalance(productCode: ProductType): Promise<[number, boolean | undefined]> {
|
||||
const data: GetProductDetailRequest = { productCode, userId: getUserId() };
|
||||
const { balance } = await http.post<ProductInfo>(API.GET_PRODUCT_DETAIL, {
|
||||
const { balance, isPaidVip } = await http.post<ProductInfo>(API.GET_PRODUCT_DETAIL, {
|
||||
data,
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
});
|
||||
return balance;
|
||||
return [balance, isPaidVip];
|
||||
}
|
||||
|
||||
// 是否可以购买某一个产品
|
||||
|
@ -156,14 +156,18 @@ export const getCityCodes = (): string[] => {
|
||||
return !cachedValue || !Array.isArray(cachedValue) ? [] : cachedValue;
|
||||
};
|
||||
export const setCityCodes = (cityCode: string[]) => Taro.setStorageSync(CacheKey.CITY_CODES, cityCode);
|
||||
export const checkCityCode = (cityCode: string): boolean => {
|
||||
export const validCityCode = (cityCode: string) => {
|
||||
const cachedCityCodes = getCityCodes();
|
||||
const isNewCityCode = cachedCityCodes.indexOf(cityCode) === -1;
|
||||
if (cachedCityCodes.length === 2 && isNewCityCode) {
|
||||
return !(cachedCityCodes.length === 2 && isNewCityCode);
|
||||
};
|
||||
export const checkCityCode = (cityCode: string): boolean => {
|
||||
if (!validCityCode(cityCode)) {
|
||||
Toast.info('最多只能进入2个城市');
|
||||
return false;
|
||||
}
|
||||
if (isNewCityCode) {
|
||||
const cachedCityCodes = getCityCodes();
|
||||
if (cachedCityCodes.indexOf(cityCode) === -1) {
|
||||
setCityCodes([...cachedCityCodes, cityCode]);
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user