|
@@ -1,34 +1,53 @@
|
|
|
<template>
|
|
|
- <layout-page>
|
|
|
- <view class="box defaultBgc">
|
|
|
- <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
|
|
|
- <view>
|
|
|
- <view class="white-bgc stick">
|
|
|
- <uni-search-bar
|
|
|
- v-model="query.content"
|
|
|
- radius="8"
|
|
|
- placeholder="请输入关键字"
|
|
|
- cancelButton="none"
|
|
|
- :focus="false"
|
|
|
- @confirm="onSearch($event.value)"
|
|
|
- @clear="query.content = ''; onSearch()"
|
|
|
- />
|
|
|
+ <view>
|
|
|
+ <Navbar></Navbar>
|
|
|
+ <layout-page>
|
|
|
+ <view class="box defaultBgc">
|
|
|
+ <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
|
|
|
+ <view>
|
|
|
+ <SwiperAd :list="swiperAdList"></SwiperAd>
|
|
|
+ <!-- 五宫格菜单 -->
|
|
|
+ <view class="white-bgc ss-p-t-10">
|
|
|
+ <uni-grid :column="5" @change="handleGrid" :showBorder="false">
|
|
|
+ <uni-grid-item v-for="(val, index) in gridList" :index="index" :key="index">
|
|
|
+ <view class="d-flex align-center flex-column justify-center" style="width: 100%; height: 100%; border: none;">
|
|
|
+ <image :src="val.icon" style="width: 40px; height: 40px;"></image>
|
|
|
+ <text class="text color-666 font-size-14 ss-m-t-10">{{ val.label }}</text>
|
|
|
+ </view>
|
|
|
+ </uni-grid-item>
|
|
|
+ </uni-grid>
|
|
|
+ </view>
|
|
|
+ <!-- 搜索条 -->
|
|
|
+ <view class="white-bgc stick ss-p-t-10">
|
|
|
+ <view style="position: relative;">
|
|
|
+ <uni-search-bar
|
|
|
+ v-model="query.content"
|
|
|
+ placeholder="请输入职位/公司关键字"
|
|
|
+ cancelButton="none"
|
|
|
+ :focus="false"
|
|
|
+ bgColor="#fff"
|
|
|
+ @confirm="onSearch($event.value)"
|
|
|
+ @clear="query.content = ''; onSearch()"
|
|
|
+ >
|
|
|
+ </uni-search-bar>
|
|
|
+ <button class="search-btn" @tap.stop="onSearch">搜索</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="white-bgc px-10 stickFilter">
|
|
|
+ <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
|
|
|
+ </view>
|
|
|
+ <PositionList :list="positionListData" :noMore="false"></PositionList>
|
|
|
+ <uni-load-more :status="more" />
|
|
|
</view>
|
|
|
- <SwiperAd :list="swiperAdList"></SwiperAd>
|
|
|
- <view class="white-bgc px-10 mb-10 stickFilter">
|
|
|
- <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
|
|
|
- </view>
|
|
|
- <PositionList :list="positionListData" :noMore="false"></PositionList>
|
|
|
- <uni-load-more :status="more" />
|
|
|
-
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- <AdvertisePop @login="showAuthModal()"></AdvertisePop>
|
|
|
- </view>
|
|
|
- </layout-page>
|
|
|
+ </scroll-view>
|
|
|
+ <AdvertisePop @login="showAuthModal()"></AdvertisePop>
|
|
|
+ </view>
|
|
|
+ </layout-page>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { ref, reactive } from 'vue'
|
|
|
import SwiperAd from '@/components/SwiperAd'
|
|
|
import FilterList from '@/components/FilterList'
|
|
|
import PositionList from '@/components/PositionList'
|
|
@@ -38,8 +57,8 @@ import { getJobAdvertisedSearch } from '@/api/position'
|
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
import layoutPage from '@/layout'
|
|
|
+import Navbar from '@/components/Navbar'
|
|
|
|
|
|
-import { ref, reactive } from 'vue'
|
|
|
// 设置自定义tabbar选中值
|
|
|
onShow(() => {
|
|
|
const currentPage = getCurrentPages()[0]; // 获取当前页面实例
|
|
@@ -53,15 +72,31 @@ const swiperAdList = [
|
|
|
'https://minio.citupro.com/dev/menduner/miniProgram/banner1.gif',
|
|
|
'https://minio.citupro.com/dev/menduner/miniProgram/banner2.jpg',
|
|
|
'https://minio.citupro.com/dev/menduner/miniProgram/banner3.jpg',
|
|
|
+ 'https://minio.citupro.com/dev/menduner/miniProgram/banner4.jpg'
|
|
|
]
|
|
|
const filterList = ref([
|
|
|
{ label: '城市', dictType: 'areaTreeData', key: 'areaIds', map: { text: 'name', value: 'id' } },
|
|
|
{ label: '行业', dictType: 'industryTreeData',key: 'industryIds', map: { text: 'nameCn', value: 'id' } },
|
|
|
{ label: '求职类型', dictType: 'menduner_job_type', key: 'jobType' },
|
|
|
{ label: '薪资待遇', dictType: 'menduner_pay_scope', key: 'payScope' },
|
|
|
- { label: '工作经验', dictType: 'menduner_exp_type', key: 'expType' },
|
|
|
+ // { label: '工作经验', dictType: 'menduner_exp_type', key: 'expType' },
|
|
|
])
|
|
|
|
|
|
+const gridList = [
|
|
|
+ { label: '优选集团', icon: '/static/svg/jituan.svg', path: '' },
|
|
|
+ { label: '精选企业', icon: '/static/svg/qiye.svg', path: '' },
|
|
|
+ { label: '门墩儿猎头', icon: '/static/svg/lietou.svg', path: '' },
|
|
|
+ { label: '早报资讯', icon: '/static/svg/zixun.svg', specifications: 50, path: '' },
|
|
|
+ { label: '联系我们', icon: '/static/svg/kefu.svg', path: '' }
|
|
|
+]
|
|
|
+
|
|
|
+const handleGrid = (e) => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '建设中...,敬请期待'
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
//
|
|
|
const positionListData = ref([])
|
|
|
const query = reactive({
|
|
@@ -80,12 +115,12 @@ const getData = async () => {
|
|
|
const res = await getJobAdvertisedSearch(query)
|
|
|
const list = res?.data?.list || []
|
|
|
positionListData.value.push(...list.map(e => {
|
|
|
- if (!e) {
|
|
|
- return e
|
|
|
- }
|
|
|
- e.job = { ...e.job, ...dealDictObjData({}, e.job) }
|
|
|
- e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
|
|
|
+ if (!e) {
|
|
|
return e
|
|
|
+ }
|
|
|
+ e.job = { ...e.job, ...dealDictObjData({}, e.job) }
|
|
|
+ e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
|
|
|
+ return e
|
|
|
}))
|
|
|
if (positionListData.value.length === +res.data.total) {
|
|
|
more.value = 'noMore'
|
|
@@ -145,18 +180,33 @@ const loadingMore = () => { // 加载更多
|
|
|
height: 100vh;
|
|
|
overflow: hidden;
|
|
|
padding-bottom: 120rpx;
|
|
|
- // box-sizing: border-box;
|
|
|
- // padding-bottom: 160rpx;
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
.scrollBox{
|
|
|
- // height: 100%;
|
|
|
flex: 1;
|
|
|
height: 0 !important;
|
|
|
padding-bottom: 24rpx;
|
|
|
box-sizing: border-box;
|
|
|
- // padding-bottom: 160rpx;
|
|
|
+}
|
|
|
+:deep(.uni-searchbar__box) {
|
|
|
+ width: calc(100% - 105px);
|
|
|
+ height: 40px !important;
|
|
|
+ border: 1px solid #00897B;
|
|
|
+ padding-right: 20px;
|
|
|
+ flex: none;
|
|
|
+}
|
|
|
+.search-btn {
|
|
|
+ position: absolute;
|
|
|
+ right: 11px;
|
|
|
+ top: 10px;
|
|
|
+ width: 110px;
|
|
|
+ height: 40px;
|
|
|
+ font-size: 16px;
|
|
|
+ background-color: #00897B;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 0 5px 5px 0;
|
|
|
+ z-index: 9;
|
|
|
}
|
|
|
</style>
|