fix(service-party-app): 修复 Account 服务 URL 为 rwaapi.szaiai.com

api.szaiai.com 被 OSS/CDN 拦截,改用 rwaapi.szaiai.com 直接访问 Kong 网关

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-29 02:45:23 -08:00
parent 551f3d27d2
commit 19e366e0d9
3 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ async function initServices() {
// 初始化 Account 服务 HTTP 客户端 // 初始化 Account 服务 HTTP 客户端
// 从数据库读取 Account 服务 URL默认使用生产环境地址 // 从数据库读取 Account 服务 URL默认使用生产环境地址
const settings = database.getAllSettings(); const settings = database.getAllSettings();
const accountServiceUrl = settings['account_service_url'] || 'https://api.szaiai.com'; const accountServiceUrl = settings['account_service_url'] || 'https://rwaapi.szaiai.com';
accountClient = new AccountClient(accountServiceUrl); accountClient = new AccountClient(accountServiceUrl);
// 设置 IPC 处理器 // 设置 IPC 处理器
@ -441,7 +441,7 @@ function setupIpcHandlers() {
// 获取 Account 服务 URL // 获取 Account 服务 URL
ipcMain.handle('account:getUrl', async () => { ipcMain.handle('account:getUrl', async () => {
return accountClient?.getBaseUrl() || 'https://api.szaiai.com'; return accountClient?.getBaseUrl() || 'https://rwaapi.szaiai.com';
}); });
// =========================================================================== // ===========================================================================

View File

@ -327,7 +327,7 @@ export class AccountClient {
// ============================================================================= // =============================================================================
// 默认使用生产环境地址 // 默认使用生产环境地址
const DEFAULT_ACCOUNT_SERVICE_URL = 'https://api.szaiai.com'; const DEFAULT_ACCOUNT_SERVICE_URL = 'https://rwaapi.szaiai.com';
// 创建默认客户端实例 // 创建默认客户端实例
export const accountClient = new AccountClient(DEFAULT_ACCOUNT_SERVICE_URL); export const accountClient = new AccountClient(DEFAULT_ACCOUNT_SERVICE_URL);

View File

@ -14,7 +14,7 @@ export default function Settings() {
const [settings, setSettings] = useState<Settings>({ const [settings, setSettings] = useState<Settings>({
messageRouterUrl: 'mpc-grpc.szaiai.com:443', // 生产环境默认地址 messageRouterUrl: 'mpc-grpc.szaiai.com:443', // 生产环境默认地址
accountServiceUrl: 'https://api.szaiai.com', // Account 服务默认地址 accountServiceUrl: 'https://rwaapi.szaiai.com', // Account 服务默认地址
autoBackup: false, autoBackup: false,
backupPath: '', backupPath: '',
}); });
@ -33,7 +33,7 @@ export default function Settings() {
if (result) { if (result) {
setSettings({ setSettings({
...result, ...result,
accountServiceUrl: accountUrl || 'https://api.szaiai.com', accountServiceUrl: accountUrl || 'https://rwaapi.szaiai.com',
}); });
} }
} catch (err) { } catch (err) {
@ -152,7 +152,7 @@ export default function Settings() {
type="text" type="text"
value={settings.accountServiceUrl} value={settings.accountServiceUrl}
onChange={(e) => setSettings(prev => ({ ...prev, accountServiceUrl: e.target.value }))} onChange={(e) => setSettings(prev => ({ ...prev, accountServiceUrl: e.target.value }))}
placeholder="https://api.szaiai.com" placeholder="https://rwaapi.szaiai.com"
className={styles.input} className={styles.input}
/> />
<button <button
@ -163,7 +163,7 @@ export default function Settings() {
</button> </button>
</div> </div>
<p className={styles.hint}> <p className={styles.hint}>
Account HTTP (生产环境: https://api.szaiai.com) Account HTTP (生产环境: https://rwaapi.szaiai.com)
</p> </p>
</div> </div>
</div> </div>