Jelajahi Sumber

加上招聘会标识。只有在招聘会访问进行投递才传递招聘会ID给后端。用回在招聘会内分享的职位算是查看招聘会职位,投递和沟通中投递也需要传招聘会ID

lifanagju_citu 3 bulan lalu
induk
melakukan
ad29daaf3c

+ 6 - 3
components/PositionList/index.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="ss-m-x-20">
     <!-- 招聘会 -->
-    <view v-if="props.showJobFair" class="ss-p-t-20" style="position: relative" @click="handleToJobFair">
+    <view v-if="props.showJobFairEntrance" class="ss-p-t-20" style="position: relative" @click="handleToJobFair">
       <image
         src="https://minio.menduner.com/dev/menduner/miniProgram/Grand-Mercure.jpg"
         style="width: 100%; height: 100px; border-radius: 8px"
@@ -21,6 +21,7 @@
           <view class="titleBox my-5">
             <view style="display: flex;align-items: center;">
               <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>
+              <image v-if="props.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
               <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name" :nodes="item.job.name"></rich-text>
               <view v-else class="job-name">{{ formatName(item.job?.name) }}</view>
             </view>
@@ -94,7 +95,8 @@ import { formatName } from '@/utils/getText'
 
 const props = defineProps({
   list: { type: Array, default: () => [] },
-  showJobFair: { type: Boolean, default: false }, // 招聘会
+  jobFairId: { type: [String, Number], default: '' }, // 招聘会id
+  showJobFairEntrance: { type: Boolean, default: false }, // 招聘会
   showEntInfo: { type: Boolean, default: true },
   updateTimeAlign: { type: String, default: 'end' },
   noMore: { type: Boolean, default: false },
@@ -104,7 +106,8 @@ const props = defineProps({
 //岗位详情
 const toDetail = (item) =>{
   if (!item?.job?.id) return
-  const url = `/pagesB/positionDetail/index?id=${item.job.id}&area=${item.job.areaName}&jobFairId=${item.job.jobFairId}`
+  let url = `/pagesB/positionDetail/index?id=${item.job.id}&area=${item.job.areaName}`
+  if (props.jobFairId) url += `&jobFairId=${props.jobFairId}`
   uni.navigateTo({ url })
 }
 

+ 1 - 1
pages/index/position.vue

@@ -35,7 +35,7 @@
             <view class="white-bgc px-10 stickFilter">
             <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
           </view>
-          <PositionList :list="positionListData" :noMore="false" :showJobFair="true"></PositionList>
+          <PositionList :list="positionListData" :noMore="false" :showJobFairEntrance="true"></PositionList>
           <uni-load-more :status="more" />
         </view>
       </scroll-view>

+ 7 - 0
pagesA/chart/index.vue

@@ -46,6 +46,9 @@
           <view class="box-main-time">{{ timesTampChange(+(val.timestamp.padEnd(13, '0'))) }}</view>
           <template v-if="val.payload?.type === 102">
             <view class="jobCard">
+              <!-- <view style="display: flex;">
+                <image v-if="info.jobFairId" src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
+              </view> -->
               <view class="jobCard-title"> {{ formatName(val.payload?.content?.positionInfo?.name) }}</view>
               <view
                 v-if="!val.payload?.content?.positionInfo?.payFrom && !val.payload?.content?.positionInfo?.payTo"
@@ -432,12 +435,14 @@ async function handleSendResume () {
     if (isEmployment.value !== '-1') {
       await jobCvRelHireSend({
         jobId: positionInfo.value.id,
+        ...(jobFairId && { jobFairId }),
         url: resumeCheck.value.url,
         recommendUserId: isEmployment.value
       })
     } else {
       await jobCvRelSend({
         jobId: positionInfo.value.id,
+        ...(jobFairId && { jobFairId }),
         title: resumeCheck.value.title,
         url: resumeCheck.value.url,
         type: positionInfo.value.hire ? 1 : 0
@@ -568,11 +573,13 @@ async function getMessageTypeSync () {
   }
 }
 
+let jobFairId = ''
 onLoad(async (options) => {
   info.value = Object.keys(options).reduce((r, k) => {
     r[k] = decodeURIComponent(options[k])
     return r
   }, {})
+  jobFairId = info.value.jobFairId
   isEmployment.value = info.value.isEmployment
   channelItem.value = toChannel(info.value.channelID, info.value.channelType)
 

+ 1 - 0
pagesB/jobFair/positions.vue

@@ -16,6 +16,7 @@
               :list="listData"
               :noMore="false"
               :showEntInfo="false"
+              :jobFairId="query.jobFairId"
               updateTimeAlign="left"
             ></PositionList>
             <uni-load-more :status="more" />

+ 17 - 5
pagesB/positionDetail/index.vue

@@ -37,10 +37,16 @@
               {{ tag }}
             </view>
           </view>
-          <!-- 赏金 -->
-          <view v-if="info.hire" class="topLine mt-5" style="display: flex; align-items: center;">
-            <view class="iconfont icon-a-1_zhaopin" style="color: #e03506; font-size: 30px;"></view>
-            <view class="hirePrice">{{ `赏金:${commissionCalculation(info.hirePrice / 100, 1)}元` }}</view>
+          <view class="topLine">
+            <!-- 赏金 -->
+            <view v-if="info.hire" class="mt-5" style="display: flex; align-items: center;">
+              <view class="iconfont icon-a-1_zhaopin" style="color: #e03506; font-size: 30px;"></view>
+              <view class="hirePrice">{{ `赏金:${commissionCalculation(info.hirePrice / 100, 1)}元` }}</view>
+            </view>
+            <!-- 招聘会 -->
+            <view v-if="isJobFair" class="mt-5" style="display: flex; align-items: center;">
+              <image src="/static/svg/jobFair.svg" class=" ss-m-r-10" style="width: 20px; height: 20px;"></image>
+            </view>
           </view>
           <view class="font-size-13 color-999 ss-m-t-10" style="text-align: end;">更新时间:{{ timesTampChange(info.updateTime, 'Y-M-D h:m') }}</view>
           <!-- 企业信息 -->
@@ -250,6 +256,7 @@ watch(() => useUserStore.refreshToken, (newVal) => {
 
 let jobId = ''
 let jobFairId = ''
+const isJobFair = ref(false) // 是否是通过招聘会进入的岗位
 let obj = {}
 onLoad(async (options) => {
   console.log(options, 'options')
@@ -268,6 +275,8 @@ onLoad(async (options) => {
 
   jobId = options?.id || options?.jobId || obj?.jobId || ''
   jobFairId = options?.jobFairId !== 'undefined' && options.jobFairId !== 'null' && options.jobFairId || ''
+  isJobFair.value = Boolean(jobFairId)
+  // console.log(`${jobFairId?'是':'不是'}招聘会职位`, ',jobFairId:', jobFairId)
   deliveryCheck()
 
   if (jobId) {
@@ -405,11 +414,13 @@ const createPoster = async () => {
 //在点击open-type="share"按钮后会触发以下函数,可以在函数中写需要的逻辑,当然函数的返回值必须是一个对象,用于设置分享卡片的展示形式
 //发送给微信好友  
 onShareAppMessage((res) => {
-  console.log(1, 'onShareAppMessage', res)
   let path = `/pagesB/positionDetail/index?jobId=${info.value.id}`
   if (info.value.hire) {
     path += `&sharedById=${useUserStore.accountInfo.userId}`
   }
+  if (jobFairId) {
+    path += `&jobFairId=${jobFairId}`
+  }
   if(!canvasToTempFilePath.value){
 		setTimeout(() => {},1000)
 	}
@@ -586,6 +597,7 @@ async function handleSend () {
 		channelType: channel.channelType,
 		avatar: info.value?.contact?.avatar,
 		sex: info.value?.contact?.sex,
+    ...(jobFairId && { jobFairId })
 	}
 	const queryStr = Object.keys(query).reduce((r, v) => {
 		return r += `${v}=${encodeURIComponent(query[v])}&`

File diff ditekan karena terlalu besar
+ 0 - 0
static/svg/jobFair.svg


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini