| | |
| | | <template> |
| | | <PageLayoutWithBg |
| | | class="index-page-wrapper" |
| | | :title="MatchMakingIdentityEnumTitle[matchMakingIdentity]" |
| | | :need-auth="false" |
| | | > |
| | | <PageLayoutWithBg class="index-page-wrapper" :title="'首页'" :need-auth="false"> |
| | | <template #left> |
| | | <div class="menu-btn-wrapper city-btn" @click="goCitySelect"> |
| | | <div class="city-btn-text">{{ locationCity }}</div> |
| | | <RectDown :size="12" /> |
| | | <div class="menu-btn-wrapper menu-logo"> |
| | | <img :src="IconLogo" class="logo" /> |
| | | </div> |
| | | </template> |
| | | <FrontOrderList v-if="matchMakingIdentity === MatchMakingIdentityEnum.Contributors" /> |
| | | <FrontResourceList v-else-if="matchMakingIdentity === MatchMakingIdentityEnum.Employing" /> |
| | | <div class="home-searchbar-wrapper"> |
| | | <BlSearchbar v-model.trim="searchValue"></BlSearchbar> |
| | | </div> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import FrontOrderList from './FrontOrderList.vue'; |
| | | import FrontResourceList from './FrontResourceList.vue'; |
| | | import { useUser } from '@/hooks'; |
| | | import { MatchMakingIdentityEnum, MatchMakingIdentityEnumTitle } from '@12333/constants'; |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { RectDown } from '@nutui/icons-vue-taro'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { LocationUtils } from '@12333/utils'; |
| | | import { LocationUtils, trim } from '@12333/utils'; |
| | | import _ from 'lodash'; |
| | | import IconLogo from '@/assets/home/icon-logo.png'; |
| | | |
| | | const { matchMakingIdentity, isSetMatchMakingIdentity, locationCity } = useUser(); |
| | | const { locationCity } = useUser(); |
| | | |
| | | const searchValue = ref(''); |
| | | |
| | | const queryState = reactive({ |
| | | searchValueTrim: '', |
| | | }); |
| | | |
| | | const handleSearch = _.debounce(function () { |
| | | queryState.searchValueTrim = trim(searchValue.value); |
| | | }, 300); |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .index-page-wrapper { |
| | | .menu-logo { |
| | | padding: 0; |
| | | |
| | | .logo { |
| | | width: 96px; |
| | | height: 64px; |
| | | } |
| | | } |
| | | |
| | | .city-btn { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | margin-right: 12px; |
| | | } |
| | | } |
| | | |
| | | .home-searchbar-wrapper { |
| | | padding: 32px 0; |
| | | } |
| | | } |
| | | </style> |