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

@ -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 }),