ソースを参照

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 1 年間 前
コミット
0b23750f2e

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

@@ -47,4 +47,12 @@ export const resetPassword = async (data) => {
     url: '/admin-api/menduner/system/mde-user/update-password',
     data
   })
+}
+
+// 字典
+export const getDictData = async (params) => {
+  return await request.get({
+    url: '/app-api/system/dict-data/type',
+    params
+  })
 }

+ 9 - 0
src/api/personal/position.js

@@ -0,0 +1,9 @@
+import request from '@/config/axios'
+
+// 获取推荐职位
+export const getPromotedPosition = async (params) => {
+  return await request.get({
+    url: '/app-api/menduner/system/job/advertised/get/recommended',
+    params
+  })
+}

+ 6 - 6
src/hooks/web/useDictionaries.js

@@ -1,14 +1,14 @@
 
-
+import { getDictData } from '@/api/common/index'
 // 定义对应的api
 const DICT_CITY_API = {
-  DICT_CITY: Promise.resolve()
+  menduner_exp_type: getDictData
 }
 
-const setDict = (type, val, cacheTime) => {
+const setDict = (type, val, cacheTime = 7200) => {
   localStorage.setItem(type, JSON.stringify({
     data: val,
-    expire: Date.now() + cacheTime
+    expire: Date.now() + cacheTime * 1000
   }))
 }
 
@@ -23,9 +23,9 @@ export const getDict = (type) => {
       const query = {
         type
       }
-      DICT_CITY_API[type](query).then(({data}) => {
+      DICT_CITY_API[type](query).then(data => {
         setDict(type, data, Date.now())
-        resolve(data)
+        resolve({ data })
       })
     })
 }

+ 9 - 2
src/layout/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="parent" @click="layoutClick">
-    <Headers></Headers>
-    <div>
+    <Headers class="headers"></Headers>
+    <div style="margin-top: 50px;">
       <router-view></router-view>
     </div>
     <Footers class="mt-10"></Footers>
@@ -28,6 +28,13 @@ const layoutClick = () => {
   background-color: var(--default-bgc);
   position: relative;
 }
+.headers {
+  position: fixed;
+  right: 0;
+  left: 0;
+  top: 0;
+  z-index: 999;
+}
 .slider {
   position: fixed;
   bottom: 50%;

+ 55 - 50
src/layout/personal/navBar.vue

@@ -5,74 +5,79 @@
       density="compact"
       style="padding-left: 0px;height: 50px;font-size: 14px;"
     >
-      <div class="innerBox">
-        <div class="nav-logo">
-          <v-img src="../../assets/logo.png"  aspect-ratio="16/9" cover :width="90" style="height: 40px"></v-img>
-        </div>
-        <div class="nav-city">
-          <p class="nav-city-box">
-            <v-icon color="primary">mdi-map-marker</v-icon>
-            <span class="nav-city-selected">广州</span>
-            <span class="switchover-city nav-city-selected">[切换城市]</span>
-          </p>
-        </div>
-        <div class="nav">
-          <ul>
-            <li v-for="k in list" :key="k.text" class="mt-1">
-              <a :href="k.path" style="font-size: 14px;">{{ k.text }}</a>
-            </li>
-          </ul>
+      <div class="innerBox d-flex justify-space-between">
+        <div>
+          <div class="nav-logo">
+            <v-img src="../../assets/logo.png"  aspect-ratio="16/9" cover :width="90" style="height: 40px"></v-img>
+          </div>
+          <div class="nav-city">
+            <p class="nav-city-box">
+              <v-icon color="primary">mdi-map-marker</v-icon>
+              <span class="nav-city-selected">广州</span>
+              <span class="switchover-city nav-city-selected">[切换城市]</span>
+            </p>
+          </div>
+          <div class="nav">
+            <ul>
+              <li v-for="k in list" :key="k.text">
+                <a :href="k.path" style="font-size: 14px;">{{ k.text }}</a>
+              </li>
+            </ul>
+          </div>
         </div>
-        <div class="user-nav" v-if="!getToken()">
-          <div class="btns">
+        
+        <div class="d-flex user-nav">
+          <div class="btns d-flex align-center" v-if="!getToken()">
             <span class="nav-resume-tools">
               <a href="">我要找工作</a>
               <a href="">我要招聘</a>
             </span>
             <v-btn class="half-button" border color="primary" size="small" @click="handleLogin">登录/注册</v-btn>
-            <v-menu>
+          </div>
+          <div class="d-flex align-center" v-if="getToken()">
+            <span style="cursor: pointer;">消息</span>
+            <v-menu open-on-hover>
               <template v-slot:activator="{ props }">
-                <v-btn
-                  class="ml-3"
-                  icon="mdi-translate"
-                  size="small"
-                  v-bind="props"
-                >
-                </v-btn>
+                <div class="d-flex ml-5 align-center" v-bind="props">
+                  <v-avatar>
+                    <v-img alt="John" src="https://cdn.vuetifyjs.com/images/john.jpg"></v-img>
+                  </v-avatar>
+                  <div class="ml-2">游客</div>
+                </div>
               </template>
-              <v-list density="compact">
-                <v-list-item
-                  v-for="item in localeStore.localeMap"
-                  :key="item.name"
-                  :value="item.lang"
-                  :active="localeStore.currentLocale.lang === item.lang"
-                  @click="localeStore.setCurrentLocale(item)"
-                >
-                  <v-list-item-title>{{ item.name }}</v-list-item-title>
+
+              <v-list>
+                <v-list-item v-for="(item, index) in items" :key="index" @click="item.change">
+                  <v-list-item-title>{{ item.title }}</v-list-item-title>
                 </v-list-item>
               </v-list>
             </v-menu>
           </div>
-        </div>
-        <div v-else class="d-flex user-nav">
-          <span style="cursor: pointer;">消息</span>
-          <v-menu open-on-hover>
+          <v-menu>
             <template v-slot:activator="{ props }">
-              <div class="d-flex ml-5 align-center" v-bind="props">
-                <v-avatar>
-                  <v-img alt="John" src="https://cdn.vuetifyjs.com/images/john.jpg"></v-img>
-                </v-avatar>
-                <div class="ml-2">游客</div>
-              </div>
+              <v-btn
+                class="ml-3"
+                color="primary"
+                icon="mdi-translate"
+                size="small"
+                v-bind="props"
+              >
+              </v-btn>
             </template>
-
-            <v-list>
-              <v-list-item v-for="(item, index) in items" :key="index" @click="item.change">
-                <v-list-item-title>{{ item.title }}</v-list-item-title>
+            <v-list density="compact">
+              <v-list-item
+                v-for="item in localeStore.localeMap"
+                :key="item.name"
+                :value="item.lang"
+                :active="localeStore.currentLocale.lang === item.lang"
+                @click="localeStore.setCurrentLocale(item)"
+              >
+                <v-list-item-title>{{ item.name }}</v-list-item-title>
               </v-list-item>
             </v-list>
           </v-menu>
         </div>
+        
       </div>
     </v-toolbar>
     <Dialog :visible="show" :footer="true" title="企业注册" widthType="1" @close="show = false">

+ 1 - 1
src/plugins/snackbar/message.vue

@@ -3,7 +3,7 @@
     <v-snackbar
       timeout="-1"
       location="top"
-      :variant="variant || elevated"
+      :variant="variant || 'flat'"
       :color="color"
       v-model="snackbar"
     >{{message}}

+ 7 - 0
src/router/modules/remaining.js

@@ -40,6 +40,13 @@ const remainingRouter = [
     path: '',
     component: Layout,
     children: [
+      {
+        path: '',
+        component: () => import('@/views/Home/index'),
+        meta: {
+          title: '首页'
+        }
+      },
       {
         path: '/home',
         component: () => import('@/views/Home/index'),

+ 6 - 0
src/styles/personal/navBar.css

@@ -17,8 +17,14 @@
 }
 
 .banner {
+  width: 100%;
+  height: 50px;
   z-index: var(--zIndex-nav) !important;
   color: #fff;
+  background-color: var(--default-bgc);
+  padding-left: 0px;
+  height: 50px;
+  font-size: 14px;
 }
 
 .banner .left {

+ 1 - 1
src/styles/personal/navBar.min.css

@@ -1 +1 @@
-.user-nav .nav-resume-tools{display:inline-block;vertical-align:middle}.user-nav .nav-resume-tools>a{display:inline-block;font-weight:500;color:var(--v-primary-base);line-height:20px;height:auto;padding:3px 7px;vertical-align:middle;border-radius:4px;margin-right:8px;border:1px solid transparent}.banner{z-index:var(--zIndex-nav) !important;color:#fff}.banner .left{height:100%;display:flex;align-items:center;font-size:20px;cursor:pointer}.hover:hover{cursor:pointer;background:rgba(0,0,0,0.03)}.innerBox{position:relative;width:1184px;max-width:1184px;margin:0 auto;align-items:center}.nav-logo{float:left}.nav-city{float:left;position:relative;cursor:pointer;height:49px;line-height:49px;color:var(--v-primary-base);margin-left:50px}.nav-city-selected{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:84px;vertical-align:middle}.switchover-city{color:var(--v-primary-base);margin-left:10px}.nav{font-size:0;float:left;margin-left:50px;height:49px;line-height:49px}.nav ul{display:flex;white-space:nowrap;vertical-align:top}.nav ul li{text-align:center;font-size:14px;margin:0 5px;list-style:none}.nav li a{display:block;padding:0 5px;position:relative;text-decoration:none;color:var(--v-primary-base)}.user-nav{position:absolute;right:0;color:var(--v-primary-base);height:49px;line-height:49px}.user-nav .btns .btn-outline{border-radius:8px;text-align:center;font-size:14px;height:26px;line-height:26px;min-width:0;padding:0 11px;margin-left:14px;background-color:transparent}.user-nav .btn{display:inline-block;box-sizing:content-box;border:1px solid var(--v-primary-base);letter-spacing:1px;cursor:pointer}.user-nav a{text-decoration:none}
+.user-nav .nav-resume-tools{display:inline-block;vertical-align:middle}.user-nav .nav-resume-tools>a{display:inline-block;font-weight:500;color:var(--v-primary-base);line-height:20px;height:auto;padding:3px 7px;vertical-align:middle;border-radius:4px;margin-right:8px;border:1px solid transparent}.banner{width:100%;height:50px;z-index:var(--zIndex-nav) !important;color:#fff;background-color:var(--default-bgc);padding-left:0px;height:50px;font-size:14px}.banner .left{height:100%;display:flex;align-items:center;font-size:20px;cursor:pointer}.hover:hover{cursor:pointer;background:rgba(0,0,0,0.03)}.innerBox{position:relative;width:1184px;max-width:1184px;margin:0 auto;align-items:center}.nav-logo{float:left}.nav-city{float:left;position:relative;cursor:pointer;height:49px;line-height:49px;color:var(--v-primary-base);margin-left:50px}.nav-city-selected{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:84px;vertical-align:middle}.switchover-city{color:var(--v-primary-base);margin-left:10px}.nav{font-size:0;float:left;margin-left:50px;height:49px;line-height:49px}.nav ul{display:flex;white-space:nowrap;vertical-align:top}.nav ul li{text-align:center;font-size:14px;margin:0 5px;list-style:none}.nav li a{display:block;padding:0 5px;position:relative;text-decoration:none;color:var(--v-primary-base)}.user-nav{position:absolute;right:0;color:var(--v-primary-base);height:49px;line-height:49px}.user-nav .btns .btn-outline{border-radius:8px;text-align:center;font-size:14px;height:26px;line-height:26px;min-width:0;padding:0 11px;margin-left:14px;background-color:transparent}.user-nav .btn{display:inline-block;box-sizing:content-box;border:1px solid var(--v-primary-base);letter-spacing:1px;cursor:pointer}.user-nav a{text-decoration:none}

+ 10 - 4
src/styles/personal/navBar.scss

@@ -15,8 +15,14 @@
   border: 1px solid transparent;
 }
 .banner {
+  width: 100%;
+  height: 50px;
   z-index: var(--zIndex-nav) !important;
   color: #fff;
+  background-color: var(--default-bgc);
+  padding-left: 0px;
+  height: 50px;
+  font-size: 14px;
   .left {
     height: 100%;
     display: flex;
@@ -87,12 +93,12 @@
   color: var(--v-primary-base);
 }
 .user-nav {
-  position: absolute;
-  right: 0;
+  // position: absolute;
+  // right: 0;
   // display: inline-block;
   color: var(--v-primary-base);
-  height: 49px;
-  line-height: 49px;
+  // height: 49px;
+  // line-height: 49px;
 }
 .user-nav .btns .btn-outline {
   border-radius: 8px;

+ 14 - 1
src/views/Home/personal/components/hotPromotedPositions.vue

@@ -24,6 +24,19 @@
 
 <script setup name="hotPromotedPositions">
 import PositionCard from '@/components/Position/item.vue'
-import {ref } from 'vue'
+import { ref } from 'vue'
+// import { getPromotedPosition } from '@/api/personal/position'
+import { getDict } from '@/hooks/web/useDictionaries'
+
 const tab = ref(0)
+
+// 推荐职位
+// const getPositionList = async () => {
+//   const { list } = await getPromotedPosition({ pageNo: 1, pageSize: 10 })
+//   console.log(list, 'list')
+// }
+// getPositionList()
+
+const uuu = getDict('menduner_business_status')
+console.log(uuu, 'gggg')
 </script>