Xiao_123 6 hónapja
szülő
commit
ce05f878c3

+ 14 - 0
api/enterprise.js

@@ -0,0 +1,14 @@
+import request from "@/utils/request"
+
+// 获取精选企业列表
+export const getHotEnterprise = (params) => {
+  return request({
+    url: '/app-api/menduner/system/job/advertised/get/hot/enterprise',
+    method: 'GET',
+    params,
+    custom: {
+      showLoading: false,
+      auth: false
+    }
+  })
+}

+ 6 - 0
pages.json

@@ -246,6 +246,12 @@
 					"style": {
 						"navigationBarTitleText": "用户行为规范"
 					}
+				},
+				{
+					"path": "recommendEnterprise/index",
+					"style": {
+						"navigationBarTitleText": "精选企业"
+					}
 				}
 			]
 		}

+ 6 - 3
pages/index/position.vue

@@ -71,7 +71,6 @@ onShow(() => {
   currentTabBar?.setData({ selected: 0 });
 })
 onLoad(() => {
-  
   wx.showShareMenu({
     withShareTicket: true,
     menus: ['shareAppMessage', 'shareTimeline']
@@ -113,7 +112,7 @@ const filterList = ref([
 
 const gridList = [
   { label: '优选集团', icon: '/static/img/group.png', path: '' },
-  { label: '精选企业', icon: '/static/img/enterprise.png', path: '' },
+  { label: '精选企业', icon: '/static/img/enterprise.png', path: '/pagesB/recommendEnterprise/index' },
   { label: '门墩儿猎头', icon: '/static/img/headhunting.png', path: '' },
   { label: '早报资讯', icon: '/static/img/information.png', id: 'morningNews' },
   { label: '联系我们', icon: '/static/img/contact.png', path: '' }
@@ -149,9 +148,13 @@ const handleGrid = async (e) => {
       uni.showToast({ icon: 'none', title: err.msg })
     }
   }
+  if (obj?.path) {
+    uni.navigateTo({
+      url: obj.path
+    })
+  }
 }
 
-// 
 const positionListData = ref([])
 const query = reactive({ 
   pageSize: 20, 

+ 6 - 0
pagesA/resumeOnline/baseInfoEdit.vue

@@ -89,6 +89,12 @@ const getInfo = () => {
     maritalStatus: '',
     areaId: ''
   }
+  // 根据字典数据初始化地区数据
+  if (dictObj && dictObj?.areaTreeData) {
+    const type = typeof dictObj.areaTreeData[0].id
+    formData.value.regId = type === 'string' ? formData.value.regId.toString() : Number(formData.value.regId)
+    formData.value.areaId = type === 'string' ? formData.value.areaId.toString() : Number(formData.value.areaId)
+  }
 }
 getInfo()
 

+ 5 - 1
pagesA/resumeOnline/jobIntention.vue

@@ -51,7 +51,11 @@ async function getJobInterested (id) {
   const obj = data.find(k => k.id === id)
 	formData.value = cloneDeep(obj)
 	formData.value.industryIdList = obj.industryIdList.length ? obj.industryIdList[0] : ''
-	formData.value.interestedAreaIdList = obj.interestedAreaIdList.length ? Number(obj.interestedAreaIdList[0]) : ''
+	if (dictObj && dictObj?.areaTreeData) {
+		const type = typeof dictObj.areaTreeData[0].id
+		formData.value.workAreaId = type === 'string' ? obj.workAreaId.toString() : Number(obj.workAreaId)
+		formData.value.interestedAreaIdList = type === 'string' && obj.interestedAreaIdList.length ? obj.interestedAreaIdList[0].toString() : Number(obj.interestedAreaIdList[0])
+	}
 }
 
 onLoad((options) => {

+ 128 - 0
pagesB/recommendEnterprise/index.vue

@@ -0,0 +1,128 @@
+<template>
+  <view style="padding-bottom: 30px;">
+    <uni-card v-for="(val, index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
+      <view class="d-flex align-center" @click="handleToEnterprise(val)">
+        <image class="enterAvatar" :src="val.enterprise.logoUrl ? val.enterprise.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">{{ val.enterprise.anotherName || val.enterprise.name }}</view>
+          <view class="ss-m-t-5">
+            <span class="color-999">{{ val.enterprise?.industryName || '' }}</span>
+            <span class="divider tag-gap1" v-if="val.enterprise?.industryName && val.enterprise?.scaleName"> | </span>
+            <span class="color-999">{{ val.enterprise?.scaleName || '' }}</span>
+          </view>
+          <view class="ss-m-t-10">
+            <uni-tag 
+              v-for="(tag,i) in val.enterprise?.welfareList || []"
+              :key="i"
+              class="tag-gap 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="line ss-m-y-20"></view>
+      <view>
+        <view class="list-shape" v-for="(k, i) in val.jobList" :key="k.id" @click="handleToPosition(k)" :style="{'padding-bottom': i !== val.jobList.length - 1 ? '10px' : ''}">
+          <view class="titleBox my-5">
+            <view class="job-name">{{ k.name }}</view>
+            <span v-if="!k.payFrom && !k.payTo" class="salary-text">面议</span>
+            <span v-else class="salary-text">{{ k.payFrom }}-{{ k.payTo }}{{ k.payName ? '/' + k.payName : '' }}</span>
+          </view>
+          <view style="font-size: 13px;" class="ss-m-t-5">
+            <span class="tag-gap" style="color: #808080;">
+              <span>{{ k.areaName }}</span>
+              <span class="ss-m-x-10" v-if="k.areaName && k.eduName">|</span>
+              <span>{{ k.eduName }}</span>
+              <span class="ss-m-x-10" v-if="k.expName">|</span>
+              <span>{{ k.expName }}</span>
+            </span>
+          </view>
+        </view>
+      </view>
+    </uni-card>
+  </view>
+</template>
+
+<script setup>
+import { ref }  from 'vue'
+import { getHotEnterprise } from '@/api/enterprise'
+import { dealDictObjData, dealDictArrayData } from '@/utils/position'
+
+const list = ref([])
+const query = ref({
+  pageNo: 1,
+  pageSize: 10
+})
+
+// 精选企业列表
+const getPopularEnterprise = async () => {
+  try {
+    const { data } = await getHotEnterprise(query.value)
+    list.value = data.list.map(e => {
+      e.enterprise = dealDictObjData({}, e.enterprise)
+      if (e.jobList && e.jobList.length) e.jobList = dealDictArrayData([], e.jobList).slice(0, 2)
+      return e
+    })
+  } catch (err) {
+    uni.showToast({ icon: 'none', title: err.msg })
+  }
+}
+getPopularEnterprise()
+
+// 企业详情
+const handleToEnterprise = (val) => {
+  uni.navigateTo({
+    url: `/pagesB/companyDetail/index?id=${val.enterprise?.id}`
+  })
+}
+
+// 职位详情
+const handleToPosition = (k) => {
+  const url = `/pagesB/positionDetail/index?id=${k.id}`
+  uni.navigateTo({ url })
+}
+
+</script>
+
+<style scoped lang="scss">
+.enterpriseName {
+  color: #404040;
+  font-weight: 700;
+}
+.enterAvatar {
+  width: 60px;
+  height: 60px;
+  border-radius: 50%;
+  margin: auto;
+}
+.line {
+  border-top: 1px solid #ccc;
+}
+.list-shape {
+  background-color: #fff;
+  border-radius: 12px 12px 0 0;
+  .titleBox {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+}
+.salary-text {
+	float: right;
+  font-size: 15px;
+	color: #CEC149;
+  font-weight: 700;
+}
+.job-name {
+  font-size: 16px;
+  font-weight: 700;
+  color: #345768;
+  max-width: 50vw;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+</style>