From 1bbd7061dac79cacf5513234a04cac8ba0be5c6f Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 21 三月 2025 09:15:36 +0800 Subject: [PATCH] feat: 接口对接 --- apps/cMiniApp/src/pages/home/index.vue | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/apps/cMiniApp/src/pages/home/index.vue b/apps/cMiniApp/src/pages/home/index.vue index a627853..de26f12 100644 --- a/apps/cMiniApp/src/pages/home/index.vue +++ b/apps/cMiniApp/src/pages/home/index.vue @@ -44,9 +44,8 @@ <Menu> <MenuItem title="绛涢��" ref="selectItem"> <HomeQueryMenuView - v-model:gender="queryState.gender" + v-model:query="queryMenuState" @close="handleMenuSelectClose" - @reset="handleMenuSelectReset" ></HomeQueryMenuView> </MenuItem> </Menu> @@ -69,7 +68,7 @@ import { useUserStore } from '@/stores/modules/user'; import { RectDown, Location2 } from '@nutui/icons-vue-taro'; import Taro from '@tarojs/taro'; -import { LocationUtils, trim } from '@12333/utils'; +import { setLocationCity } from '@/utils'; import _ from 'lodash'; import IconLogo from '@/assets/home/icon-logo.png'; import { TaskCard, ProTabs, ProTabPane } from '@12333/components'; @@ -80,8 +79,15 @@ const userStore = useUserStore(); -const { searchValue, queryState, handleSearch, infiniteLoadingProps, DefaultQueryState } = - useTaskList(); +const { searchValue, queryState, handleSearch, infiniteLoadingProps, queryMenuState } = useTaskList( + { cityName: locationCity } +); + +onMounted(async () => { + try { + await setLocationCity(); + } catch (error) {} +}); function goCitySelect() { Taro.navigateTo({ @@ -101,13 +107,10 @@ function handleMenuSelectClose() { selectItem.value?.toggle?.(); } -function handleMenuSelectReset() { - Object.assign(queryState, { ...DefaultQueryState }); -} -function goTaskDetail(item: API.FrontOrderList) { +function goTaskDetail(item: API.GetFlexTaskListOutput) { Taro.navigateTo({ - url: `${RouterPath.taskDetail}?id=${item.id}`, + url: `${RouterPath.taskDetail}?id=${item.taskId}`, }); } </script> -- Gitblit v1.9.1