| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <List> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <ListItem title="健康证" @click="handleEdit"> </ListItem> |
| | | <List v-if="detail?.length > 0"> |
| | | <ListItem |
| | | v-for="item in detail" |
| | | :key="item.id" |
| | | :title="item.typeContent" |
| | | @click="handleAdOrEdit(item.id)" |
| | | > |
| | | </ListItem> |
| | | </List> |
| | | </ContentScrollView> |
| | | <PageFooter> |
| | | <PageFooterBtn type="primary" @click="handleAdd">添加证书</PageFooterBtn> |
| | | <PageFooterBtn type="primary" @click="handleAdOrEdit()">添加证书</PageFooterBtn> |
| | | </PageFooter> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUser } from '@/hooks'; |
| | | import { List, ListItem } from '@12333/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { RouterPath } from '@/constants'; |
| | | import * as userResumeServices from '@12333/services/apiV2/userResume'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const { userDetail } = useUser(); |
| | | |
| | | const form = reactive({ |
| | | workYear: '', |
| | | const { |
| | | isLoading, |
| | | isError, |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['userResumeServices/getUserResumeCredentials'], |
| | | queryFn: async () => { |
| | | return await userResumeServices.getUserResumeCredentials( |
| | | {}, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => [] as API.GetUserResumeCredentialsQueryResultItem[], |
| | | }); |
| | | |
| | | function handleAdd() { |
| | | function handleAdOrEdit(id?: string) { |
| | | Taro.navigateTo({ |
| | | url: RouterPath.mineCertificateAddOrEdit, |
| | | url: `${RouterPath.mineCertificateAddOrEdit}?id=${id ?? ''}`, |
| | | }); |
| | | } |
| | | function handleEdit() {} |
| | | </script> |
| | | |
| | | <style lang="scss"> |