feat: update

This commit is contained in:
chashaobao
2025-06-27 22:46:24 +08:00
parent 0020eb8dbe
commit de2f380cd9
22 changed files with 183 additions and 59 deletions

View File

@ -6,13 +6,14 @@ import { useCallback, useEffect, useRef, useState } from 'react';
import HomePage from '@/components/home-page';
import { LoginGuide } from '@/components/login-guide';
import MaterialGuide from '@/components/material-guide';
import { EventName, OpenSource, PageUrl } from '@/constants/app';
import { EventName, OpenSource, PageType, PageUrl, RoleType } from '@/constants/app';
import { EmployType, JOB_PAGE_TABS, SortType } from '@/constants/job';
import JobFragment from '@/fragments/job/base';
import useInviteCode from '@/hooks/use-invite-code';
import useLocation from '@/hooks/use-location';
import useNavigation from '@/hooks/use-navigation';
import { Coordinate } from '@/types/location';
import { switchRoleType } from '@/utils/app';
import { logWithPrefix } from '@/utils/common';
import { getWxLocation, isNotNeedAuthorizeLocation, requestLocation } from '@/utils/location';
import { requestUnreadMessageCount } from '@/utils/message';
@ -96,6 +97,7 @@ export default function Job() {
}, [location]);
useLoad(async () => {
switchRoleType(RoleType.Anchor);
const query = getPageQuery<{ sortType: SortType; c?: string; scene?: string }>();
const type = query.sortType;
if (type === SortType.CREATE_TIME) {
@ -121,11 +123,11 @@ export default function Job() {
path: getJumpUrl(PageUrl.Job, { sortType, c: inviteCode }),
};
}
return getCommonShareMessage({ inviteCode });
return getCommonShareMessage({ inviteCode, path: PageUrl.Job });
});
return (
<HomePage>
<HomePage type={PageType.JOB}>
<Tabs
swipeable
value={tabType}