|
@@ -1,13 +1,13 @@
|
|
<!-- 招聘会/企业详情 -->
|
|
<!-- 招聘会/企业详情 -->
|
|
<template>
|
|
<template>
|
|
- <view class="box">
|
|
|
|
|
|
+ <view class="box" :style="`background-color: ${backgroundColor}`">
|
|
<scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
|
|
<scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
|
|
<view>
|
|
<view>
|
|
<!-- 轮播图 -->
|
|
<!-- 轮播图 -->
|
|
- <SwiperAd v-if="swiperAdList.length" :list="swiperAdList" imgUrlKey="img" margin="0" borderRadius="0" :strType="false" @click="handleToDetails"></SwiperAd>
|
|
|
|
- <view class="stick">
|
|
|
|
|
|
+ <SwiperAd v-if="swiperAdList.length" :list="swiperAdList" margin="0" borderRadius="0" @click="handleToDetails"></SwiperAd>
|
|
|
|
+ <view class="stick" :style="`background-color: ${backgroundColor}`">
|
|
<!-- tab页签 -->
|
|
<!-- tab页签 -->
|
|
- <scroll-view scroll-x="true" class="scroll-container">
|
|
|
|
|
|
+ <scroll-view v-if="tabList?.length" scroll-x="true" class="scroll-container">
|
|
<view
|
|
<view
|
|
class="scroll-item"
|
|
class="scroll-item"
|
|
:style="`margin-left: ${index ? '24px' : ''};`"
|
|
:style="`margin-left: ${index ? '24px' : ''};`"
|
|
@@ -21,6 +21,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+ <view v-if="entName" class="enterpriseName" :style="`color: ${entNameColor}`">{{ entName }}</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="listData?.length" class="listDataBox">
|
|
<view v-if="listData?.length" class="listDataBox">
|
|
<PositionList
|
|
<PositionList
|
|
@@ -28,13 +29,13 @@
|
|
:noMore="false"
|
|
:noMore="false"
|
|
:jobFairId="query.jobFairId"
|
|
:jobFairId="query.jobFairId"
|
|
:showUpdateTime="false"
|
|
:showUpdateTime="false"
|
|
- noDataTextColor="#fff"
|
|
|
|
|
|
+ :noDataTextColor="textColor"
|
|
></PositionList>
|
|
></PositionList>
|
|
- <uni-load-more :status="more" />
|
|
|
|
|
|
+ <uni-load-more :status="more" :color="textColor" />
|
|
</view>
|
|
</view>
|
|
<view v-else class="nodata-img-parent">
|
|
<view v-else class="nodata-img-parent">
|
|
<!-- <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image> -->
|
|
<!-- <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image> -->
|
|
- <uni-load-more class="ss-m-t-50" status="noMore" :content-text="{'contentnomore': '暂无数据,请切换类型查看~'}" />
|
|
|
|
|
|
+ <uni-load-more class="ss-m-t-50" :color="textColor" status="noMore" :content-text="{'contentnomore': '暂无数据,请切换类型查看~'}" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -43,11 +44,10 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
-import { ref, reactive } from 'vue'
|
|
|
|
|
|
+import { ref, reactive, computed } from 'vue'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { getJobFairEntJobPage, getJobFair } from '@/api/jobFair'
|
|
import { getJobFairEntJobPage, getJobFair } from '@/api/jobFair'
|
|
import PositionList from '@/components/PositionList'
|
|
import PositionList from '@/components/PositionList'
|
|
-import { getWebContent } from '@/api/common'
|
|
|
|
import SwiperAd from '@/components/SwiperAd'
|
|
import SwiperAd from '@/components/SwiperAd'
|
|
|
|
|
|
const more = ref('more')
|
|
const more = ref('more')
|
|
@@ -64,32 +64,42 @@ onLoad(async (options) => {
|
|
entName.value = options.entName
|
|
entName.value = options.entName
|
|
if (options?.jobFairId) {
|
|
if (options?.jobFairId) {
|
|
query.jobFairId = options.jobFairId
|
|
query.jobFairId = options.jobFairId
|
|
- query.enterpriseId = options.enterpriseId
|
|
|
|
- getJobFairDetail()
|
|
|
|
- }
|
|
|
|
|
|
+ if (options.enterpriseId) query.enterpriseId = options.enterpriseId
|
|
|
|
+ if (query.enterpriseId) getData()
|
|
|
|
+ else getJobFairDetail()
|
|
|
|
+ }
|
|
|
|
+ if (options.backgroundColor) backgroundColor.value = options.backgroundColor
|
|
})
|
|
})
|
|
|
|
|
|
-// 获取轮播图
|
|
|
|
-const swiperAdList = ref([])
|
|
|
|
-const getSystemWebContent = async () => {
|
|
|
|
- const { data } = await getWebContent()
|
|
|
|
- swiperAdList.value = data?.appHomeCarousel || []
|
|
|
|
-}
|
|
|
|
-getSystemWebContent()
|
|
|
|
-
|
|
|
|
// 招聘会详情
|
|
// 招聘会详情
|
|
const tabIndex = ref(-1)
|
|
const tabIndex = ref(-1)
|
|
const tabList = ref([])
|
|
const tabList = ref([])
|
|
|
|
+const swiperAdList = ref([])
|
|
|
|
+const backgroundColor = ref('#fff')
|
|
|
|
+const textColor = computed(() => {
|
|
|
|
+ return backgroundColor.value === '#fff' ? '#777' : '#fff'
|
|
|
|
+})
|
|
|
|
+const entNameColor = computed(() => {
|
|
|
|
+ return backgroundColor.value === '#fff' ? '#00897B' : '#fff'
|
|
|
|
+})
|
|
const getJobFairDetail = async () => {
|
|
const getJobFairDetail = async () => {
|
|
if (!query.jobFairId) return
|
|
if (!query.jobFairId) return
|
|
const { data } = await getJobFair(query.jobFairId)
|
|
const { data } = await getJobFair(query.jobFairId)
|
|
|
|
+ // tab
|
|
if (data?.tag?.length) {
|
|
if (data?.tag?.length) {
|
|
tabList.value = data.tag
|
|
tabList.value = data.tag
|
|
tabIndex.value = 0
|
|
tabIndex.value = 0
|
|
}
|
|
}
|
|
|
|
+ // 轮播图
|
|
|
|
+ if (data?.headImg?.length) {
|
|
|
|
+ swiperAdList.value = data.headImg
|
|
|
|
+ }
|
|
|
|
+ // 背景色
|
|
|
|
+ if (data?.backgroundColour) {
|
|
|
|
+ backgroundColor.value = data.backgroundColour || '#fff'
|
|
|
|
+ }
|
|
getData()
|
|
getData()
|
|
}
|
|
}
|
|
-getJobFairDetail()
|
|
|
|
|
|
|
|
// 切换类型
|
|
// 切换类型
|
|
const handClickTab = (index) => {
|
|
const handClickTab = (index) => {
|
|
@@ -155,7 +165,6 @@ const loadingMore = () => {
|
|
z-index: 1;
|
|
z-index: 1;
|
|
position: sticky;
|
|
position: sticky;
|
|
top: 0;
|
|
top: 0;
|
|
- background-color: #7ec04c;
|
|
|
|
}
|
|
}
|
|
.box {
|
|
.box {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
@@ -164,7 +173,6 @@ const loadingMore = () => {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- background-color: #7ec04c;
|
|
|
|
}
|
|
}
|
|
.listDataBox {
|
|
.listDataBox {
|
|
// padding: 1px 0 120rpx;
|
|
// padding: 1px 0 120rpx;
|
|
@@ -178,9 +186,9 @@ const loadingMore = () => {
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
|
|
|
|
-:deep(.uni-load-more__text) {
|
|
|
|
- color: #fff !important;
|
|
|
|
-}
|
|
|
|
|
|
+// :deep(.uni-load-more__text) {
|
|
|
|
+// color: #fff !important;
|
|
|
|
+// }
|
|
|
|
|
|
:deep(.uni-card) {
|
|
:deep(.uni-card) {
|
|
padding: 0 !important;
|
|
padding: 0 !important;
|
|
@@ -210,16 +218,25 @@ const loadingMore = () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-.titleBox {
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 0 20rpx 15px;
|
|
|
|
- .title {
|
|
|
|
- font-size: 20px;
|
|
|
|
- font-weight: 600;
|
|
|
|
- margin-bottom: 12px;
|
|
|
|
- }
|
|
|
|
- .entName {
|
|
|
|
- color: #fff;
|
|
|
|
|
|
+.enterpriseName {
|
|
|
|
+ position: relative;
|
|
|
|
+ padding: 18px 30rpx;
|
|
|
|
+ padding-left: 39px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ &::before {
|
|
|
|
+ display: block;
|
|
|
|
+ content: '';
|
|
|
|
+ width: 4px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 20px;
|
|
|
|
+ left: 25px;
|
|
|
|
+ border-radius: 2px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|