18个文件已修改
9个文件已添加
10个文件已删除
| | |
| | | OSS_URL: '"https://waterdroptest2.oss-cn-hangzhou.aliyuncs.com/"', |
| | | WEMAP_KEY: 'T2UBZ-N563J-ZCHFF-XDOXN-VCH7S-CJB2T', |
| | | }, |
| | | plugins: [ |
| | | [ |
| | | '@tarojs/plugin-mock', |
| | | { |
| | | mocks: mocks, |
| | | }, |
| | | ], |
| | | ], |
| | | // plugins: [ |
| | | // [ |
| | | // '@tarojs/plugin-mock', |
| | | // { |
| | | // mocks: mocks, |
| | | // }, |
| | | // ], |
| | | // ], |
| | | defineConstants: {}, |
| | | mini: {}, |
| | | h5: {}, |
| | |
| | | }, |
| | | webpackChain(chain, webpack) { |
| | | if (process.env.NODE_ENV === 'development') { |
| | | chain.plugin('analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, []); |
| | | chain |
| | | .plugin('analyzer') |
| | | .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [{ analyzerPort: 8889 }]); |
| | | } |
| | | |
| | | chain.plugin('unplugin-auto-import').use( |
| | |
| | | export default defineAppConfig({ |
| | | entryPagePath: 'pages/home/index', |
| | | pages: ['pages/home/index', 'pages/mine/index'], |
| | | pages: ['pages/home/index', 'pages/mine/index', 'pages/workbenches/workbenches'], |
| | | requiredPrivateInfos: ['getLocation'], |
| | | permission: { |
| | | 'scope.userLocation': { |
| | |
| | | text: '首页', |
| | | }, |
| | | { |
| | | pagePath: 'pages/workbenches/workbenches', |
| | | iconPath: 'assets/tabbar/icon-task.png', |
| | | selectedIconPath: 'assets/tabbar/icon-task-active.png', |
| | | text: '工作台', |
| | | }, |
| | | { |
| | | pagePath: 'pages/mine/index', |
| | | iconPath: 'assets/tabbar/icon-mine.png', |
| | | selectedIconPath: 'assets/tabbar/icon-mine-active.png', |
| | |
| | | <view class="nut-menu__title-text">{{ item.renderTitle() }}</view> |
| | | <span class="nut-menu__title-icon"> |
| | | <slot name="icon"> |
| | | <RectUp v-if="direction === 'up'" :size="12" /> |
| | | <RectDown v-else :size="12" /> |
| | | <TriangleUp v-if="direction === 'up'" :size="12" /> |
| | | <TriangleDown v-else :size="12" /> |
| | | </slot> |
| | | </span> |
| | | </view> |
| | |
| | | </template> |
| | | <script lang="ts"> |
| | | import Taro, { usePageScroll } from '@tarojs/taro'; |
| | | import { RectUp, RectDown } from '@nutui/icons-vue-taro'; |
| | | import { RectUp, RectDown, TriangleDown, TriangleUp } from '@nutui/icons-vue-taro'; |
| | | import { useTaroRect } from 'senin-mini/hooks'; |
| | | import './menu.scss'; |
| | | |
| | |
| | | components: { |
| | | RectDown, |
| | | RectUp, |
| | | TriangleDown, |
| | | TriangleUp, |
| | | }, |
| | | props: { |
| | | activeColor: { |
| | |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | |
| | | .nut-menu__title-icon { |
| | | color: #000; |
| | | color: boleGetCssVar('text-color', 'secondary'); |
| | | } |
| | | |
| | | .nut-menu__title.active { |
| | |
| | | flex: none; |
| | | .nut-menu__title-text { |
| | | padding-left: 0; |
| | | font-size: 24rpx; |
| | | font-size: 26rpx; |
| | | color: #000; |
| | | } |
| | | } |
| | |
| | | registerForm = '/subpackages/login/registerForm/registerForm', |
| | | home = '/pages/home/index', |
| | | mine = '/pages/mine/index', |
| | | workbenches = '/pages/workbenches/workbenches', |
| | | editRichContent = '/subpackages/editRichContent/editRichContent', |
| | | |
| | | // userInfo = '/subpackages/setting/userInfo/userInfo', |
| | |
| | | export const TabBarPageRouter = { |
| | | Home: '/pages/home/index', |
| | | Workbenches: '/pages/workbenches/workbenches', |
| | | Mine: '/pages/mine/index', |
| | | }; |
| | |
| | | } |
| | | |
| | | .bottom-tab-item-icon { |
| | | width: 40px; |
| | | height: 40px; |
| | | width: 48px; |
| | | height: 48px; |
| | | } |
| | | |
| | | .bottom-tab-item-text { |
| | | color: #707070; |
| | | font-size: 20px; |
| | | line-height: 24px; |
| | | font-size: 24px; |
| | | line-height: 28px; |
| | | } |
| | | |
| | | .bottom-tab-item-badge { |
| | |
| | | }} |
| | | > |
| | | <TarBarItem |
| | | text={'homeTitle'} |
| | | text={'首页'} |
| | | icon="../assets/tabbar/icon-home.png" |
| | | activeIcon="../assets/tabbar/icon-home-active.png" |
| | | pagePath={TabBarPageRouter.Home} |
| | |
| | | className="home" |
| | | onClick={switchTab} |
| | | ></TarBarItem> |
| | | {/* <TarBarItem |
| | | text="行业圈" |
| | | icon="../assets/tabbar/icon-friend.png" |
| | | activeIcon="../assets/tabbar/icon-friend-active.png" |
| | | pagePath={TabBarPageRouter.CircleFriend} |
| | | index={1} |
| | | active={system.activeTab === 1} |
| | | className="circleFriend" |
| | | onClick={switchTab} |
| | | ></TarBarItem> |
| | | <div class="bottom-tab-item publish-wrapper" onClick={goPublish}> |
| | | <img class="bottom-tab-item-img-publish" src={IconPublish} /> |
| | | <div class="bottom-tab-item-text">发布</div> |
| | | </div> |
| | | <TarBarItem |
| | | text="消息" |
| | | icon="../assets/tabbar/icon-message.png" |
| | | activeIcon="../assets/tabbar/icon-message-active.png" |
| | | pagePath={TabBarPageRouter.Message} |
| | | active={system.activeTab === 2} |
| | | className="message" |
| | | text="工作台" |
| | | icon="../assets/tabbar/icon-task.png" |
| | | activeIcon="../assets/tabbar/icon-task-active.png" |
| | | pagePath={TabBarPageRouter.Workbenches} |
| | | active={system.activeTab === 1} |
| | | className="task" |
| | | onClick={switchTab} |
| | | index={2} |
| | | badge={(isLogin.value && myMessageCount.value?.unReadCount) ?? 0} |
| | | ></TarBarItem> */} |
| | | index={1} |
| | | ></TarBarItem> |
| | | <TarBarItem |
| | | text="我的" |
| | | icon="../assets/tabbar/icon-mine.png" |
| | | activeIcon="../assets/tabbar/icon-mine-active.png" |
| | | pagePath={TabBarPageRouter.Mine} |
| | | active={system.activeTab === 3} |
| | | active={system.activeTab === 2} |
| | | className="mine" |
| | | onClick={switchTab} |
| | | index={3} |
| | | index={2} |
| | | ></TarBarItem> |
| | | </View> |
| | | ); |
New file |
| | |
| | | <template> |
| | | <QueryMenuView @close="handleReset" @confirm="emit('close')" cancelText="重置"> |
| | | <div class="home-query-menu-view"> |
| | | <QueryMenuItem title="结算方式"> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | <QueryMenuItem title="员工福利"> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | <QueryMenuItem title="性别要求"> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | </div> |
| | | </QueryMenuView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { QueryMenuView, QueryMenuItem, ProRadio } from '@12333/components'; |
| | | import { GenderText } from '@12333/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'HomeQueryMenuView', |
| | | }); |
| | | |
| | | // type Props = {}; |
| | | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'reset'): void; |
| | | (e: 'close'): void; |
| | | }>(); |
| | | |
| | | const query = defineModel<{ |
| | | gender: number | string; |
| | | }>('query'); |
| | | |
| | | const DefaultQuery = { |
| | | ...query.value, |
| | | }; |
| | | |
| | | function handleReset() { |
| | | for (const key in DefaultQuery) { |
| | | query.value[key] = DefaultQuery[key]; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .home-query-menu-view { |
| | | max-height: 400px; |
| | | padding: 30px; |
| | | overflow: auto; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <QueryMenuView @close="handleReset" @confirm="emit('close')" cancelText="重置"> |
| | | <div class="home-query-position-menu-view"> |
| | | <PositionSelectView v-model="query.position" /> |
| | | </div> |
| | | </QueryMenuView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { QueryMenuView, QueryMenuItem, PositionSelectView } from '@12333/components'; |
| | | import { GenderText } from '@12333/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'HomeQueryPositionMenuView', |
| | | }); |
| | | |
| | | // type Props = {}; |
| | | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'reset'): void; |
| | | (e: 'close'): void; |
| | | }>(); |
| | | |
| | | const query = defineModel<{ |
| | | position: any[]; |
| | | }>('query'); |
| | | |
| | | const DefaultQuery = { |
| | | ...query.value, |
| | | }; |
| | | |
| | | function handleReset() { |
| | | for (const key in DefaultQuery) { |
| | | query.value[key] = DefaultQuery[key]; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .home-query-position-menu-view { |
| | | max-height: 400px; |
| | | } |
| | | </style> |
New file |
| | |
| | | export enum HomeOrderType { |
| | | Recommend = 'Recommend', |
| | | LastShelfTime = 'LastShelfTime', |
| | | } |
| | |
| | | <template> |
| | | <PageLayoutWithBg class="index-page-wrapper" :title="'首页'" :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> |
| | | <div class="home-header"> |
| | | <!-- <div class="home-searchbar-wrapper"> |
| | | <div class="searchbar-container"> |
| | | <BlSearchbar |
| | | v-model.trim="searchValue" |
| | | placeholder="搜索任务" |
| | | @search="handleSearch" |
| | | @change="handleSearch" |
| | | ></BlSearchbar> |
| | | </div> |
| | | <div class="city-btn" @click="goCitySelect"> |
| | | <img :src="IconLocaltion" class="city-btn-icon" /> |
| | | <div class="city-btn-text">{{ locationCity }}</div> |
| | | </div> |
| | | </div> --> |
| | | <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> |
| | | <ProTabs |
| | | v-model="queryState.orderType" |
| | | name="home-tab" |
| | | :showPaneContent="false" |
| | | :showSmile="false" |
| | | class="home-tabs" |
| | | isTransparent |
| | | title-gutter="8" |
| | | title-scroll |
| | | > |
| | | <ProTabPane :title="`推荐`" :pane-key="HomeOrderType.Recommend"></ProTabPane> |
| | | <ProTabPane :title="`最新`" :pane-key="HomeOrderType.LastShelfTime"></ProTabPane> |
| | | <template #right> |
| | | <Menu> |
| | | <MenuItem title="岗位" ref="selectPositionItem"> |
| | | <HomeQueryPositionMenuView |
| | | v-model:query="queryPositionState" |
| | | @close="handleMenuSelectPositionClose" |
| | | ></HomeQueryPositionMenuView> |
| | | </MenuItem> |
| | | <MenuItem title="筛选" ref="selectItem"> |
| | | <HomeQueryMenuView |
| | | v-model:query="queryMenuState" |
| | | @close="handleMenuSelectClose" |
| | | ></HomeQueryMenuView> |
| | | </MenuItem> |
| | | </Menu> |
| | | </template> |
| | | </ProTabs> |
| | | <InfiniteLoading |
| | | scrollViewClassName="common-infinite-scroll-list home-list" |
| | | v-bind="infiniteLoadingProps" |
| | | :key="queryState.orderType" |
| | | > |
| | | <template #renderItem="{ item }"> |
| | | <!-- <TaskCard @click="goTaskDetail(item)" /> --> |
| | | </template> |
| | | </InfiniteLoading> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | |
| | | 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 IconLogo from '@/assets/home/icon-logo.png'; |
| | | import { ProTabs, ProTabPane } 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 _ from 'lodash'; |
| | | import HomeQueryMenuView from './HomeQueryMenuView.vue'; |
| | | import HomeQueryPositionMenuView from './HomeQueryPositionMenuView.vue'; |
| | | import IconLocaltion from '@/assets/task/icon-localtion.png'; |
| | | |
| | | const { locationCity } = useUser(); |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const queryMenuState = reactive({ |
| | | gender: '' as any as Gender, |
| | | }); |
| | | |
| | | const queryPositionState = reactive({ |
| | | position: [], |
| | | }); |
| | | |
| | | const queryState = reactive({ |
| | | orderType: HomeOrderType.Recommend, |
| | | }); |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.FrontOrderListInput = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [ |
| | | queryState.orderType === HomeOrderType.Recommend |
| | | ? { property: 'isRecommend', order: OrderInputType.Desc } |
| | | : { property: 'lastShelfTime', order: OrderInputType.Desc }, |
| | | ], |
| | | }, |
| | | }; |
| | | |
| | | return orderServices.getFrontOrderList(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList', queryState, queryMenuState, queryPositionState], |
| | | } |
| | | ); |
| | | |
| | | function goCitySelect() { |
| | | Taro.navigateTo({ |
| | | url: RouterPath.citySelect, |
| | | }); |
| | | } |
| | | // onMounted(async () => { |
| | | // if (!isSetMatchMakingIdentity.value) { |
| | | // Taro.navigateTo({ |
| | | // url: RouterPath.toggleMatchMakingIdentity, |
| | | // }); |
| | | // } |
| | | // }); |
| | | |
| | | const list = ref([ |
| | | 'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg', |
| | | 'https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg', |
| | | 'https://storage.360buyimg.com/jdc-article/welcomenutui.jpg', |
| | | 'https://storage.360buyimg.com/jdc-article/fristfabu.jpg', |
| | | ]); |
| | | |
| | | const selectItem = ref(); |
| | | const selectPositionItem = ref(); |
| | | |
| | | function handleMenuSelectClose() { |
| | | selectItem.value?.toggle?.(); |
| | | } |
| | | |
| | | function handleMenuSelectPositionClose() { |
| | | selectPositionItem.value?.toggle?.(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .index-page-wrapper { |
| | | .menu-logo { |
| | | padding: 0; |
| | | |
| | | .logo { |
| | | width: 96px; |
| | | height: 64px; |
| | | } |
| | | } |
| | | |
| | | .nut-menu__item + .nut-menu__item { |
| | | margin-left: 24px; |
| | | } |
| | | |
| | | .city-btn { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | margin-right: 12px; |
| | | } |
| | | } |
| | | |
| | | .home-banner-wrapper { |
| | | .banner-img { |
| | | width: 100%; |
| | | height: 260px; |
| | | object-fit: cover; |
| | | } |
| | | } |
| | | |
| | | .home-header { |
| | | padding: 0 boleGetCssVar('size', 'body-padding-h'); |
| | | } |
| | | |
| | | .home-list { |
| | | @include infiniteLoadingInTabBarPage; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div>InnerPage</div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | </style> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayoutWithBg class="workbenches-page-wrapper" title="工作台"> |
| | | <InnerPage /> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'workbenches', |
| | | }); |
| | | </script> |
| | |
| | | export function useTaskList() { |
| | | const searchValue = ref(''); |
| | | |
| | | const DefaultQueryState = { |
| | | const queryMenuState = reactive({ |
| | | gender: '' as any as Gender, |
| | | }; |
| | | }); |
| | | |
| | | const queryState = reactive({ |
| | | searchValueTrim: '', |
| | | orderType: HomeOrderType.Recommend, |
| | | companyId: '', |
| | | ...DefaultQueryState, |
| | | }); |
| | | |
| | | const handleSearch = _.debounce(function () { |
| | |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList', queryState], |
| | | queryKey: ['orderServices/getFrontOrderList', queryState, queryMenuState], |
| | | } |
| | | ); |
| | | |
| | | return { |
| | | searchValue, |
| | | queryState, |
| | | DefaultQueryState, |
| | | queryMenuState, |
| | | handleSearch, |
| | | infiniteLoadingProps, |
| | | }; |
| | |
| | | <QueryMenuView @close="handleReset" @confirm="emit('close')" cancelText="重置"> |
| | | <div class="home-query-menu-view"> |
| | | <QueryMenuItem title="结算方式"> |
| | | <ProRadio v-model="gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | <QueryMenuItem title="员工福利"> |
| | | <ProRadio v-model="gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | <QueryMenuItem title="性别要求"> |
| | | <ProRadio v-model="gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | <ProRadio v-model="query.gender" :value-enum="GenderText" show-all-btn></ProRadio> |
| | | </QueryMenuItem> |
| | | </div> |
| | | </QueryMenuView> |
| | |
| | | (e: 'close'): void; |
| | | }>(); |
| | | |
| | | const gender = defineModel<number | string>('gender'); |
| | | const query = defineModel<{ |
| | | gender: number | string; |
| | | }>('query'); |
| | | |
| | | const DefaultQuery = { |
| | | ...query.value, |
| | | }; |
| | | |
| | | function handleReset() { |
| | | emit('reset'); |
| | | for (const key in DefaultQuery) { |
| | | query.value[key] = DefaultQuery[key]; |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <Menu> |
| | | <MenuItem title="筛选" ref="selectItem"> |
| | | <HomeQueryMenuView |
| | | v-model:gender="queryState.gender" |
| | | v-model:query="queryMenuState" |
| | | @close="handleMenuSelectClose" |
| | | @reset="handleMenuSelectReset" |
| | | ></HomeQueryMenuView> |
| | | </MenuItem> |
| | | </Menu> |
| | |
| | | |
| | | const userStore = useUserStore(); |
| | | |
| | | const { searchValue, queryState, handleSearch, infiniteLoadingProps, DefaultQueryState } = |
| | | const { searchValue, queryState, handleSearch, infiniteLoadingProps, queryMenuState } = |
| | | useTaskList(); |
| | | |
| | | function goCitySelect() { |
| | |
| | | |
| | | function handleMenuSelectClose() { |
| | | selectItem.value?.toggle?.(); |
| | | } |
| | | function handleMenuSelectReset() { |
| | | Object.assign(queryState, { ...DefaultQueryState }); |
| | | } |
| | | |
| | | function goTaskDetail(item: API.FrontOrderList) { |
| | |
| | | <ListItem :icon="IconCollect" title="我收藏的任务" @click="goMineCollectTask"></ListItem> |
| | | <ListItem :icon="IconAgreement" title="协议签约" @click="goMineAgreementSign"></ListItem> |
| | | <ListItem :icon="IconSetting" title="设置" @click="goSetting"></ListItem> |
| | | <ListItem :icon="IconRecruit" title="我要招人/用人" @click="goSetting"></ListItem> |
| | | <!-- <ListItem :icon="IconRecruit" title="我要招人/用人" @click="goSetting"></ListItem> --> |
| | | </List> |
| | | </ContentScrollView> |
| | | </PageLayoutWithBg> |