From 619bc9d3a38a9ee4ea968315f5fc022573e6926e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Wed, 31 Jan 2024 22:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=94=20=E5=AE=8C=E5=96=84UID=E4=B8=8E?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=9A=84=E5=AF=B9=E5=BA=94=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #90 --- src/web/utils/tools.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/web/utils/tools.ts b/src/web/utils/tools.ts index 450f017e..6a76cf60 100644 --- a/src/web/utils/tools.ts +++ b/src/web/utils/tools.ts @@ -1,7 +1,7 @@ /** * @file web utils tools.ts * @description 应用用到的工具函数 - * @since Beta v0.3.3 + * @since Beta v0.4.3 */ import TGConstant from "../constant/TGConstant"; @@ -57,11 +57,13 @@ export function transParams(obj: Record): string { /** * @description 根据 uid 获取 server - * @since Alpha v0.2.0 + * @since Beta v0.4.3 * @param {string} uid uid * @returns {string} server */ export function getServerByUid(uid: string): string { + // 若长度为 10,则为国际服亚服 + if (uid.length === 10) return TGConstant.Server.OS_ASIA; // 获取第一个字符 const first = uid[0]; // 1-4 为国服-天空岛