mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-21 05:25:45 +08:00
♻️ 更新 salt
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* @file web constant TGConstant.ts
|
* @file web constant TGConstant.ts
|
||||||
* @description 常量
|
* @description 常量
|
||||||
* @author BTMuli <bt-muli@outlook.com>
|
* @since Beta v0.3.3
|
||||||
* @since Beta v0.3.0
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { BBS_VERSION, BBS_HEADER_AGENT, BBS_APP_ID } from "./bbs";
|
import { BBS_VERSION, BBS_HEADER_AGENT, BBS_APP_ID, BBS_SALT } from "./bbs";
|
||||||
import SALT from "./salt";
|
|
||||||
import SERVER from "./server";
|
import SERVER from "./server";
|
||||||
import { GAME_BIZ } from "./utils";
|
import { GAME_BIZ } from "./utils";
|
||||||
|
|
||||||
@@ -16,7 +14,7 @@ const TGConstant = {
|
|||||||
USER_AGENT: BBS_HEADER_AGENT,
|
USER_AGENT: BBS_HEADER_AGENT,
|
||||||
APP_ID: BBS_APP_ID,
|
APP_ID: BBS_APP_ID,
|
||||||
},
|
},
|
||||||
Salt: SALT,
|
Salt: BBS_SALT,
|
||||||
Server: SERVER,
|
Server: SERVER,
|
||||||
Utils: {
|
Utils: {
|
||||||
GAME_BIZ,
|
GAME_BIZ,
|
||||||
|
|||||||
@@ -1,10 +1,22 @@
|
|||||||
/**
|
/**
|
||||||
* @file web constant bbs.ts
|
* @file web constant bbs.ts
|
||||||
* @description 常量-应用数据
|
* @description 常量-应用数据
|
||||||
* @author BTMuli <bt-muli@outlook.com>
|
* @since Beta v0.3.3
|
||||||
* @since Beta v0.3.0
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const BBS_VERSION = "2.50.1";
|
export const BBS_VERSION = "2.59.1";
|
||||||
export const BBS_HEADER_AGENT = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) miHoYoBBS/${BBS_VERSION}`;
|
export const BBS_HEADER_AGENT = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) miHoYoBBS/${BBS_VERSION}`;
|
||||||
export const BBS_APP_ID = "bll8iq97cem8";
|
export const BBS_APP_ID = "bll8iq97cem8";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description salt 值
|
||||||
|
* @version 2.59.1
|
||||||
|
* @since Beta v0.3.3
|
||||||
|
*/
|
||||||
|
export const BBS_SALT = {
|
||||||
|
K2: "awFeNNTsLYcK20LSO60Es8CRVZOjCB1b",
|
||||||
|
LK2: "6pNd5NnDnbwKxewrPwEoWlSYwhualS2H",
|
||||||
|
X4: "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
|
||||||
|
X6: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
|
||||||
|
PROD: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file web constant salt.ts
|
|
||||||
* @description 用到的 salt 值
|
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description salt 值
|
|
||||||
* @version 2.50.1
|
|
||||||
* @since Alpha v0.2.0
|
|
||||||
*/
|
|
||||||
const SALT = {
|
|
||||||
BBS: {
|
|
||||||
K2: "A4lPYtN0KGRVwE5M5Fm0DqQiC5VVMVM3",
|
|
||||||
LK2: "kkFiNdhyHqZ1VnDRHnU1podIvO4eiHcs",
|
|
||||||
},
|
|
||||||
Other: {
|
|
||||||
X4: "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
|
|
||||||
X6: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
|
|
||||||
prod: "JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SALT;
|
|
||||||
@@ -10,21 +10,21 @@ import { transCookie, transParams } from "./tools";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取 salt
|
* @description 获取 salt
|
||||||
* @since Beta v0.3.0
|
* @since Beta v0.3.3
|
||||||
* @version 2.50.1
|
* @version 2.59.1
|
||||||
* @param {string} saltType salt 类型
|
* @param {string} saltType salt 类型
|
||||||
* @returns {string} salt
|
* @returns {string} salt
|
||||||
*/
|
*/
|
||||||
function getSalt(saltType: string): string {
|
function getSalt(saltType: string): string {
|
||||||
switch (saltType) {
|
switch (saltType) {
|
||||||
case "common":
|
case "common":
|
||||||
return TGConstant.Salt.Other.X4;
|
return TGConstant.Salt.X4;
|
||||||
case "prod":
|
case "prod":
|
||||||
return TGConstant.Salt.Other.prod;
|
return TGConstant.Salt.PROD;
|
||||||
case "lk2":
|
case "lk2":
|
||||||
return TGConstant.Salt.BBS.LK2;
|
return TGConstant.Salt.LK2;
|
||||||
default:
|
default:
|
||||||
return TGConstant.Salt.Other.X4;
|
return TGConstant.Salt.X4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user