From a04f96c17174ff0e937a5125319b818102845a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Thu, 18 Dec 2025 12:04:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(http):=20=E6=89=A9=E5=B1=95HTTP=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4=E6=94=AF=E6=8C=81=E5=B8=83=E5=B0=94=E5=80=BC?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改HttpParamsGet、HttpParamsPost和HttpParamsUpload接口中的headers类型 - 更新HttpHelperX类中getHeaders方法的参数类型 - 调整SentryDataResult构造函数及sendToSentry函数的headers类型声明 - 在getHeaders工具函数中新增crossTag请求头字段 - 优化GlobalValue类中userIds属性的空值处理逻辑 - 新增crossTag属性用于判断多环境用户标识状态 - 添加StorageKeys.CrossTag常量定义 - 开启getSignAutoInfo接口的日志显示功能 - 初始化用户ID时清除旧版存储数据 --- src/main/ets/http/HttpHelperX.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/ets/http/HttpHelperX.ts b/src/main/ets/http/HttpHelperX.ts index e3e354d..82fc6dd 100644 --- a/src/main/ets/http/HttpHelperX.ts +++ b/src/main/ets/http/HttpHelperX.ts @@ -4,14 +4,14 @@ import { http } from '@kit.NetworkKit'; export interface HttpParamsGet { url: string query?: Record | Object - headers?: Record + headers?: Record } export interface HttpParamsPost { url: string data?: string | Object | ArrayBuffer query?: Record | Object - headers?: Record + headers?: Record } export interface HttpParamsUpload { @@ -26,7 +26,7 @@ export interface HttpParamsForm { url: string data?: Record | Object | undefined query?: Record | Object - headers?: Record + headers?: Record } export class HttpHelperX { @@ -36,7 +36,7 @@ export class HttpHelperX { * @param headers * @returns */ - static getHeaders(ct: string, headers?: Record) { + static getHeaders(ct: string, headers?: Record) { return { "Content-Type": ct, // "Accept": "application/json",