浏览代码

热门职位

lifanagju_citu 1 年之前
父节点
当前提交
499722155f
共有 2 个文件被更改,包括 16 次插入1 次删除
  1. 8 0
      src/api/common/index.js
  2. 8 1
      src/views/Home/personal/components/hotJobs.vue

+ 8 - 0
src/api/common/index.js

@@ -65,6 +65,14 @@ export const getPositionTreeClick = async (data) => {
   })
 }
 
+// 获取热门职位
+export const getHotPositionList = async (params) => {
+  return await request.get({
+    url: '/app-api/menduner/system/position/hot',
+    params
+  })
+}
+
 // 获得职位信息
 export const getPositionTreeData = async (params) => {
   return await request.get({

+ 8 - 1
src/views/Home/personal/components/hotJobs.vue

@@ -6,10 +6,17 @@
 </template>
 
 <script setup>
+import { getHotPositionList } from '@/api/common/index'
 import { ref } from 'vue';
 defineOptions({ name:'personal-hotJobs-list'})
 
-const jobs = ref(['Java','PHP','Python','C#','.NET','GIS工程师','区块链工程师','测试', 'Python','C#','.NET'])
+// 获取行业树形
+let jobs = ref(null)
+const getTreeData = async () => {
+  const res = await getHotPositionList()
+  jobs.value = res || []
+}
+getTreeData()
 </script>
 
 <style lang="scss" scoped>