This commit is contained in:
chashaobao
2025-08-16 13:02:46 +08:00
parent 943f921e56
commit 34f9c8d0e6
4 changed files with 42 additions and 33 deletions

View File

@ -1,6 +1,7 @@
import { Button, Image, Map, MapProps, Text } from '@tarojs/components';
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
import { Dialog } from '@taroify/core';
import React, { useCallback, useEffect, useState } from 'react';
import { CertificationStatusIcon } from '@/components/certification-status';
@ -12,15 +13,19 @@ import LoginButton from '@/components/login-button';
import PageLoading from '@/components/page-loading';
import { PrejobPopup } from '@/components/prejob-popup';
import ProductJobDialog from '@/components/product-dialog/job';
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
import { EventName, PageUrl, RoleType } from '@/constants/app';
import { CertificationStatusType } from '@/constants/company';
import { CollectEventName, ReportEventId } from '@/constants/event';
import { EMPLOY_TYPE_TITLE_MAP, GET_CONTACT_TYPE, JobManageStatus } from '@/constants/job';
import { ProductType } from '@/constants/product';
import useInviteCode from '@/hooks/use-invite-code';
import useUserInfo from '@/hooks/use-user-info';
import useRoleType from '@/hooks/user-role-type';
import { RESPONSE_ERROR_CODE } from '@/http/constant';
import { HttpError } from '@/http/error';
import store from '@/store';
import { cacheJobId } from '@/store/actions';
import { JobDetails } from '@/types/job';
import { IMaterialMessage } from '@/types/message';
import { switchRoleType } from '@/utils/app';
@ -31,6 +36,7 @@ import { calcDistance, isValidLocation } from '@/utils/location';
import { requestProfileDetail } from '@/utils/material';
import { isChatWithSelf, postCreateChat } from '@/utils/message';
import { getInviteCodeFromQueryAndUpdate } from '@/utils/partner';
import { requestProductBalance, requestProductUseRecord } from '@/utils/product';
import { getJumpUrl, getPageQuery, navigateTo } from '@/utils/route';
import { getCommonShareMessage } from '@/utils/share';
import { formatDate } from '@/utils/time';
@ -38,12 +44,6 @@ import Toast from '@/utils/toast';
import { isNeedCreateMaterial } from '@/utils/user';
import './index.less';
import { Dialog } from '@taroify/core';
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
import { requestProductBalance, requestProductUseRecord } from '@/utils/product';
import { ProductType } from '@/constants/product';
import store from '@/store';
import { cacheJobId } from '@/store/actions';
const PREFIX = 'job-detail';
const log = logWithPrefix(PREFIX);
@ -105,16 +105,18 @@ const AnchorFooter = (props: { data: JobDetails }) => {
let materialMessage: null | IMaterialMessage = null;
if (!needCreateMaterial) {
const profile = await requestProfileDetail();
materialMessage = {
id: profile.id,
name: profile.name,
age: profile.age,
height: profile.height,
weight: profile.weight,
shoeSize: profile.shoeSize,
gender: profile.gender,
workedSecCategoryStr: profile.workedSecCategoryStr,
};
if (profile) {
materialMessage = {
id: profile.id,
name: profile.name,
age: profile.age,
height: profile.height,
weight: profile.weight,
shoeSize: profile.shoeSize,
gender: profile.gender,
workedSecCategoryStr: profile.workedSecCategoryStr,
};
}
}
navigateTo(PageUrl.MessageChat, {
chatId: chat.chatId,