feat: update
This commit is contained in:
@ -4,8 +4,10 @@ import { useCallback } from 'react';
|
||||
|
||||
import HomePage from '@/components/home-page';
|
||||
import SearchCity from '@/components/search-city';
|
||||
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 { getInviteCodeFromQueryAndUpdate } from '@/utils/partner';
|
||||
@ -20,11 +22,15 @@ export default function GroupV2() {
|
||||
const inviteCode = useInviteCode();
|
||||
|
||||
useLoad(() => {
|
||||
switchRoleType(RoleType.Anchor);
|
||||
|
||||
const query = getPageQuery();
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
});
|
||||
|
||||
useShareAppMessage(() => getCommonShareMessage({ inviteCode }));
|
||||
useShareAppMessage(() =>
|
||||
getCommonShareMessage({ inviteCode, title: '邀请你加入本地主播求职招聘群', path: PageUrl.GroupV2 })
|
||||
);
|
||||
|
||||
const handleSelectCity = useCallback(cityCode => {
|
||||
if (!checkCityCode(cityCode)) {
|
||||
@ -37,14 +43,14 @@ export default function GroupV2() {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<HomePage>
|
||||
<HomePage type={PageType.GroupV2}>
|
||||
<div className={PREFIX}>
|
||||
<SearchCity
|
||||
onSelectCity={handleSelectCity}
|
||||
currentCity={getCurrentCityCode()}
|
||||
forGroup
|
||||
offset={72}
|
||||
banner="点击城市加入本地通告群,高薪工作早知道"
|
||||
banner="点击城市加入本地主播招聘群,高薪职位早知道"
|
||||
/>
|
||||
</div>
|
||||
</HomePage>
|
||||
|
||||
Reference in New Issue
Block a user