ai助手投递偏好设置修复
This commit is contained in:
@@ -242,6 +242,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
import SideNav from '@/components/SideNav.vue'
|
||||
import AgentSetupWizard from '@/components/AgentSetupWizard.vue'
|
||||
import AgentChatJobList from '@/components/AgentChatJobList.vue'
|
||||
@@ -256,8 +258,13 @@ import type { AgentConfig, AgentRecommendJob } from '@/api/agent'
|
||||
import { fetchAgentTaskList, fetchJobList, fetchJobIntention, fetchCustomizeResume } from '@/api/jobs'
|
||||
import type { JobListItem, JobListParams } from '@/api/jobs'
|
||||
import { fetchResumeList } from '@/api/resume'
|
||||
import { fetchMemberStatus } from '@/api/member'
|
||||
import JobGoalDialog from '@/components/JobGoalDialog.vue'
|
||||
|
||||
// ==================== 路由 & Store ====================
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
|
||||
// ==================== sessionStorage 缓存 key ====================
|
||||
const STORAGE_KEY = 'agent_apply_progress_list'
|
||||
const COMPLETED_STORAGE_KEY = 'agent_completed_apply_list'
|
||||
@@ -390,6 +397,23 @@ function loadCompletedFromStorage() {
|
||||
|
||||
/** 页面挂载时查询配置 */
|
||||
onMounted(async () => {
|
||||
// 检查会员权限:确保会员信息已加载,免费用户弹窗并跳回
|
||||
if (!store.state.memberStatus) {
|
||||
try {
|
||||
const res = await fetchMemberStatus()
|
||||
if (res.code === '0' && res.data) {
|
||||
store.commit('SET_MEMBER_STATUS', res.data)
|
||||
}
|
||||
} catch { /* 异常时继续检查 */ }
|
||||
}
|
||||
const status = store.state.memberStatus
|
||||
if (!status || !status.isMember) {
|
||||
// 免费用户 — 弹出会员权限拦截弹窗,跳回上一页
|
||||
store.commit('SET_SHOW_MEMBER_ACCESS_DIALOG', true)
|
||||
router.back()
|
||||
return
|
||||
}
|
||||
|
||||
loadProgressFromStorage()
|
||||
loadCompletedFromStorage()
|
||||
await loadAgentConfig()
|
||||
|
||||
Reference in New Issue
Block a user