Xiao_123 před 7 měsíci
rodič
revize
6d8424cfd0

+ 3 - 1
src/components/Position/item.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="d-flex">
     <div class="position-box">
-      <div class="sub-li" v-for="(item, index) in list" :key="index" :style="{'height': tab === 3 && item.hire ? '180px' : '140px'}">
+      <div class="sub-li" v-for="(item, index) in list" :key="index" :style="{'height': tab === 3 && item.hire ? '180px' : '149px'}">
         <div class="job-info" @click="handlePosition(item)" @mouseenter="item.active = true" @mouseleave="item.active = false">
           <div class="sub-li-top">
             <div class="sub-li-info">
@@ -26,6 +26,7 @@
             <v-chip v-if="item.hirePrice" size="small" label color="primary">赏金:{{ commissionCalculation(item.hirePrice, 1) }}元</v-chip>
             <v-chip v-if="item.hirePoint" size="small" label class="ml-1" color="primary">积分:{{ commissionCalculation(item.hirePoint, 1) }}点</v-chip>
           </div>
+          <div v-if="tab === 2" class="font-size-14 mb-3 text-end" style="color: #345768;">发布时间:{{ timesTampChange(item.updateTime, 'Y-M-D h:m') }}</div>
         </div>
         <div class="sub-li-bottom" @click="handleEnterprise(item)">
           <div class="user-info">
@@ -53,6 +54,7 @@
 defineOptions({ name: 'position-card-item' })
 import { ref, watch } from 'vue'
 import { commissionCalculation } from '@/utils/position'
+import { timesTampChange } from '@/utils/date'
 
 const props = defineProps({
   items: {

+ 0 - 1
src/views/login/index.vue

@@ -88,7 +88,6 @@ const handleLogin = async () => {
     router.push({ path: '/recruitHome' })
 
   } catch (err) {
-    console.log(err, 'login-catch', passRef.value.loginData)
     const text = err.code === 1100016002 ? '您的手机号还未注册过' : '您的邮箱还未注册过'
     Confirm('系统提示',  `${text},去注册?`, {
       cancelCallback: true

+ 1 - 0
src/views/recruit/entRegister/register.vue

@@ -228,6 +228,7 @@ const handleCommit = async () => {
   if (params.password !== params.passwordConfirm) return Snackbar.warning('两次输入的密码不一致,请确认')
 
   await enterpriseRegisterApply(params)
+  localStorage.removeItem('loginAccount')
   Snackbar.success(t('common.submittedSuccessfully'))
   router.push({ path: '/recruit/entRegister/inReview' })
 }

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

@@ -123,6 +123,7 @@ import { uploadFile } from '@/api/common'
 import { getUserAvatar } from '@/utils/avatar'
 import { useI18n } from '@/hooks/web/useI18n'
 import portrait from './portrait.vue'
+import { checkEmail } from '@/utils/validate'
 import { ref } from 'vue';
 defineOptions({name: 'resume-components-basicInfo'})
 const emit = defineEmits(['complete'])
@@ -132,6 +133,7 @@ const userStore = useUserStore()
 const CtFormRef = ref()
 const isEdit = ref(false)
 const showIcon = ref(false)
+let completeStatus = false
 const overlay = ref(false) // 加载中
 let baseInfo = ref({})
 let userInfo = ref({})
@@ -140,6 +142,10 @@ const getBasicInfo = () => { // 获取基础信息
   if (!key || !Object.keys(key).length) return
   baseInfo.value = JSON.parse(key) // 人才信息
   userInfo.value = JSON.parse(localStorage.getItem('userInfo'))
+  if (baseInfo.value && Object.keys(baseInfo.value).length) {
+    completeStatus = true
+    emit('complete', { status: completeStatus, id: 'basicInfo' })
+  }
 }
 getBasicInfo()
 
@@ -252,7 +258,16 @@ const items = ref({
       label: '常用邮箱 *',
       col: 6,
       outlined: true,
-      rules: [v => !!v || '请输入常用邮箱']
+      rules: [
+        value => {
+          if (value) return true
+          return '请输入常用邮箱'
+        },
+        value => {
+          if (checkEmail(value)) return true
+          return '请输入正确的电子邮箱'
+        }
+      ]
     },
     {
       type: 'autocomplete',
@@ -411,10 +426,9 @@ const handleSave = async () => {
   await saveResumeBasicInfo(obj)
   Snackbar.success(t('common.saveMsg'))
   isEdit.value = false
-  // 获取当前登录账户信息
-  // if (baseInfo.value.userId) await userStore.getUserBaseInfos(baseInfo.value.userId)
   await userStore.getUserBaseInfos(baseInfo.value.userId || null)
   getBasicInfo()
+
   // 清除户籍地:省
   if (clearRegProvinceId) items.value.options.forEach(e => { if (e.key === 'regProvinceId') e.value = null })
 }
@@ -448,18 +462,14 @@ const deal = async (id, cityKey, provinceKey) => {
   }
 }
 
-let completeStatus = false
 items.value.options.forEach((e, index) => {
   if ((index + 2) % 2 === 0) e.flexStyle = 'mr-3'
   if (e.dictTypeName) getDictData(e.dictTypeName) // 查字典set options
-  // formItems回显
   const infoExist = baseInfo.value && Object.keys(baseInfo.value).length
-  if (infoExist) completeStatus = true
   if (infoExist && baseInfo.value[e.key]) e.value = baseInfo.value[e.key]
   // 日期相关
   if (e.type === 'datepicker') e.value = timesTampChange(e.value, 'Y-M-D')
   // 所在城市回显
-  // if (infoExist && e.nameKey) e[e.nameKey] = baseInfo.value[e.nameKey]
   if (infoExist && e.key === 'areaId' && baseInfo.value[e.key]) {
     const id = baseInfo.value[e.key]
     deal(id, e.key, 'workAreaProvinceId')
@@ -471,7 +481,6 @@ items.value.options.forEach((e, index) => {
   if (e.value === undefined || e.value === null || e.value === '') completeStatus = false
 })
 // 完成度展示
-emit('complete', { status: completeStatus, id: 'basicInfo' })
   
 const provinceChange = (value, val, obj) => {
   let cityKey
@@ -486,11 +495,7 @@ const provinceChange = (value, val, obj) => {
 getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
   data = data?.length && data || []
   if (!data?.length) return console.error('areaTreeData获取失败!')
-  //
-  // const china = data.find(e => e.id === '1')
-  // const chinaTreeData = china?.children?.length ? china.children : []
   const chinaTreeData = data
-  //
   if (!chinaTreeData?.length) return console.error('chinaTreeData获取失败!')
   const workAreaProvince = items.value.options.find(e => e.key === 'workAreaProvinceId')
   const regAreaProvince = items.value.options.find(e => e.key === 'regProvinceId')

+ 4 - 2
src/views/register/person.vue

@@ -45,8 +45,10 @@ const handleRegister = async () => {
   try {
     await userStore.handleUserRegister({ ...phoneRef.value.loginData })
     Snackbar.success(props.isCompany ? '手机号验证成功' : '注册成功')
-    if (!props.isCompany) router.push({ path: '/recruitHome' })
-    else emit('success')
+    if (!props.isCompany) {
+      router.push({ path: '/recruitHome' })
+      localStorage.removeItem('loginAccount')
+    } else emit('success')
   } finally {
     loading.value = false
   }