| | |
| | | </div> |
| | | <div class="reset-localtion" @click="resetLocation">重新定位</div> |
| | | </div> |
| | | <div class="home-banner-wrapper"> |
| | | <!-- <div class="home-banner-wrapper"> |
| | | <nut-swiper :auto-play="3000"> |
| | | <nut-swiper-item v-for="(item, index) in list" :key="index"> |
| | | <img :src="item" class="banner-img" draggable="false" /> |
| | | </nut-swiper-item> |
| | | </nut-swiper> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <ProTabs |
| | | v-model="queryState.orderType" |
| | |
| | | import { ProTabs, ProTabPane, FlexJobCard } from '@12333/components'; |
| | | import { HomeOrderType } from './constants'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType, Gender } from '@12333/constants'; |
| | | import * as orderServices from '@12333/services/api/Order'; |
| | | import { |
| | | EnumPagedListOrder, |
| | | EnumTaskRecommendStatus, |
| | | EnumTaskReleaseStatus, |
| | | EnumUserGender, |
| | | } from '@12333/constants'; |
| | | import * as taskServices from '@12333/services/apiV2/task'; |
| | | import _ from 'lodash'; |
| | | import HomeQueryMenuView from './HomeQueryMenuView.vue'; |
| | | import HomeQueryPositionMenuView from './HomeQueryPositionMenuView.vue'; |
| | |
| | | const userStore = useUserStore(); |
| | | |
| | | const queryMenuState = reactive({ |
| | | gender: '' as any as Gender, |
| | | genderLimit: '' as any as EnumUserGender, |
| | | age: [15, 65], |
| | | identity: '', |
| | | certificateType: '', |
| | | }); |
| | | |
| | | const queryPositionState = reactive({ |
| | | position: [], |
| | | position: [] as string[], |
| | | }); |
| | | |
| | | const queryState = reactive({ |
| | |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.FrontOrderListInput = { |
| | | let params: API.GetTaskInfosQuery = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [ |
| | | queryState.orderType === HomeOrderType.Recommend |
| | | ? { property: 'isRecommend', order: OrderInputType.Desc } |
| | | : { property: 'lastShelfTime', order: OrderInputType.Desc }, |
| | | ? { property: 'createdTime', order: EnumPagedListOrder.Desc } |
| | | : {}, |
| | | ], |
| | | }, |
| | | // keywords: 'string', |
| | | // time: '2025-08-08T02:58:58.756Z', |
| | | // cityCode: 'string', |
| | | // settlementCycle: 10, |
| | | // benefitCodes: ['string'], |
| | | genderLimit: queryMenuState.genderLimit, |
| | | // status: 10, |
| | | releaseStatus: EnumTaskReleaseStatus.InProcess, |
| | | }; |
| | | |
| | | return orderServices.getFrontOrderList(params, { |
| | | if (queryState.orderType === HomeOrderType.Recommend) { |
| | | params.recommendStatus = EnumTaskRecommendStatus.Yes; |
| | | } |
| | | |
| | | return taskServices.getTaskInfos(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList', queryState, queryMenuState, queryPositionState], |
| | | queryKey: ['taskServices/getTaskInfos', queryState, queryMenuState, queryPositionState], |
| | | } |
| | | ); |
| | | |
| | |
| | | selectPositionItem.value?.toggle?.(); |
| | | } |
| | | |
| | | function goFlexJobDetail(item: API.FrontOrderList) { |
| | | function goFlexJobDetail(item: API.GetFlexTaskListOutput) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobDetail}?id=${item.id}`, |
| | | url: `${RouterPath.flexJobDetail}?id=${item.taskId}`, |
| | | }); |
| | | } |
| | | |