From 58e6c22b584ba40169753ec5038dec7d780c0bd3 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 17 十月 2025 19:47:30 +0800
Subject: [PATCH] Merge branch 'dev-1.2.0.1' of http://120.26.58.240:8888/r/flexJobMiniApp into dev-1.2.0.1
---
apps/bMiniApp/src/subpackages/flexJob/flexJobDetail/flexJobDetail.vue | 158 +++++++++++++++++++++++-----------------------------
1 files changed, 71 insertions(+), 87 deletions(-)
diff --git a/apps/bMiniApp/src/subpackages/flexJob/flexJobDetail/flexJobDetail.vue b/apps/bMiniApp/src/subpackages/flexJob/flexJobDetail/flexJobDetail.vue
index 054ed39..4774ccc 100644
--- a/apps/bMiniApp/src/subpackages/flexJob/flexJobDetail/flexJobDetail.vue
+++ b/apps/bMiniApp/src/subpackages/flexJob/flexJobDetail/flexJobDetail.vue
@@ -1,37 +1,46 @@
<template>
<PageLayoutWithBg class="flexJobDetail-page-wrapper" title="鐏靛伐璇︽儏" :need-auth="false">
<LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch">
- <ContentScrollView style="background-color: transparent">
- <FlexJobTopView size="small" class="flexJobDetail-top" />
- <div class="flexJobDetail-contact-info">
- <div class="flexJobDetail-contact-info-item">
- <div class="flexJobDetail-contact-info-item-label">鎵嬫満鍙凤細</div>
- <div class="flexJobDetail-contact-info-item-text">
- {{ isCollapse ? '13333333333' : '绔嬪嵆鑱旂郴鍚庡彲鏌ョ湅' }}
- </div>
- </div>
- <div class="flexJobDetail-contact-info-item">
- <div class="flexJobDetail-contact-info-item-label">韬唤璇佸彿锛�</div>
- <div class="flexJobDetail-contact-info-item-text">
- {{ isCollapse ? '330902199909******' : '绔嬪嵆鑱旂郴鍚庡彲鏌ョ湅' }}
- </div>
- </div>
- </div>
- </ContentScrollView>
- <PageFooter>
- <PageFooterAction
- :icon="IconShare"
- text="鍒嗕韩"
- :isFlex="false"
- openType="share"
- ></PageFooterAction>
- <PageFooterAction
- :icon="IconAttentionActive"
- text="鏀惰棌"
- :isFlex="false"
- ></PageFooterAction>
- <PageFooterBtn type="primary" @click="toggle">绔嬪嵆鑱旂郴</PageFooterBtn>
- </PageFooter>
+ <JobDetailContent
+ :avatar="userResumeInfo.avatar"
+ :name="userResumeInfo.name"
+ :age="userResumeInfo.age"
+ :isReal="userResumeInfo.isReal"
+ :gender="userResumeInfo.gender"
+ :personalIdentityContent="userResumeInfo.personalIdentityContent"
+ :educationalBackgroundContent="userResumeInfo.educationalBackgroundContent"
+ :taskCount="userResumeInfo.taskCount"
+ :contactPhoneNumber="userResumeInfo.contactPhoneNumber"
+ :identity="userResumeInfo.identity"
+ :isCollapse="isCollapse"
+ :userExpectJobs="userResumeInfo.userExpectJobs"
+ :freeTime="userResumeInfo.freeTime"
+ :jobSeekingStatus="userResumeInfo.jobSeekingStatus"
+ :userCredentials="userResumeInfo.userCredentials"
+ :workSeniority="userResumeInfo.workSeniority"
+ :workExperience="userResumeInfo.workExperience"
+ :photos="userResumeInfo.photos"
+ :height="userResumeInfo.height"
+ :weight="userResumeInfo.weight"
+ :videos="userResumeInfo.videos"
+ :taskInfoUsers="userResumeInfo.taskInfoUsers"
+ >
+ <template #footer>
+ <PageFooterAction
+ :icon="IconShare"
+ text="鍒嗕韩"
+ :isFlex="false"
+ openType="share"
+ ></PageFooterAction>
+ <PageFooterAction
+ :icon="userResumeInfo.isCollected ? IconAttentionActive : IconAttention"
+ text="鏀惰棌"
+ :isFlex="false"
+ @click="handleAttention"
+ ></PageFooterAction>
+ <PageFooterBtn type="primary" @click="handleContact">绔嬪嵆鑱旂郴</PageFooterBtn>
+ </template>
+ </JobDetailContent>
</LoadingLayout>
</PageLayoutWithBg>
</template>
@@ -39,76 +48,51 @@
<script setup lang="ts">
import Taro from '@tarojs/taro';
import { useQuery } from '@tanstack/vue-query';
-import * as orderServices from '@12333/services/api/Order';
-import { FlexJobTopView } from '@12333/components';
+import * as userResumeServices from '@12333/services/apiV2/userResume';
import IconShare from '@/assets/flexJob/icon-share.png';
import IconAttention from '@/assets/flexJob/icon-attention-lg.png';
import IconAttentionActive from '@/assets/flexJob/icon-attention-lg-active.png';
import { useToggle } from 'senin-mini/hooks';
+import { Message } from '@12333/utils';
+import { useUserResume } from '@12333/hooks';
+import { useAccessLogin } from '@/hooks';
defineOptions({
name: 'flexJobDetail',
});
const router = Taro.useRouter();
-const taskId = router.params?.id ?? '';
+const userId = router.params?.userId ?? '';
-const {
- isLoading,
- isError,
- data: detail,
- refetch,
-} = useQuery({
- queryKey: ['orderServices/getOrdeForDetail', taskId],
- queryFn: async () => {
- return await orderServices.getOrdeForDetail(
- { id: taskId },
- {
- showLoading: false,
- }
- );
- },
- placeholderData: () => ({} as API.OrderInfoDto),
+const { isLoading, isError, userResumeInfo, refetch } = useUserResume({
+ userId: userId,
});
const { isCollapse, toggle } = useToggle();
-</script>
-<style lang="scss">
-@import '@/styles/common.scss';
-
-.flexJobDetail-page-wrapper {
- .flexJobDetail-top {
- margin-bottom: 20px;
- }
-
- .flexJobDetail-contact-info {
- padding-left: 130px;
-
- .flexJobDetail-contact-info-item {
- display: flex;
- align-items: center;
- font-weight: 400;
- font-size: 24px;
- line-height: 28px;
- margin-bottom: 22px;
-
- &:last-child {
- margin-bottom: 0;
- }
-
- .flexJobDetail-contact-info-item-label {
- color: boleGetCssVar('text-color', 'secondary');
- margin-right: 8px;
- }
-
- .flexJobDetail-contact-info-item-text {
- color: boleGetCssVar('text-color', 'primary');
- flex: 1;
- min-width: 0;
- @include ellipsis;
- }
+const handleContact = useAccessLogin(async () => {
+ try {
+ if (!isCollapse.value) {
+ await userResumeServices.contactUserResume({ id: userId });
+ toggle();
+ } else {
+ Taro.makePhoneCall({
+ phoneNumber: userResumeInfo.value.contactPhoneNumber,
+ });
}
- }
+ } catch (error) {}
+});
+
+async function handleAttention() {
+ try {
+ let params: API.CollectUserResumeCommand = {
+ id: userId,
+ isCollected: !userResumeInfo.value.isCollected,
+ };
+ let res = await userResumeServices.collectUserResume(params);
+ if (res) {
+ refetch({ type: 'inactive' });
+ }
+ } catch (error) {}
}
-</style>
+</script>
--
Gitblit v1.9.1