Skip to content

Commit

Permalink
fix: 部分 API 随机种子处理异常
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyJan committed Jul 2, 2024
1 parent d17db7a commit ee99d58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions model/kuroApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
}

/**
Expand Down Expand Up @@ -384,15 +384,15 @@ 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)
}

/**
* 从插件服务器获取库街区登录通信 token
* @returns {JSON|string} code=0 时接口返回的原始 json 或者报错信息
*/
async getPluginServerKuroBbsLoginAuth() {
return this.getData('getPluginServerKuroBbsLoginAuth', '1', {})
return this.getData('getPluginServerKuroBbsLoginAuth', '114514', {})
}

/**
Expand All @@ -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)
}
}
1 change: 1 addition & 0 deletions model/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ee99d58

Please sign in to comment.