From ee99d58c19dbebb3fdd186139b0608ad73890035 Mon Sep 17 00:00:00 2001 From: TomyJan Date: Tue, 2 Jul 2024 22:11:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=20API=20=E9=9A=8F?= =?UTF-8?q?=E6=9C=BA=E7=A7=8D=E5=AD=90=E5=A4=84=E7=90=86=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/kuroApi.js | 10 +++++----- model/utils.js | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/model/kuroApi.js b/model/kuroApi.js index bead189..c306fde 100644 --- a/model/kuroApi.js +++ b/model/kuroApi.js @@ -44,7 +44,7 @@ export default class kuroApi { 'getPluginServerKuroBbsLoginToken', ].includes(ApiName) ) { - rsp = await this.kuroApiHandler.getApiRsp(ApiName, '1', null, data) + rsp = await this.kuroApiHandler.getApiRsp(ApiName, '114514', null, data) } else if (ApiName == 'checkToken_mineV2') { ApiName = 'mineV2' rsp = await this.kuroApiHandler.getApiRsp( @@ -169,7 +169,7 @@ export default class kuroApi { * @returns {JSON|string} code=200 时接口返回的原始 json 或者报错信息 */ async sdkLogin(data) { - return this.getData('sdkLogin', '1', data) + return this.getData('sdkLogin', '114514', data) } /** @@ -384,7 +384,7 @@ export default class kuroApi { * @returns {JSON|string} code=0 时接口返回的原始 json 或者报错信息 */ async mcGachaRecord(data) { - return this.getData('mcGachaRecord', '1', data) + return this.getData('mcGachaRecord', '114514', data) } /** @@ -392,7 +392,7 @@ export default class kuroApi { * @returns {JSON|string} code=0 时接口返回的原始 json 或者报错信息 */ async getPluginServerKuroBbsLoginAuth() { - return this.getData('getPluginServerKuroBbsLoginAuth', '1', {}) + return this.getData('getPluginServerKuroBbsLoginAuth', '114514', {}) } /** @@ -401,6 +401,6 @@ export default class kuroApi { * @returns {JSON|string} code=0 时接口返回的原始 json 或者报错信息 */ async getPluginServerKuroBbsLoginToken(data) { - return this.getData('getPluginServerKuroBbsLoginToken', '1', data) + return this.getData('getPluginServerKuroBbsLoginToken', '114514', data) } } diff --git a/model/utils.js b/model/utils.js index ac3bccd..f0f19a1 100644 --- a/model/utils.js +++ b/model/utils.js @@ -82,6 +82,7 @@ export function generateFixedString(inputString, length = 40) { kuroLogger.warn('生成固定字符串输入为空, 使用默认值 1') inputString = '1' } + inputString = inputString.toString() if (length > 64) { length = 64 kuroLogger.warn(