Xiao_123 7 hónapja
szülő
commit
b2f0f6bd7a

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

@@ -265,7 +265,7 @@ let userAccount = ref(JSON.parse(localStorage.getItem('userAccount')) || {}) //
 
 userStore.$subscribe((mutation, state) => {
   if (Object.keys(state.baseInfo).length) baseInfo.value = state.baseInfo
-  if (Object.keys(state.userInfo).length) userInfo.value = state.userInfo
+  if (state.userInfo && Object.keys(state.userInfo).length) userInfo.value = state?.userInfo
   if (Object.keys(state.userAccount).length) userAccount.value = state.userAccount
 })
 

+ 3 - 3
src/views/recruit/enterprise/positionManagement/index.vue

@@ -52,7 +52,7 @@ const query = ref({
   pageSize: 10,
   pageNo: 1,
   status: 0, // 0招聘中 1已关闭
-  // hasExpiredData: false, // true 到期职位
+  hasExpiredData: false, // true 到期职位
   hire: false // true 众聘岗位
 })
 const exportLoading = ref(false)
@@ -62,7 +62,7 @@ const tab = ref(1)
 const tabList = [
   { label: t('position.recruitmentInProgress'), value: 1 },
   { label: t('position.closed'), value: 2 },
-  // { label: t('position.expiredPosition'), value: 3 }
+  { label: t('position.expiredPosition'), value: 3 }
 ]
 
 const items = ref([])
@@ -97,7 +97,7 @@ const handleExport = async () => {
 const getPositionList = async () => {
   if (tab.value !== 3) {
     query.value.status = tab.value === 1 ? 0 : (tab.value === 2 ? 1 : null)
-  }
+  } else query.value.hasExpiredData = true
   const { list, total: number } = await getJobAdvertisedList(query.value)
   if (!list.length) {
     if (query.value.name) tipsText.value = '暂无数据,请更换关键词后再试'

+ 3 - 3
src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

@@ -52,7 +52,7 @@
         </div>
         <!-- 展示 -->
         <div v-else>
-          <span class="ml-50" style="font-size: 20px; font-weight: 600;color: var(--color-666);">{{ baseInfo?.name || userInfo.phone }}</span>
+          <span class="ml-50" style="font-size: 20px; font-weight: 600;color: var(--color-666);">{{ baseInfo?.name || userInfo?.phone }}</span>
           <div class="mt-3 d-flex">
             <div class="listBox ml-50">
               <div>
@@ -61,7 +61,7 @@
               </div>
               <div>
                 <span class="mdi mdi-phone-outline"></span>
-                <span>{{ baseInfo?.phone || userInfo.phone || $t('common.currentlyUnavailable') }}</span>
+                <span>{{ baseInfo?.phone || userInfo?.phone || $t('common.currentlyUnavailable') }}</span>
               </div>
               <div>
                 <span class="mdi mdi-email-outline"></span>
@@ -239,7 +239,7 @@ const items = ref({
     {
       type: 'phoneNumber',
       key: 'phone',
-      value: userInfo.value.phone || '',
+      value: userInfo?.value?.phone || '',
       default: null,
       label: '电话号码',
       col: 6,

+ 1 - 1
src/views/recruit/personal/PersonalCenter/resume/online/components/selfEvaluation.vue

@@ -40,7 +40,7 @@ const useStore = useUserStore()
 
 // 获取个人优势
 const getData = async () => {
-  await useStore.getUserBaseInfos(JSON.parse(localStorage.getItem('userInfo')).id)
+  await useStore.getUserBaseInfos(JSON.parse(localStorage.getItem('userInfo'))?.id)
   const baseInfo = JSON.parse(localStorage.getItem('baseInfo'))
   // if (!baseInfo) return
   advantage.value = baseInfo?.advantage || ''

+ 36 - 1
src/views/recruit/personal/home/index.vue

@@ -5,7 +5,11 @@
       <headSearch @handleSearch="handleSearch"></headSearch>
     </div>
     <hotJobs></hotJobs>
-    <div class="default-width">
+    <div class="advertise ml-3">
+      <div class="advertise-title">广告</div>
+      <img class="advertise-img cursor-pointer" :src="advertiseUrl" @click="handleOpenAdvertise">
+    </div>
+    <div class="default-width content-box">
       <homeJobTypeCard></homeJobTypeCard>
       <advertisementPage class="my-3"></advertisementPage>
       <hotPromotedPositions></hotPromotedPositions>
@@ -31,6 +35,8 @@ import { nextTick, ref } from 'vue'
 import { useUserStore } from '@/store/user'
 import { getToken } from '@/utils/auth'
 
+const advertiseUrl = 'https://www.mendunerhr.com/images/userfiles/d8e0b0cc911c47788e54a5ca5d5a1cc3/images/recruitment/adImages/2024/09/%E5%8F%B3%E4%BE%A7%E5%B9%BF%E5%91%8A%E5%9B%BE%E5%88%B6%E4%BD%9C%E6%A8%A1%E6%9D%BF.png'
+
 const store = useUserStore()
 
 const router = useRouter()
@@ -56,6 +62,11 @@ const handleUpdateInfo = async () => {
   handleInfoClose()
   await store.getUserBaseInfos(null)
 }
+
+// 广告跳转
+const handleOpenAdvertise = () => {
+  window.open('https://mp.weixin.qq.com/s/Us_cWsRpGQBnLFBrZGynLA')
+}
 </script>
 
 <style lang="scss" scoped>
@@ -65,4 +76,28 @@ const handleUpdateInfo = async () => {
   z-index: 999;
   background-color: var(--default-bgc);
 }
+.advertise {
+  position: sticky;
+  top: 128px;
+  z-index: 999;
+  width: 180px; 
+  height: 360px;
+  &-title {
+    color: #000;
+    font-size: 14px;
+    background-color: #d5d5d5;
+    border-left: 3px solid #00897B;
+    padding: 8px 16px;
+    border-radius: 4px 4px 0 0;
+  }
+  &-img {
+    width: 100%; 
+    height: 100%; 
+    border-radius: 0 0 4px 4px;
+    object-fit: cover;
+  }
+}
+.content-box {
+  margin-top: -360px;
+}
 </style>