diff --git a/app/static/portal/common/api-client.js b/app/static/portal/common/api-client.js index 0b4937f..4994675 100644 --- a/app/static/portal/common/api-client.js +++ b/app/static/portal/common/api-client.js @@ -1,4 +1,4 @@ -import { clearAuthSession, getAccessToken } from '/static/portal/common/auth.js'; +import { clearAuthSession, getAccessToken } from '/static/portal/common/auth.js?v=20260913'; const ENDPOINTS = Object.freeze({ A034: { method: 'POST', path: '/api/v1/auth/tokens', auth: false }, @@ -54,6 +54,10 @@ const ENDPOINTS = Object.freeze({ ADVISOR_PUBLISHED: { method: 'GET', path: '/api/v1/advisor/recommendations/published' }, ADVISOR_GOAL: { method: 'GET', path: '/api/v1/advisor/investment-goals/current' }, ADVISOR_ANALYSIS: { method: 'POST', path: '/api/v1/advisor/portfolio-analysis' }, + ADVISOR_ALLOCATION: { method: 'POST', path: '/api/v1/advisor/asset-allocation' }, + ADVISOR_RECOMMEND: { method: 'POST', path: '/api/v1/advisor/recommendations', idempotent: true }, + ADVISOR_CREATE_GOAL: { method: 'POST', path: '/api/v1/advisor/investment-goals', idempotent: true }, + ADVISOR_CUSTOMER_GOAL: { method: 'GET', path: '/api/v1/advisor/customers/{customerId}/investment-goals/current' }, OFFSITE_MAILS: { method: 'GET', path: '/api/v1/offsite-fund/mails' }, OFFSITE_MAILBOX: { method: 'GET', path: '/api/v1/offsite-fund/mailbox-status' }, }); diff --git a/app/static/portal/common/customer-list-page.js b/app/static/portal/common/customer-list-page.js index 0d956c0..9b7c4a5 100644 --- a/app/static/portal/common/customer-list-page.js +++ b/app/static/portal/common/customer-list-page.js @@ -1,5 +1,5 @@ import { apiClient } from '/static/portal/common/api-client.js?v=20260913'; -import { requireCustomer } from '/static/portal/common/auth.js'; +import { requireCustomer } from '/static/portal/common/auth.js?v=20260913'; import { mountShell } from '/static/portal/common/layout/app-shell.js'; import { renderError, renderLoading } from '/static/portal/common/state-view.js'; diff --git a/app/static/portal/common/customer-service-widget/widget.js b/app/static/portal/common/customer-service-widget/widget.js index 386d4db..34937a1 100644 --- a/app/static/portal/common/customer-service-widget/widget.js +++ b/app/static/portal/common/customer-service-widget/widget.js @@ -1,5 +1,5 @@ import { apiClient, ApiError } from '/static/portal/common/api-client.js?v=20260913'; -import { getAccessToken, getAuthContext } from '/static/portal/common/auth.js'; +import { getAccessToken, getAuthContext } from '/static/portal/common/auth.js?v=20260913'; import { escapeHtml } from '/static/portal/common/formatters.js'; const VISITOR_TOKEN_KEY = 'portalVisitorToken'; diff --git a/app/static/portal/common/layout/app-shell.js b/app/static/portal/common/layout/app-shell.js index 3ad8897..af98dd0 100644 --- a/app/static/portal/common/layout/app-shell.js +++ b/app/static/portal/common/layout/app-shell.js @@ -3,7 +3,7 @@ import { getAuthContext, startAuthSync, switchAccount, -} from '/static/portal/common/auth.js'; +} from '/static/portal/common/auth.js?v=20260913'; import { escapeHtml } from '/static/portal/common/formatters.js'; import { mountCustomerServiceWidget } from '/static/portal/common/customer-service-widget/widget.js'; diff --git a/app/static/portal/common/login-controller.js b/app/static/portal/common/login-controller.js index e0d935f..9e2de6e 100644 --- a/app/static/portal/common/login-controller.js +++ b/app/static/portal/common/login-controller.js @@ -4,7 +4,7 @@ import { setAuthSession, staffHomeForRoles, startAuthSync, -} from '/static/portal/common/auth.js'; +} from '/static/portal/common/auth.js?v=20260913'; const REASON_MESSAGES = Object.freeze({ 'account-switched': '当前浏览器中的账号已切换,请重新登录后继续。', diff --git a/app/static/portal/common/permission-guard.js b/app/static/portal/common/permission-guard.js index 3dba9ec..1a5055c 100644 --- a/app/static/portal/common/permission-guard.js +++ b/app/static/portal/common/permission-guard.js @@ -1,4 +1,4 @@ -import { getPermissions } from '/static/portal/common/auth.js'; +import { getPermissions } from '/static/portal/common/auth.js?v=20260913'; export function applyPermissionGuard(root = document) { const permissions = new Set(getPermissions()); diff --git a/app/static/portal/customer/dashboard/dashboard.js b/app/static/portal/customer/dashboard/dashboard.js index 80ec15d..503e13f 100644 --- a/app/static/portal/customer/dashboard/dashboard.js +++ b/app/static/portal/customer/dashboard/dashboard.js @@ -1,5 +1,5 @@ import { apiClient } from '/static/portal/common/api-client.js?v=20260913'; -import { requireCustomer } from '/static/portal/common/auth.js'; +import { requireCustomer } from '/static/portal/common/auth.js?v=20260913'; import { mountShell } from '/static/portal/common/layout/app-shell.js'; import { applyPermissionGuard } from '/static/portal/common/permission-guard.js'; import { renderError, renderLoading } from '/static/portal/common/state-view.js?v=20260912'; @@ -50,6 +50,12 @@ if (requireCustomer()) { const productCode = new URLSearchParams(window.location.search).get('product_code'); const target = productCode ? document.querySelector(`[data-product-code="${CSS.escape(productCode)}"]`) : null; if (target) { target.classList.add('dashboard-holdings__highlight'); target.scrollIntoView({ block: 'center' }); window.setTimeout(() => target.classList.remove('dashboard-holdings__highlight'), 1500); } + if (new URLSearchParams(window.location.search).get('action') === 'trade') { + const orderForm = document.querySelector('[data-order-form]'); + const productInput = orderForm?.querySelector('[name="product_code"]'); + if (productInput && productCode) productInput.value = productCode; + if (dialog?.showModal && productCode && !dialog.open) dialog.showModal(); + } } async function load({ force = false } = {}) { if (!force && state.data && Date.now() - state.fetchedAt < 60000) { renderData(state.data, true); return; } diff --git a/app/static/portal/customer/dashboard/index.html b/app/static/portal/customer/dashboard/index.html index 91da390..3f5950f 100644 --- a/app/static/portal/customer/dashboard/index.html +++ b/app/static/portal/customer/dashboard/index.html @@ -19,6 +19,6 @@ 提交模拟委托关闭首版仅支持市价委托,系统会立即全额成交。请确认基金代码与数量。基金代码交易方向买入卖出份额确认提交 - +
首版仅支持市价委托,系统会立即全额成交。请确认基金代码与数量。