| | |
| | | v-bind="infiniteLoadingProps" |
| | | > |
| | | <template #renderItem="{ item }"> |
| | | <FlexJobCard> </FlexJobCard> |
| | | <FlexJobCard |
| | | :name="item.name" |
| | | :age="item.age" |
| | | :genderType="item.genderType" |
| | | :workExperience="item.workExperience" |
| | | :isRealName="item.isRealName" |
| | | :arrangeCount="item.arrangeCount" |
| | | :educationalLevel="item.educationalLevel" |
| | | @contact="handleContact" |
| | | @cancel-collection="handleCancelCollection(item)" |
| | | > |
| | | </FlexJobCard> |
| | | </template> |
| | | </InfiniteLoading> |
| | | </template> |
| | |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType } from '@12333/constants'; |
| | | import * as orderServices from '@12333/services/api/Order'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import { Message } from '@12333/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.FrontOrderListInput = { |
| | | let params: API.PageInput = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [{ property: 'isRecommend', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | }, |
| | | }; |
| | | |
| | | return orderServices.getFrontOrderList(params, { |
| | | return flexWorkerServices.getWorkerResumeCollectList(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList'], |
| | | queryKey: ['flexWorkerServices/getWorkerResumeCollectList'], |
| | | } |
| | | ); |
| | | |
| | | function handleContact() {} |
| | | async function handleCancelCollection(item: API.GetNewestWorkerListOutput) { |
| | | try { |
| | | let params: API.APIcancelUserResumeCollectParams = { |
| | | flexWorkerId: item.userId, |
| | | }; |
| | | let res = await flexWorkerServices.cancelUserResumeCollect(params); |
| | | if (res) { |
| | | Message.success('操作成功'); |
| | | invalidateQueries(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |