|
@@ -120,6 +120,7 @@ const handleCheckJobDelivery = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
// 效验求职者是否有收藏该职位
|
|
// 效验求职者是否有收藏该职位
|
|
|
|
+const actions = ref(false)
|
|
const isCollection = ref(false)
|
|
const isCollection = ref(false)
|
|
const getCollectionStatus = async () => {
|
|
const getCollectionStatus = async () => {
|
|
if (!jobId) return
|
|
if (!jobId) return
|
|
@@ -134,7 +135,12 @@ const handleLogin = () => {
|
|
|
|
|
|
// 收藏&取消收藏职位
|
|
// 收藏&取消收藏职位
|
|
const handleCollection = async () => {
|
|
const handleCollection = async () => {
|
|
- if (!getPersonalToken()) return handleLogin()
|
|
|
|
|
|
+ // 效验登录状态
|
|
|
|
+ if (!getPersonalToken()) {
|
|
|
|
+ actions.value = true
|
|
|
|
+ handleLogin()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (!jobId) return
|
|
if (!jobId) return
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
const api = isCollection.value ? getPersonJobUnfavorite : getPersonJobFavorite
|
|
await api(isCollection.value ? jobId : { jobId })
|
|
await api(isCollection.value ? jobId : { jobId })
|
|
@@ -175,6 +181,12 @@ const handleDelivery = () => {
|
|
const loginSuccess = async ({ type = false, info = {}, keyArr = [] }) => {
|
|
const loginSuccess = async ({ type = false, info = {}, keyArr = [] }) => {
|
|
const bool = await handleCheckJobDelivery()
|
|
const bool = await handleCheckJobDelivery()
|
|
showQuickResumeDialog.value = false
|
|
showQuickResumeDialog.value = false
|
|
|
|
+ // actions为true则是收藏时的登录,不需要弹窗选择简历
|
|
|
|
+ if (actions.value) {
|
|
|
|
+ actions.value = false
|
|
|
|
+ Snackbar.success('登录成功')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (bool) return Snackbar.warning(t('resume.alreadyResume'))
|
|
if (bool) return Snackbar.warning(t('resume.alreadyResume'))
|
|
showHandleDelivery.value = !showQuickResumeDialog.value
|
|
showHandleDelivery.value = !showQuickResumeDialog.value
|
|
if (type) {
|
|
if (type) {
|