fix(framework): player_login.version 改为数字 versionCode(联调登录成功)
真机联调发现:协议 version 字段=数字 versionCode(源码 8 处 data.version=GameData.versionCode), 框架原发字符串 '1.1' 被服务器版本校验拒绝(kick_server 检查到新版本)。改为数字后登录成功 (state:0 playerid:430511)。 - ChannelIdentity/LoginRequestData.version: string→number,去掉冗余 versionCode 与未发送的 '1.1' 串 - query-string version 解析为数字;测试 fixture 同步 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,7 @@ export interface ChannelIdentity {
|
||||
channelid: string | number;
|
||||
gameid: string;
|
||||
marketid: string | number;
|
||||
version: string; // 旧 GameData.Version
|
||||
versionCode: number; // 旧 GameData.versionCode
|
||||
version: number; // 协议 player_login.version 字段 = 数字 versionCode(非 "1.1" 显示串,逐字对齐源码 data.version=GameData.versionCode)
|
||||
}
|
||||
|
||||
/** 身份来源:返回部分字段覆盖。 */
|
||||
|
||||
@@ -9,6 +9,5 @@ export const BUILD_IDENTITY: ChannelIdentity = {
|
||||
channelid: 'FtJf073aa0d6rI1xD8J1Y42fINTm0ziK',
|
||||
gameid: 'jzWe0kzmN0tAcZ5MLks3rFWcxNecogyu',
|
||||
marketid: 4,
|
||||
version: '1.1',
|
||||
versionCode: 10000,
|
||||
version: 10000, // 数字 versionCode(联调时改成本地服要求的版本号)
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ export function queryStringSource(search: string): IdentitySource {
|
||||
const agentid = q.get('agentid'); if (agentid) out.agentid = agentid;
|
||||
const channelid = q.get('channelid'); if (channelid) out.channelid = channelid;
|
||||
const marketid = q.get('marketid'); if (marketid) out.marketid = marketid;
|
||||
const version = q.get('version'); if (version) out.version = version;
|
||||
const version = q.get('version'); if (version) out.version = Number(version); // 协议 version 为数字
|
||||
return out;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface LoginRequestData {
|
||||
province: string;
|
||||
city: string;
|
||||
unionid: string | number;
|
||||
version: string;
|
||||
version: number; // 数字 versionCode(源码 data.version=GameData.versionCode)
|
||||
channelid: number | string;
|
||||
marketid: number | string;
|
||||
[extra: string]: unknown; // location/ip/machineid/telphone 等由 Send_login 注入,见 docs/protocol/01 §6
|
||||
|
||||
Reference in New Issue
Block a user