| | |
| | | prop="photo" |
| | | label-position="top" |
| | | > |
| | | <Uploader v-model:file-list="form.photo" :maximum="6" class="bole-uploader"> </Uploader> |
| | | <Uploader v-model:file-list="form.lifeCircleImgUrlList" :maximum="6" class="bole-uploader"> |
| | | </Uploader> |
| | | </nut-form-item> |
| | | </nut-form> |
| | | </ContentScrollView> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUser } from '@/hooks'; |
| | | import { goBack } from '@/utils'; |
| | | import { NumberInput } from '@12333/components'; |
| | | import * as userResumeServices from '@12333/services/api/userResume'; |
| | | import { convertApiPath2Url, Message } from '@12333/utils'; |
| | | import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const { userDetail } = useUser(); |
| | | const { |
| | | isLoading, |
| | | isError, |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['userResumeServices/getUserResumeDetailInfo'], |
| | | queryFn: async () => { |
| | | return await userResumeServices.getUserResumeDetailInfo({ |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | placeholderData: () => ({} as API.UserResumeDetailInfoOutput), |
| | | onSuccess(data) { |
| | | form.height = data.height; |
| | | form.weight = data.weight; |
| | | form.lifeCircleImgUrlList = data.lifeCircleImgUrlList?.length |
| | | ? data.lifeCircleImgUrlList.map((x) => convertApiPath2Url(x)) |
| | | : []; |
| | | }, |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | height: '', |
| | | weight: '', |
| | | photo: [], |
| | | lifeCircleImgUrlList: [] as FileItem[], |
| | | }); |
| | | |
| | | function handleConfirm() {} |
| | | async function handleConfirm() { |
| | | try { |
| | | let params: API.SaveUserResumeDetailInfoInput = { |
| | | weight: form.weight, |
| | | height: form.weight, |
| | | lifeCircleImgUrlList: form.lifeCircleImgUrlList?.length |
| | | ? form.lifeCircleImgUrlList.map((x) => x.url) |
| | | : [], |
| | | }; |
| | | let res = await userResumeServices.saveUserResumeDetailInfo(params); |
| | | if (res) { |
| | | Message.success('保存成功', { |
| | | onClosed() { |
| | | goBack(); |
| | | }, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .person-photo { |
| | | .nut-form-item__label { |
| | | padding-right: 0; |
| | | .mineDetailedInfo-page-wrapper { |
| | | .person-photo { |
| | | .nut-form-item__label { |
| | | padding-right: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .nut-form .nut-cell.bole-form-item:not(.alignTop), |
| | | page .nut-form .nut-cell.bole-form-item:not(.alignTop) { |
| | | align-items: flex-start !important; |
| | | .nut-form .nut-cell.bole-form-item:not(.alignTop), |
| | | page .nut-form .nut-cell.bole-form-item:not(.alignTop) { |
| | | align-items: flex-start !important; |
| | | } |
| | | } |
| | | </style> |