|
@@ -5,7 +5,8 @@
|
|
|
<view :style="{'padding-top': navbarHeight + 'px'}">
|
|
|
<view class="commonBackground"></view>
|
|
|
<view class="box defaultBgc">
|
|
|
- <view style="padding: 0 15px 0 15px;">
|
|
|
+ <!-- <SwiperAd v-if="swiperAdList?.length" margin="0 10px 10px 10px" :list="swiperAdList" imgUrlKey="img" :strType="false" /> -->
|
|
|
+ <view>
|
|
|
<uni-segmented-control
|
|
|
:current="current"
|
|
|
:values="tabList"
|
|
@@ -16,10 +17,10 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 职位推荐 -->
|
|
|
- <RecommendPage v-if="current === 0" :jobList="jobList" />
|
|
|
+ <RecommendPage v-if="current === 0" :jobList="jobList" :navbarHeight="navbarHeight" />
|
|
|
|
|
|
<!-- 条件筛选 -->
|
|
|
- <ConditionPage v-else />
|
|
|
+ <ConditionPage v-else :navbarHeight="navbarHeight" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</layout-page>
|
|
@@ -31,6 +32,7 @@ import { ref, watch, onMounted } from 'vue'
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
import layoutPage from '@/layout'
|
|
|
import Navbar from '@/components/Navbar'
|
|
|
+// import SwiperAd from '@/components/SwiperAd'
|
|
|
import { getAccessToken } from '@/utils/request'
|
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
|
import { getJobAdvertised } from '@/api/search'
|
|
@@ -38,6 +40,7 @@ import { userStore } from '@/store/user'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
import RecommendPage from './components/recommend.vue'
|
|
|
import ConditionPage from './components/condition.vue'
|
|
|
+import { getWebContent } from '@/api/common'
|
|
|
|
|
|
const navbarHeight = ref(0)
|
|
|
|
|
@@ -61,6 +64,13 @@ const current = ref(0)
|
|
|
const tabList = ['职位推荐', '条件筛选']
|
|
|
const useUserStore = userStore()
|
|
|
|
|
|
+// 获取轮播图
|
|
|
+const swiperAdList = ref([])
|
|
|
+const getSystemWebContent = async () => {
|
|
|
+ const { data } = await getWebContent()
|
|
|
+ swiperAdList.value = data?.appHomeCarousel || []
|
|
|
+}
|
|
|
+
|
|
|
// 职位列表
|
|
|
const jobList = ref([])
|
|
|
const getJobList = async () => {
|
|
@@ -79,6 +89,8 @@ watch(() => useUserStore.refreshToken, () => {
|
|
|
}, { immediate: true })
|
|
|
|
|
|
onShow(() => {
|
|
|
+ // getSystemWebContent()
|
|
|
+
|
|
|
// 设置自定义tabbar选中值
|
|
|
const currentPage = getCurrentPages()[0] // 获取当前页面实例
|
|
|
const currentTabBar = currentPage?.getTabBar?.()
|
|
@@ -87,7 +99,6 @@ onShow(() => {
|
|
|
currentTabBar?.setData({ selected: 0 })
|
|
|
|
|
|
if (!getAccessToken()) return showAuthModal()
|
|
|
-
|
|
|
})
|
|
|
|
|
|
const changeControl = (e) =>{
|
|
@@ -96,12 +107,23 @@ const changeControl = (e) =>{
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-:deep(.uni-select__selector-item) {
|
|
|
- display: block !important;
|
|
|
- text-align: left !important;
|
|
|
- max-width: 100% !important;
|
|
|
- white-space: nowrap !important;
|
|
|
- text-overflow: ellipsis !important;
|
|
|
- overflow: hidden !important;
|
|
|
+:deep {
|
|
|
+ .uni-select__selector-item {
|
|
|
+ display: block !important;
|
|
|
+ text-align: left !important;
|
|
|
+ max-width: 100% !important;
|
|
|
+ white-space: nowrap !important;
|
|
|
+ text-overflow: ellipsis !important;
|
|
|
+ overflow: hidden !important;
|
|
|
+ }
|
|
|
+ .uni-select {
|
|
|
+ background-color: #fff !important;
|
|
|
+ }
|
|
|
}
|
|
|
+// .stick {
|
|
|
+// z-index: 1;
|
|
|
+// position: sticky;
|
|
|
+// background-color: #fff;
|
|
|
+// }
|
|
|
+
|
|
|
</style>
|