feat:
This commit is contained in:
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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -44,7 +44,7 @@ const GET_CONTACT_TYPE_OPTIONS = [
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
type: GET_CONTACT_TYPE.INVITE,
|
type: GET_CONTACT_TYPE.INVITE,
|
||||||
icon: '',
|
icon: 'https://publiccdn.neighbourhood.com.cn/img/invite-operations.png',
|
||||||
title: '邀请运营进群(进会员)',
|
title: '邀请运营进群(进会员)',
|
||||||
desc: '每邀请进一个主播群送一个日会员',
|
desc: '每邀请进一个主播群送一个日会员',
|
||||||
btnText: '邀请',
|
btnText: '邀请',
|
||||||
|
|||||||
@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user