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:
@@ -2,7 +2,7 @@ import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { buildLoginRequest, parseLoginResponse } from '../../YouleNexus/assets/framework/protocol/login.ts';
|
||||
|
||||
const IDENTITY = { agentid: 1, gameid: 2, openid: 'o', nickname: 'n', avatar: 'a', sex: 1, province: 'p', city: 'c', unionid: 'u', version: '1.0', channelid: 7, marketid: 9 };
|
||||
const IDENTITY = { agentid: 1, gameid: 2, openid: 'o', nickname: 'n', avatar: 'a', sex: 1, province: 'p', city: 'c', unionid: 'u', version: 10001, channelid: 7, marketid: 9 };
|
||||
|
||||
test('buildLoginRequest 透传必备身份字段', () => {
|
||||
const d = buildLoginRequest(IDENTITY);
|
||||
|
||||
Reference in New Issue
Block a user