feat: update
This commit is contained in:
@ -22,6 +22,7 @@ import { RESPONSE_ERROR_CODE } from '@/http/constant';
|
||||
import { HttpError } from '@/http/error';
|
||||
import { JobDetails } from '@/types/job';
|
||||
import { IMaterialMessage } from '@/types/message';
|
||||
import { switchRoleType } from '@/utils/app';
|
||||
import { copy, logWithPrefix } from '@/utils/common';
|
||||
import { collectEvent, reportEvent } from '@/utils/event';
|
||||
import { getJobTitle, getJobSalary, postPublishJob, requestJobDetail } from '@/utils/job';
|
||||
@ -218,6 +219,8 @@ export default function JobDetail() {
|
||||
}, []);
|
||||
|
||||
useLoad(async () => {
|
||||
switchRoleType(RoleType.Anchor);
|
||||
|
||||
const query = getPageQuery<Pick<JobDetails, 'id'> & { c: string }>();
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
const jobId = query?.id;
|
||||
@ -237,6 +240,7 @@ export default function JobDetail() {
|
||||
if (!data) {
|
||||
return getCommonShareMessage({ inviteCode });
|
||||
}
|
||||
|
||||
return {
|
||||
title: getJobTitle(data) || '',
|
||||
path: getJumpUrl(PageUrl.JobDetail, { id: data.id, share: true, c: inviteCode }),
|
||||
|
||||
Reference in New Issue
Block a user