修改租户id

This commit is contained in:
rain
2026-06-09 14:00:38 +08:00
parent 7f7fd61ec0
commit 0bf2f573ed
9 changed files with 133 additions and 13 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
const ApiClient = {
// 后端租户标识,所有接口请求都会带到 header 里。
// 后面如果租户号更换,只需要改这里的默认值,或在 config.js 里配置 CURRENT_CONFIG.TENANT_ID。
TENANT_ID: '000000',
TENANT_ID: '936208',
API: {
authCode: '/api/web/auth/code',
@@ -69,6 +69,7 @@ const ApiClient = {
minePayArticleList: '/api/web/mine/pay-article/list',
minePayArticleDetail: (id) => `/api/web/mine/pay-article/${encodeURIComponent(id)}`,
minePurchasedPayArticleList: '/api/web/mine/purchased-pay-article/list',
minePurchasedPayArticleDelete: (sourceType, recordId) => `/api/web/mine/purchased-pay-article/${encodeURIComponent(sourceType)}/${encodeURIComponent(recordId)}`,
freeArticleDetail: (id) => `/api/web/free-article/${encodeURIComponent(id)}`,
freeArticleRelated: (id) => `/api/web/free-article/${encodeURIComponent(id)}/related`,
freeArticleComments: (id) => `/api/web/free-article/${encodeURIComponent(id)}/comments`,
+3 -3
View File
@@ -73,7 +73,7 @@ const AuthPageUtil = {
const isSlideCaptchaUrl = (url) => String(url || '').indexOf('/api/web/auth/slide-captcha') >= 0;
const tenantId = () =>
typeof ApiClient !== 'undefined' && ApiClient.tenantId ? ApiClient.tenantId : '000000';
typeof ApiClient !== 'undefined' && ApiClient.tenantId ? ApiClient.tenantId : '936208';
if (typeof window.fetch === 'function') {
const nativeFetch = window.fetch.bind(window);
@@ -146,7 +146,7 @@ const AuthPageUtil = {
const script = document.createElement('script');
script.src = `${ApiClient.baseUrl}/static/slide-captcha/slide-captcha.js`;
script.dataset.apiBase = ApiClient.baseUrl || '';
script.dataset.tenantId = ApiClient.tenantId || '000000';
script.dataset.tenantId = ApiClient.tenantId || '936208';
script.onload = () => {
if (window.SlideCaptcha) resolve(window.SlideCaptcha);
else reject(new Error('滑动验证组件加载失败'));
@@ -166,7 +166,7 @@ const AuthPageUtil = {
title: options.title || '安全验证',
subtitle: options.subtitle || '拖动滑块完成验证',
apiBase: ApiClient.baseUrl || '',
tenantId: ApiClient.tenantId || '000000',
tenantId: ApiClient.tenantId || '936208',
headers: ApiClient.publicHeaders(),
onSuccess: (result) => {
const data = result || {};
+1 -1
View File
@@ -51,7 +51,7 @@ const CommonUtil = {
const tenantId =
typeof ApiClient !== 'undefined' && ApiClient.tenantId
? ApiClient.tenantId
: '000000';
: '936208';
const headers = { tenantId };
if (token) headers.Authorization = `Bearer ${token}`;
return headers;