writePump 只发 ActionCable 文本 JSON ping,从不发 websocket.PingMessage, 导致 readPump 的 PongHandler 永远不触发,ReadDeadline(60s) 到期后连接 被强制关闭。前端每 60 秒弹出"离线""重连"通知。 修复:在 ticker 中先发 PingMessage 控制帧(浏览器自动回 Pong 重置 ReadDeadline),再发 ActionCable 文本 ping(保活 ConnectionMonitor)。 同时包含此前会话中的其他变更: - 移除安全设置(SAML)页面及路由 - 新增超级管理员控制台前端页面 - platform agent_bots 路由使用 Platform* handler - 超级管理员入口改为 SPA 内路由跳转
77 lines
2.5 KiB
JavaScript
77 lines
2.5 KiB
JavaScript
import settings from './settings/settings.routes';
|
|
import conversation from './conversation/conversation.routes';
|
|
import { routes as searchRoutes } from '../../modules/search/search.routes';
|
|
import { routes as contactRoutes } from './contacts/routes';
|
|
import { routes as companyRoutes } from './companies/routes';
|
|
import { routes as notificationRoutes } from './notifications/routes';
|
|
import { routes as inboxRoutes } from './inbox/routes';
|
|
import { frontendURL } from '../../helper/URLHelper';
|
|
import helpcenterRoutes from './helpcenter/helpcenter.routes';
|
|
import campaignsRoutes from './campaigns/campaigns.routes';
|
|
import { routes as captainRoutes } from './captain/captain.routes';
|
|
import { routes as superAdminRoutes } from './super_admin/superAdmin.routes';
|
|
import AppContainer from './Dashboard.vue';
|
|
import Suspended from './suspended/Index.vue';
|
|
import NoAccounts from './noAccounts/Index.vue';
|
|
import OnboardingAccountDetails from './onboarding/Index.vue';
|
|
import v3AuthRoutes from '../../../v3/views/routes';
|
|
import { FEATURE_FLAGS } from '../../featureFlags';
|
|
|
|
const PortalsArticlesPreviewPage = () =>
|
|
import('./helpcenter/pages/PortalsArticlesPreviewPage.vue');
|
|
|
|
export default {
|
|
routes: [
|
|
...v3AuthRoutes,
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/portals/:portalSlug/:locale/articles/preview/:articleSlug'
|
|
),
|
|
name: 'portals_articles_preview',
|
|
meta: {
|
|
featureFlag: FEATURE_FLAGS.HELP_CENTER,
|
|
permissions: ['administrator', 'agent', 'knowledge_base_manage'],
|
|
},
|
|
component: PortalsArticlesPreviewPage,
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId'),
|
|
component: AppContainer,
|
|
children: [
|
|
...captainRoutes,
|
|
...inboxRoutes,
|
|
...conversation.routes,
|
|
...settings.routes,
|
|
...contactRoutes,
|
|
...companyRoutes,
|
|
...searchRoutes,
|
|
...notificationRoutes,
|
|
...helpcenterRoutes.routes,
|
|
...campaignsRoutes.routes,
|
|
...superAdminRoutes,
|
|
],
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/onboarding'),
|
|
name: 'onboarding_account_details',
|
|
meta: {
|
|
permissions: ['administrator', 'agent', 'custom_role'],
|
|
},
|
|
component: OnboardingAccountDetails,
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/suspended'),
|
|
name: 'account_suspended',
|
|
meta: {
|
|
permissions: ['administrator', 'agent', 'custom_role'],
|
|
},
|
|
component: Suspended,
|
|
},
|
|
{
|
|
path: frontendURL('no-accounts'),
|
|
name: 'no_accounts',
|
|
component: NoAccounts,
|
|
},
|
|
],
|
|
};
|