feat: update
This commit is contained in:
@ -1,27 +1,30 @@
|
||||
import { Image } from '@tarojs/components';
|
||||
import Taro, { useShareAppMessage } from '@tarojs/taro';
|
||||
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { Button, Tabs } from '@taroify/core';
|
||||
import { useCallback } from 'react';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import HomePage from '@/components/home-page';
|
||||
import SearchCity from '@/components/search-city';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { PageType, PageUrl, RoleType } from '@/constants/app';
|
||||
import { GROUPS } from '@/constants/group';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import { switchRoleType } from '@/utils/app';
|
||||
import { openCustomerServiceChat } from '@/utils/common';
|
||||
import { getCurrentCityCode } from '@/utils/location';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
import { getPageQuery, navigateTo } from '@/utils/route';
|
||||
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';
|
||||
const COMMENT_IMAGE = 'https://publiccdn.neighbourhood.com.cn/img/delegate-comments.png';
|
||||
export default function BizService() {
|
||||
const inviteCode = useInviteCode();
|
||||
const [value, setValue] = useState('0');
|
||||
|
||||
const handleClickDelegate = useCallback(() => {
|
||||
navigateTo(PageUrl.GroupDelegatePublish);
|
||||
@ -44,13 +47,33 @@ export default function BizService() {
|
||||
openCustomerServiceChat(group.serviceUrl);
|
||||
}
|
||||
}, []);
|
||||
useShareAppMessage(() => getCommonShareMessage({ inviteCode }));
|
||||
const handleChange = useCallback(v => {
|
||||
setValue(v);
|
||||
}, []);
|
||||
|
||||
useLoad(() => {
|
||||
switchRoleType(RoleType.Company);
|
||||
|
||||
const query = getPageQuery<{ tab?: string }>();
|
||||
if (query.tab) {
|
||||
handleChange(query.tab);
|
||||
}
|
||||
});
|
||||
|
||||
useShareAppMessage(() =>
|
||||
getCommonShareMessage({
|
||||
inviteCode,
|
||||
path: PageUrl.UserBatchPublish,
|
||||
title: '邀请你加入本地主播求职招聘群',
|
||||
params: { tab: '1' },
|
||||
})
|
||||
);
|
||||
|
||||
return (
|
||||
<HomePage>
|
||||
<HomePage type={PageType.BatchPublish}>
|
||||
<div className={PREFIX}>
|
||||
<Tabs className={`${PREFIX}__tabs`} defaultValue={0}>
|
||||
<Tabs.TabPane value={0} title="群代发">
|
||||
<Tabs className={`${PREFIX}__tabs`} value={value} onChange={handleChange}>
|
||||
<Tabs.TabPane value="0" title="群代发">
|
||||
<div className={`${PREFIX}__delegate`}>
|
||||
<Image
|
||||
mode="widthFix"
|
||||
@ -80,7 +103,7 @@ export default function BizService() {
|
||||
</div>
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
value={1}
|
||||
value="1"
|
||||
title={
|
||||
<>
|
||||
免费招
|
||||
@ -96,7 +119,7 @@ export default function BizService() {
|
||||
banner="点击城市名称,进本地通告群,免费招主播"
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane value={2} title="代招">
|
||||
<Tabs.TabPane value="2" title="代招">
|
||||
<div className={`${PREFIX}__recruitment`}>
|
||||
<div className={`${PREFIX}__recruitment-card`}>
|
||||
<div className={`${PREFIX}__recruitment-h5`}>服务城市</div>
|
||||
|
||||
Reference in New Issue
Block a user