Ver código fonte

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

Xiao_123 2 meses atrás
pai
commit
e01e948786

+ 0 - 12
pages.json

@@ -325,18 +325,6 @@
 						"navigationBarTitleText": "分享招聘会企业"
 					}
 				},
-				{
-					"path": "jobFair/enterprises",
-					"style": {
-						"navigationBarTitleText": "招聘会/企业"
-					}
-				},
-				{
-					"path": "jobFair/positions",
-					"style": {
-						"navigationBarTitleText": "招聘会/职位"
-					}
-				},
 				{
 					"path": "jobFair/enterprisesClassification",
 					"style": {

+ 0 - 252
pagesB/jobFair/enterprises.vue

@@ -1,252 +0,0 @@
-<!-- 招聘会/企业 -->
-<template>
-  <view class="box defaultBgc">
-    <scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
-      <view>
-        <!-- 顶部 -->
-        <view class="white-bgc stick ss-p-t-10 ss-p-b-10">
-          <view class="titleBox">
-            <view class="jobFairName">{{ jobFairName }}</view>
-          </view>
-          <!-- 搜索条 -->
-          <view style="position: relative;">
-            <uni-search-bar
-              v-model="query.keyword"
-              placeholder="输入公司关键字"
-              cancelButton="none"
-              :focus="false"
-              bgColor="#fff"
-              @confirm="onSearch($event.value)"
-              @clear="query.keyword = ''; onSearch()"
-            >
-            </uni-search-bar>
-            <button class="search-btn" @tap.stop="onSearch">搜索</button>
-          </view>
-        </view>
-        <view v-if="listData?.length" class="listDataBox">
-          <uni-card v-for="val in listData" :key="val.id" @click="toDetail(val)" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
-            <view class="d-flex align-center ss-m-30" @click="null">
-              <image class="enterAvatar" :src="val.logoUrl ? val.logoUrl : 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
-              <view class="ss-m-l-20" style="flex: 1;">
-                <view class="font-size-16 enterpriseName">{{ formatName(val.anotherName || val.name) }}</view>
-                <view class="ss-m-t-5">
-                  <span class="color-999">{{ val?.industryName || '' }}</span>
-                  <span class="divider tag-gap1" v-if="val?.industryName && val?.scaleName"> | </span>
-                  <span class="color-999">{{ val?.scaleName || '' }}</span>
-                </view>
-                <view class="ss-m-t-10" style="overflow: hidden;height: 48px;">
-                  <uni-tag 
-                    v-for="(tag,i) in val?.welfareList || []"
-                    :key="i"
-                    class="ss-m-r-5"
-                    :text="tag"
-                    inverted="false"
-                    size="mini"
-                    custom-style="background-color: #ececec; color: #666; border-color: #ececec; display: inline-block;"
-                  />
-                </view>
-              </view>
-            </view>
-            <view class="jobCount">{{ val.jobCount }}个在线职位招聘中</view>
-          </uni-card>
-          <uni-load-more :status="more" />
-        </view>
-        <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>
-        </view>
-      </view>
-    </scroll-view>
-  </view>
-</template>
-
-<script setup>
-import { ref, reactive } from 'vue'
-import { dealDictArrayData } from '@/utils/position'
-import { getJobFairEnterprisePage } from '@/api/jobFair'
-import { formatName } from '@/utils/getText'
-import { onLoad } from '@dcloudio/uni-app'
-
-const more = ref('more')
-const listData = ref([])
-const query = reactive({
-  pageSize: 20, 
-  pageNo: 1,
-  keyword: '',
-  jobFairId: undefined,
-})
-
-const jobFairName = ref('')
-
-onLoad(async (options) => {
-  jobFairName.value = options.jobFairName
-  if (options?.jobFairId) {
-    query.jobFairId = options.jobFairId
-    getData()
-	}
-})
-
-const getData = async () => {
-  if (!query.jobFairId) {
-    uni.showToast({ title: '进去招聘会失败!', icon: 'none', duration: 2000 })
-    return
-  }
-  try {
-    const res = await getJobFairEnterprisePage(query)
-    const list = res?.data?.list || []
-    // const list = [...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list, ...res?.data?.list] || []
-    listData.value = listData.value.concat(dealDictArrayData([], list))
-    if (listData.value?.length === +res?.data?.total) {
-      more.value = 'noMore'
-      return
-    }
-  } catch (error) {
-    query.pageNo--
-    more.value = 'more'
-  }
-}
-
-const scrollTop = ref(0)
-const old = ref({
-  scrollTop: 0
-})
-const onScroll = (e) =>{
-  old.value.scrollTop = e.detail.scrollTop
-}
-
-const onSearch = () => {
-  query.pageNo = 1
-  listData.value = []
-  getData()
-}
-
-// 加载更多
-const loadingMore = () => {
-  more.value = 'loading'
-  query.pageNo++
-  getData()
-}
-
-// const goBack = () => {
-// 	uni.navigateTo({
-// 		url: '/pagesB/jobFair/index'
-// 	})
-// }
-
-const toDetail = (item) =>{
-  if (!item?.id || !(item?.jobFairId ?? query.jobFairId)) return
-  const url = `/pagesB/jobFair/positions?jobFairId=${query.jobFairId || item.jobFairId}&enterpriseId=${item.id}&entName=${item.anotherName}`
-  uni.navigateTo({ url })
-}
-
-</script>
-
-<style scoped lang="scss">
-.stick {
-  z-index: 1;
-  position: sticky;
-  top: 0;
-}
-.stickFilter {
-  z-index: 1;
-  position: sticky;
-  box-shadow: 0px 10rpx 12rpx 0px rgba(195, 195, 195, .25);
-  top: 120rpx;
-}
-.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
-.pb-10 {
-  padding-bottom: 10px;
-}
-.pb-20 { padding-bottom: 20px; }
-.px-5 { padding-left: 5px; padding-right: 5px; }
-.px-10 { padding-left: 10px; padding-right: 10px; }
-.mx-10 { margin-left: 10px; margin-right: 10px }
-.mx-20 { margin-left: 20px; margin-right: 20px; }
-.mb-10 { margin-bottom: 10px; }
-.box {
-  height: 100vh;
-  overflow: hidden;
-  // padding-bottom: 120rpx;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-}
-.listDataBox {
-  padding-bottom: 120rpx;
-}
-.scrollBox{
-  flex: 1;
-  height: 0 !important;
-  padding-bottom: 24rpx;
-  box-sizing: border-box;
-}
-:deep(.uni-searchbar__box) {
-  width: calc(100% - 105px);
-  height: 40px !important;
-  border: 1px solid #00B760;
-  padding-right: 20px;
-  flex: none;
-}
-.search-btn {
-  position: absolute;
-  right: 11px;
-  top: 10px;
-  width: 110px;
-  height: 40px;
-  font-size: 16px;
-  background-color: #00B760;
-  color: #fff;
-  border-radius: 0 5px 5px 0;
-  z-index: 9;
-}
-.goBack {
-  width: 110px;
-  height: 32px;
-  font-size: 13px;
-  background-color: #00B760;
-  color: #fff;
-  // border-radius: 0 5px 5px 0;
-  z-index: 9;
-}
-:deep(.picker-view) {
-  padding-bottom: 80px !important;
-}
-
-.jobCount {
-  height: 40px;
-  line-height: 40px;
-  color: #fff;
-  text-align: center;
-  font-size: 15px;
-  background: linear-gradient(to right, #12ebb0, #427daa);
-}
-
-:deep(.uni-card) {
-  padding: 0 !important;
-  .uni-card__content {
-    padding: 0 !important;
-  }
-}
-
-.enterpriseName {
-  color: #404040;
-  font-weight: 700;
-}
-.enterAvatar {
-  width: 60px;
-  height: 60px;
-  // border-radius: 50%;
-  margin: auto;
-}
-.titleBox {
-  text-align: left;
-  padding: 15px 20rpx;
-  .title {
-    font-size: 20px;
-    font-weight: 600;
-    margin-bottom: 12px;
-  }
-  .jobFairName {
-    color: #00B760;
-  }
-}
-</style>

+ 17 - 17
pagesB/jobFair/enterprisesClassification.vue

@@ -5,21 +5,19 @@
       <view style="position: relative;">
         <!-- 轮播图 -->
         <SwiperAd v-if="swiperAdList.length" :list="swiperAdList" margin="0" borderRadius="0" @click="handleToDetails"></SwiperAd>
-        <view class="stick" :style="`background-color: ${backgroundColor}`"><view style="position: relative;" class="ss-m-t-30" >
-          <view class="ss-p-y-30">
-            <view style="position: relative;"></view>
-              <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 class="stick ss-p-y-30" :style="`background-color: ${backgroundColor}`">
+          <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>
           <!-- tab页签 -->
           <scroll-view v-if="tabList?.length" scroll-x="true" class="scroll-container">
@@ -70,7 +68,7 @@
         </view>
         <!-- 招聘会分享按钮 -->
         <view v-if="showShareBtn" class="shareButtonBox" @tap="handleShare">
-          <uni-icons type="redo-filled" size="20" color="#fff" />
+          <uni-icons type="redo-filled" size="23" color="#fff" />
         </view>
       </view>
     </scroll-view>
@@ -166,6 +164,7 @@ const getEnterpriseList = async () => {
     //
     const res = await getJobFairEnterprisePage(params)
     const list = res?.data?.list || []
+    // list.push(...[].concat(...Array(10).fill(list))) // 测试滚动效果
     listData.value = listData.value.concat(dealDictArrayData([], list))
     loading.value = false
     if (listData.value?.length === +res?.data?.total) {
@@ -241,6 +240,7 @@ const handleShare = () => {
   // padding: 1px 0 120rpx;
   padding-bottom: 120rpx;
   margin: 0 5rpx;
+  margin-top: -10px;
   .enterpriseName {
     color: #404040;
     font-weight: 700;
@@ -320,7 +320,7 @@ const handleShare = () => {
 .search-btn {
   position: absolute;
   right: 13px;
-  top: 19px;
+  top: 3px;
   width: 106px;
   height: 34px;
   line-height: 34px;

+ 59 - 49
pagesB/jobFair/positionClassification.vue

@@ -4,40 +4,64 @@
   <view class="box" :style="`background-color: ${backgroundColor}`">
     <scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
       <view style="position: relative;">
-        <!-- 轮播图 -->
-        <SwiperAd v-if="swiperAdList.length && !query.enterpriseId" :list="swiperAdList" margin="0" borderRadius="0"></SwiperAd>
-        <view class="stick" :style="`background-color: ${backgroundColor}`">
-          <view style="position: relative;" class="ss-m-t-30" >
-            <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>
+
+        <!-- 招聘会企业下的职位列表 -->
+        <template v-if="query?.enterpriseId">
+          <view class="enterpriseName" :style="`color: ${entNameColor}`">{{ entName }}</view>
+          <!-- 超长企业名称超长企业名称名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称超长企业名称123 -->
+          <view class="stick ss-p-y-30" :style="`background-color: ${backgroundColor}`">
+            <!-- 搜索条 -->
+            <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>
-          <!-- tab页签 -->
-          <scroll-view v-if="tabList?.length && !query.enterpriseId" scroll-x="true" class="scroll-container">
-            <view
-              class="scroll-item"
-              :style="`margin-left: ${index ? '24px' : ''};`"
-              v-for="(val, index) in tabList" :key="index+val"
-              @tap="handClickTab(index)"
-            >
-              <view>
-                <view class="text">{{ val.title }}</view>
-                <view v-if="index === tabIndex" class="choose" style="background-color: #fff;"></view>
-                <view v-else class="choose" style="background-color: #ffffff00;"></view>
-              </view>
+        </template>
+
+        <!-- 招聘会职位列表 -->
+        <template v-else>
+          <SwiperAd v-if="swiperAdList.length && !query.enterpriseId" :list="swiperAdList" margin="0" borderRadius="0"></SwiperAd>
+          <view class="stick ss-p-t-30" :style="`background-color: ${backgroundColor}`">
+            <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>
-          </scroll-view>
-          <!-- entName 企业》企业内职位列表 -->
-          <view v-if="entName && query.enterpriseId" class="enterpriseName" :style="`color: ${entNameColor}`">{{ entName }}</view>
-        </view>
+            
+            <!-- 横向分类页签 -->
+            <scroll-view v-if="tabList?.length && !query.enterpriseId" scroll-x="true" class="scroll-container">
+              <view
+                class="scroll-item"
+                :style="`margin-left: ${index ? '24px' : ''};`"
+                v-for="(val, index) in tabList" :key="index+val"
+                @tap="handClickTab(index)"
+              >
+                <view>
+                  <view class="text">{{ val.title }}</view>
+                  <view v-if="index === tabIndex" class="choose" style="background-color: #fff;"></view>
+                  <view v-else class="choose" style="background-color: #ffffff00;"></view>
+                </view>
+              </view>
+            </scroll-view>
+          </view>
+        </template>
         <view v-if="listData?.length" class="listDataBox">
           <PositionList
             :list="listData"
@@ -53,7 +77,7 @@
         </view>
         <!-- 招聘会分享按钮 -->
         <view v-if="showShareBtn" class="shareButtonBox" @tap="handleShare">
-          <uni-icons type="redo-filled" size="20" color="#fff" />
+          <uni-icons type="redo-filled" size="23" color="#fff" />
         </view>
       </view>
     </scroll-view>
@@ -289,25 +313,11 @@ const handleShare = () => {
 }
 
 .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;
-  }
+  line-height: 28px;
+  padding: 15px 80px 15px 30px;
 }
 
 :deep(.uni-searchbar) {

+ 0 - 165
pagesB/jobFair/positions.vue

@@ -1,165 +0,0 @@
-<!-- 招聘会/企业详情 -->
-<template>
-  <view class="box">
-    <scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
-      <view>
-        <!-- 轮播图 -->
-        <SwiperAd v-if="swiperAdList.length" :list="swiperAdList" imgUrlKey="img" margin="0" borderRadius="0" :strType="false" @click="handleToDetails"></SwiperAd>
-        <view class="stick">
-          <view class="titleBox">
-            <view class="entName">{{ entName }}</view>
-          </view>
-        </view>
-        <view v-if="listData?.length" class="listDataBox">
-          <PositionList
-            :list="listData"
-            :noMore="false"
-            :showEntInfo="false"
-            :jobFairId="query.jobFairId"
-            updateTimeAlign="left"
-            noDataTextColor="#fff"
-          ></PositionList>
-          <uni-load-more :status="more" />
-        </view>
-        <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>
-        </view>
-      </view>
-    </scroll-view>
-  </view>
-</template>
-
-<script setup>
-import { onLoad } from '@dcloudio/uni-app'
-import { ref, reactive } from 'vue'
-import { dealDictObjData } from '@/utils/position'
-import { getJobFairEntJobPage } from '@/api/jobFair'
-import PositionList from '@/components/PositionList'
-import { getWebContent } from '@/api/common'
-import SwiperAd from '@/components/SwiperAd'
-
-const more = ref('more')
-const listData = ref([])
-const query = reactive({
-  pageSize: 20, 
-  pageNo: 1,
-  jobFairId: undefined,
-  enterpriseId: undefined,
-})
-
-const entName = ref('')
-
-onLoad(async (options) => {
-  entName.value = options.entName
-  if (options?.jobFairId) {
-    query.jobFairId = options.jobFairId
-    query.enterpriseId = options.enterpriseId
-    getData()
-	}
-})
-
-// 获取轮播图
-const swiperAdList = ref([])
-const getSystemWebContent = async () => {
-  const { data } = await getWebContent()
-  swiperAdList.value = data?.appHomeCarousel || []
-}
-getSystemWebContent()
-
-const getData = async () => {
-  if (!query.jobFairId) {
-    uni.showToast({ title: '获取企业岗位失败,请重试!', icon: 'none', duration: 2000 })
-    return
-  }
-  try {
-    const res = await getJobFairEntJobPage(query)
-    const list = res?.data?.list || []
-    list.forEach(e => {
-      e.job = dealDictObjData({}, e)
-    })
-    listData.value = listData.value.concat(list)
-    if (listData.value?.length === +res?.data?.total) {
-      more.value = 'noMore'
-      return
-    }
-  } catch (error) {
-    query.pageNo--
-    more.value = 'more'
-  }
-}
-
-const scrollTop = ref(0)
-const old = ref({
-  scrollTop: 0
-})
-const onScroll = (e) =>{
-  old.value.scrollTop = e.detail.scrollTop
-}
-
-// 加载更多
-const loadingMore = () => {
-  more.value = 'loading'
-  query.pageNo++
-  getData()
-}
-
-// const goBack = () => {
-// 	uni.navigateTo({
-// 		url: '/pagesB/jobFair/index'
-// 	})
-// }
-
-</script>
-
-<style scoped lang="scss">
-.stick {
-  z-index: 1;
-  position: sticky;
-  top: 0;
-  background-color: #7ec04c;
-}
-.box {
-  height: 100vh;
-  overflow: hidden;
-  // padding-bottom: 120rpx;
-  box-sizing: border-box;
-  display: flex;
-  flex-direction: column;
-  background-color: #7ec04c;
-}
-.listDataBox {
-  // padding: 1px 0 120rpx;
-  padding-bottom: 120rpx;
-  margin: 0 5rpx;
-}
-.scrollBox{
-  flex: 1;
-  height: 0 !important;
-  padding-bottom: 24rpx;
-  box-sizing: border-box;
-}
-
-:deep(.uni-load-more__text) {
-  color: #fff !important;
-}
-
-:deep(.uni-card) {
-  padding: 0 !important;
-  .uni-card__content {
-    padding: 0 !important;
-  }
-}
-
-.titleBox {
-  text-align: center;
-  padding: 15px 20rpx;
-  .title {
-    font-size: 20px;
-    font-weight: 600;
-    margin-bottom: 12px;
-  }
-  .entName {
-    color: #fff;
-  }
-}
-</style>