From 4b922549455d5c255ea16b7e4f94797f75c0f99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 4 Aug 2024 14:15:40 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=AE=A2=E6=AD=A3=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/src/sessionConfig.ts | 71 +++++++++++++++++------------------ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/core/src/sessionConfig.ts b/src/core/src/sessionConfig.ts index 272507a1..fdfe988e 100644 --- a/src/core/src/sessionConfig.ts +++ b/src/core/src/sessionConfig.ts @@ -34,42 +34,42 @@ export interface WrapperSessionInitConfig { account_path: string // 可以通过NodeQQNTWrapperUtil().getNTUserDataInfoConfig()获取 } clientVer: string // 9.9.8-22355 - a2: '', - d2: '', - d2Key: '', - machineId: '', - platform: 3, // 3是Windows? + a2: string, + d2: string, + d2Key: string, + machineId: string, + platform: PlatformType, // 3是Windows? platVer: string, // 系统版本号, 应该可以固定 appid: string, rdeliveryConfig: { - appKey: '', - systemId: 0, - appId: '', - logicEnvironment: '', - platform: 3, - language: '', - sdkVersion: '', - userId: '', - appVersion: '', - osVersion: '', - bundleId: '', - serverUrl: '', - fixedAfterHitKeys: [''] + appKey: string, + systemId: number, + appId: string, + logicEnvironment: string, + platform: PlatformType, + language: string, + sdkVersion: string, + userId: string, + appVersion: string, + osVersion: string, + bundleId: string, + serverUrl: string, + fixedAfterHitKeys: string[] } - 'defaultFileDownloadPath': string, // 这个可以通过环境变量获取? - 'deviceInfo': { - 'guid': string, - 'buildVer': string, - 'localId': 2052, - 'devName': string, - 'devType': string, - 'vendorName': '', - 'osVer': string, - 'vendorOsName': string, - 'setMute': false, - 'vendorType': 0 + defaultFileDownloadPath: string, // 这个可以通过环境变量获取? + deviceInfo: { + guid: string, + buildVer: string, + localId: number, + devName: string, + devType: string, + vendorName: string, + osVer: string, + vendorOsName: string, + setMute: boolean, + vendorType: VendorType }, - 'deviceConfig': '{"appearance":{"isSplitViewMode":true},"msg":{}}' + deviceConfig: '{"appearance":{"isSplitViewMode":true},"msg":{}}' } export const sessionConfig: WrapperSessionInitConfig | any = {}; @@ -92,7 +92,7 @@ export async function genSessionConfig(selfUin: string, selfUid: string, account d2: '', d2Key: '', machineId: '', - platform: 3, // 3是Windows? + platform: PlatformType.KWINDOWS, // 3是Windows? platVer: systemVersion, // 系统版本号, 应该可以固定 appid: QQVersionAppid, rdeliveryConfig: { @@ -100,7 +100,7 @@ export async function genSessionConfig(selfUin: string, selfUid: string, account systemId: 0, appId: '', logicEnvironment: '', - platform: 3, + platform: PlatformType.KWINDOWS, language: '', sdkVersion: '', userId: '', @@ -121,11 +121,10 @@ export async function genSessionConfig(selfUin: string, selfUid: string, account osVer: systemVersion, vendorOsName: systemName, setMute: false, - vendorType: 0 + vendorType: VendorType.KNOSETONIOS }, - 'deviceConfig': '{"appearance":{"isSplitViewMode":true},"msg":{}}' + deviceConfig: '{"appearance":{"isSplitViewMode":true},"msg":{}}' }; Object.assign(sessionConfig, config); - // log(sessionConfig); return config; }