revert ad
This commit is contained in:
@ -3,11 +3,7 @@ import { Button, Image } from '@tarojs/components';
|
||||
import { Popup } from '@taroify/core';
|
||||
|
||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { GET_CONTACT_TYPE } from '@/constants/job';
|
||||
import { hasShareToGetContact } from '@/utils/job';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
|
||||
import './index.less';
|
||||
|
||||
interface IProps {
|
||||
@ -19,13 +15,6 @@ interface IProps {
|
||||
const PREFIX = 'prejob-popup';
|
||||
|
||||
const GET_CONTACT_TYPE_OPTIONS = [
|
||||
{
|
||||
type: GET_CONTACT_TYPE.SHARE,
|
||||
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',
|
||||
@ -33,22 +22,11 @@ const GET_CONTACT_TYPE_OPTIONS = [
|
||||
desc: '开通会员每天可查看5个',
|
||||
btnText: '开通',
|
||||
},
|
||||
{
|
||||
type: GET_CONTACT_TYPE.VIDEO,
|
||||
icon: 'https://publiccdn.neighbourhood.com.cn/img/video.svg',
|
||||
title: '观看视频',
|
||||
desc: '观看6-30s广告即可免费查看',
|
||||
btnText: '观看',
|
||||
},
|
||||
];
|
||||
|
||||
export function PrejobPopup({ open, onCancel, onConfirm }: IProps) {
|
||||
const handleClick = (type: GET_CONTACT_TYPE) => () => {
|
||||
if (type === GET_CONTACT_TYPE.SHARE) {
|
||||
navigateTo(PageUrl.PartnerShare);
|
||||
} else {
|
||||
onConfirm(type);
|
||||
}
|
||||
onConfirm(type);
|
||||
};
|
||||
return (
|
||||
<Popup rounded className={PREFIX} placement="bottom" open={open} onClose={onCancel}>
|
||||
@ -56,11 +34,6 @@ export function PrejobPopup({ open, onCancel, onConfirm }: IProps) {
|
||||
<div className={`${PREFIX}__title`}>以下方式任选其一均可获取联系方式</div>
|
||||
<div className={`${PREFIX}__body`}>
|
||||
{GET_CONTACT_TYPE_OPTIONS.map(option => {
|
||||
// 该方式只能用一次, 以后不再出现在选项中
|
||||
if (option.type === GET_CONTACT_TYPE.SHARE && !hasShareToGetContact()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`${PREFIX}__item`} key={option.type}>
|
||||
<div className={`${PREFIX}__item-icon ${option.type}`}>
|
||||
|
Reference in New Issue
Block a user