From 5fc0cba8af1a9e9b1cc41fa65c8a4db89e82ee3e Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期五, 08 八月 2025 13:22:10 +0800 Subject: [PATCH] fix: 任务发布 --- apps/cMiniApp/src/pages/home/index.vue | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/cMiniApp/src/pages/home/index.vue b/apps/cMiniApp/src/pages/home/index.vue index a627853..f9c3298 100644 --- a/apps/cMiniApp/src/pages/home/index.vue +++ b/apps/cMiniApp/src/pages/home/index.vue @@ -20,13 +20,13 @@ <div class="city-btn-text">{{ locationCity }}</div> </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" @@ -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