zhengnaiwen_citu 1 рік тому
батько
коміт
bf8e3d427c

+ 8 - 5
src/hooks/web/useDictionaries.js

@@ -1,9 +1,9 @@
 
 import { getDictData } from '@/api/common/index'
 // 定义对应的api
-const DICT_CITY_API = {
-  menduner_exp_type: getDictData
-}
+// const DICT_CITY_API = {
+//   menduner_exp_type: getDictData
+// }
 
 const setDict = (type, val, cacheTime = 7200) => {
   localStorage.setItem(type, JSON.stringify({
@@ -12,7 +12,7 @@ const setDict = (type, val, cacheTime = 7200) => {
   }))
 }
 
-export const getDict = (type) => {
+export const getDict = (type, apiType = 'dict') => {
     return new Promise((resolve) => {
       const item = localStorage.getItem(type)
       const catchData = item ? JSON.parse(item) : null
@@ -23,7 +23,10 @@ export const getDict = (type) => {
       const query = {
         type
       }
-      DICT_CITY_API[type](query).then(data => {
+      const apiFn = {
+        dict: getDictData
+      }
+      apiFn[apiType](query).then(data => {
         setDict(type, data, Date.now())
         resolve({ data })
       })

+ 2 - 4
src/hooks/web/useTitle.js

@@ -1,14 +1,12 @@
 import { watch, ref } from 'vue'
 import { isString } from '@/utils/is'
-import { useAppStore } from '@/store/app'
 import { useI18n } from './useI18n'
-
+const mTitle = import.meta.env.VITE_APP_TITLE
 
 export const useTitle = (newTitle) => {
-  const appStore = useAppStore()
   const { t } = useI18n()
   const title = ref(
-    newTitle ? `${appStore.title} - ${t(newTitle)}` : appStore.title
+    newTitle ? `${mTitle} - ${t(newTitle)}` : mTitle
   )
 
   watch(

+ 1 - 1
src/layout/personal/navBar.vue

@@ -106,7 +106,7 @@ const localeStore = useLocaleStore()
 
 const list = ref([
   { text: '首页', path: '/home' },
-  { text: '职位', path: '' },
+  { text: '职位', path: '/recruit/position' },
   { text: '公司', path: '' }
 ])
 

+ 6 - 8
src/layout/personal/slider.vue

@@ -3,15 +3,13 @@
     <div v-for="item in list" :key="item.mdi" class="slider-box-item">
       <v-tooltip :text="item.tips" location="start">
         <template v-slot:activator="{ props }">
-          <v-icon size="30" class="icons" v-bind="props">{{ item.mdi }}</v-icon>
-        </template>
-        <template #default>
-          <div v-if="item.showImg" class="ma-3" style="text-align: center">
-            <v-img cover aspect-ratio="1/1" src="https://minio.citupro.com/dev/static/mendunerCode.jpg" :width="170" style="height: 170px;"></v-img>
-            <span class="tips-text">关注门墩儿直聘微信公众号</span>
-          </div>
-          <span v-else>{{ item.tips }}</span>
+          <v-btn size="30" class="icons" variant="text" v-bind="props" :icon="item.mdi"></v-btn>
         </template>
+        <div v-if="item.showImg" class="ma-3" style="text-align: center">
+          <v-img cover aspect-ratio="1/1" src="https://minio.citupro.com/dev/static/mendunerCode.jpg" :width="170" style="height: 170px;"></v-img>
+          <span class="tips-text">关注门墩儿直聘微信公众号</span>
+        </div>
+        <span v-else>{{ item.tips }}</span>
       </v-tooltip>
     </div>
   </div>

+ 21 - 0
src/router/modules/recruit.js

@@ -0,0 +1,21 @@
+
+// 门墩儿招聘
+import Layout from '@/layout'
+const recruit = [
+  {
+    path: '/recruit',
+    component: Layout,
+    name: 'recruit',
+    children: [
+      {
+        path: '/recruit/position',
+        component: () => import('@/views/recruit/position'),
+        name: 'recruitPosition',
+        meta: {
+          title: '职位'
+        }
+      }
+    ]
+  }
+]
+export default recruit

+ 5 - 3
src/router/modules/remaining.js

@@ -1,13 +1,15 @@
 import personal from './personal'
 import enterprise from './enterprise'
+import recruit from './recruit'
 import Layout from '@/layout'
 
-const type  = 0
+// const type  = 0
 const routeArray = [
+  recruit,
   personal,
   enterprise
 ]
-const items = routeArray[type]
+// const items = routeArray[type]
 const remainingRouter = [
   {
     path: '/login',
@@ -65,7 +67,7 @@ const remainingRouter = [
       title: '注册企业'
     }
   },
-  ...items
+  ...routeArray
 ]
 
 export default remainingRouter

+ 0 - 20
src/store/app.js

@@ -1,20 +0,0 @@
-import { defineStore } from 'pinia'
-import { ref } from 'vue' 
-
-
-export const useAppStore = defineStore('app', 
-  () => {
-    const title = ref(import.meta.env.VITE_APP_TITLE) // 标题
-
-    const setTitle = (txt) => {
-      title.value = txt
-    }
-    return {
-      title,
-      setTitle
-    }
-  },
-  {
-    persist: true, // ref() 持久化响应
-  }
-)

+ 10 - 1
src/views/recruit/position/index.vue

@@ -1,5 +1,14 @@
 <template>
-  <div>招聘</div>
+  <div>
+    检索
+  </div>
+  <div>筛选条件</div>
+  <div>
+    <div>
+      左侧列表
+    </div>
+    <div>右侧列表</div>
+  </div>
 </template>
 <script setup>
 defineOptions({name: 'position-page'})