feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口
补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。 Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import { ApiResponse } from './types.uts';
|
||||
import { getCurrentLocale } from './locale.uts';
|
||||
|
||||
let currentBaseUrl: string = 'http://127.0.0.1:9000';
|
||||
// #ifdef H5
|
||||
@@ -161,6 +162,13 @@ export function request<T>(config: RequestConfig): Promise<T> {
|
||||
headers['x-tenant-id'] = tenantId;
|
||||
}
|
||||
|
||||
// 自动挂载客户端当前 Locale
|
||||
const currentLocale = getCurrentLocale();
|
||||
if (currentLocale) {
|
||||
headers['Accept-Language'] = currentLocale;
|
||||
headers['x-locale'] = currentLocale;
|
||||
}
|
||||
|
||||
// 显式传入的 header 具有更高优先级
|
||||
if (config.header) {
|
||||
Object.assign(headers, config.header);
|
||||
|
||||
在新工单中引用
屏蔽一个用户