|
@@ -18,7 +18,7 @@ import Snackbar from '@/plugins/snackbar'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { updateEventList } from '@/utils/eventList'
|
|
import { updateEventList } from '@/utils/eventList'
|
|
import { getBaseInfoDictOfName } from '@/utils/getText'
|
|
import { getBaseInfoDictOfName } from '@/utils/getText'
|
|
-import Confirm from '@/plugins/confirm'
|
|
|
|
|
|
+// import Confirm from '@/plugins/confirm'
|
|
|
|
|
|
// import { useIMStore } from './im'
|
|
// import { useIMStore } from './im'
|
|
|
|
|
|
@@ -136,8 +136,9 @@ export const useUserStore = defineStore('user',
|
|
await this.getEnterpriseInfo()
|
|
await this.getEnterpriseInfo()
|
|
await this.getEnterpriseUserAccountInfo()
|
|
await this.getEnterpriseUserAccountInfo()
|
|
updateEventList(false)
|
|
updateEventList(false)
|
|
- window.location.href = '/enterprise'
|
|
|
|
Snackbar.success('切换成功')
|
|
Snackbar.success('切换成功')
|
|
|
|
+ await this.checkEnterpriseBaseInfo()
|
|
|
|
+ window.location.href = '/enterprise'
|
|
},
|
|
},
|
|
// 获取当前登录的企业用户信息
|
|
// 获取当前登录的企业用户信息
|
|
async getEnterpriseInfo () {
|
|
async getEnterpriseInfo () {
|
|
@@ -162,20 +163,21 @@ export const useUserStore = defineStore('user',
|
|
|
|
|
|
// 获取《企业基本信息》
|
|
// 获取《企业基本信息》
|
|
async checkEnterpriseBaseInfo () {
|
|
async checkEnterpriseBaseInfo () {
|
|
- await this.changeRole()
|
|
|
|
- const data = await getEnterpriseBaseInfo()
|
|
|
|
- // 检验必填信息
|
|
|
|
- const keyArr = ['industryId', 'financingStatus', 'scale', 'introduce', 'logoUrl'] // 必填信息列表
|
|
|
|
- let href = '/recruit/enterprise/informationManagement/informationSettings'
|
|
|
|
- const valid = Object.keys(data).length && keyArr.every(e => {
|
|
|
|
- const bool = data[e] && data[e] !== 0
|
|
|
|
- if (!bool && e === 'logoUrl') href = '/recruit/enterprise/informationManagement/informationSettings?tabKey=2'
|
|
|
|
- return bool
|
|
|
|
- })
|
|
|
|
- if (!valid) {
|
|
|
|
- Confirm('系统提示', '企业信息设置未完善,是否前往完善?').then(() => {
|
|
|
|
- window.location.href = href
|
|
|
|
|
|
+ try {
|
|
|
|
+ const data = await getEnterpriseBaseInfo()
|
|
|
|
+ // 检验必填信息
|
|
|
|
+ const keyArr = ['industryId', 'financingStatus', 'scale', 'introduce', 'logoUrl'] // 必填信息列表
|
|
|
|
+ let href = '/recruit/enterprise/informationManagement/informationSettings'
|
|
|
|
+ const valid = Object.keys(data).length && keyArr.every(e => {
|
|
|
|
+ const bool = data[e] && data[e] !== 0
|
|
|
|
+ if (!bool && e === 'logoUrl') href = '/recruit/enterprise/informationManagement/informationSettings?tabKey=2'
|
|
|
|
+ return bool
|
|
})
|
|
})
|
|
|
|
+ if (!valid) {
|
|
|
|
+ localStorage.setItem('checkEnterpriseBaseInfoFalseHref', href)
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ // console.log(error)
|
|
}
|
|
}
|
|
// return valid
|
|
// return valid
|
|
},
|
|
},
|