chore: batch commit remaining changes
Includes search engine improvements, Alembic migrations, new services (pubmed_daily_update, query_expansion), frontend updates, and documentation sync.
This commit is contained in:
@@ -12,6 +12,7 @@ const routes = [
|
||||
{ path: 'feed', redirect: '/' },
|
||||
{ path: 'literature/:pmid', name: 'public-detail', component: () => import('../views/public/LiteratureDetailView.vue') },
|
||||
{ path: 'journals', name: 'journals', component: () => import('../views/public/JournalBrowseView.vue') },
|
||||
{ path: 'search', name: 'public-search', component: () => import('../views/app/SearchView.vue') },
|
||||
{ path: 'cancers', name: 'cancers', component: () => import('../views/public/CancerBrowseView.vue') },
|
||||
{ path: 'drugs', name: 'drugs', component: () => import('../views/public/DrugApprovalsView.vue') },
|
||||
{ path: 'guidelines', name: 'guidelines', component: () => import('../views/public/GuidelinesView.vue') },
|
||||
@@ -19,6 +20,7 @@ const routes = [
|
||||
{ path: 'guidelines/plans', name: 'treatment-plans', component: () => import('../views/public/TreatmentPlansView.vue') },
|
||||
{ path: 'pricing', name: 'pricing', component: () => import('../views/public/PricingView.vue') },
|
||||
{ path: 'about', name: 'about', component: () => import('../views/public/AboutView.vue') },
|
||||
{ path: 'advanced-pub-search', name: 'advanced-pub-search', component: () => import('../views/public/AdvancedPubSearchView.vue') },
|
||||
{ path: 'help', name: 'help', component: () => import('../views/public/HelpView.vue') },
|
||||
],
|
||||
},
|
||||
@@ -109,6 +111,15 @@ router.beforeEach(async (to, _from, next) => {
|
||||
next({ name: 'detail', params: { pmid: to.params.pmid }, query: to.query })
|
||||
return
|
||||
}
|
||||
// 公开搜索 /search 和 App 内搜索 /app/search 互通
|
||||
if (to.name === 'public-search' && auth.isAuthenticated) {
|
||||
next({ name: 'search', query: to.query })
|
||||
return
|
||||
}
|
||||
if (to.name === 'search' && !auth.isAuthenticated) {
|
||||
next({ name: 'public-search', query: to.query })
|
||||
return
|
||||
}
|
||||
if (to.meta.requiresAuth && !auth.isAuthenticated) {
|
||||
next({ name: 'login', query: { redirect: to.fullPath } })
|
||||
} else if (to.meta.requiresSuperuser && !auth.user?.platform_role) {
|
||||
|
||||
Reference in New Issue
Block a user