From b55c1e8ccc63a16f3980a86abd4b4fe4d0f8549b Mon Sep 17 00:00:00 2001 From: qiaoxin Date: Fri, 16 Jul 2021 18:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/test/activity.test.ts | 4 ++-- web-server/app/controller/game.ts | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/game-server/test/activity.test.ts b/game-server/test/activity.test.ts index 08ee9e82e..a764d77bd 100644 --- a/game-server/test/activity.test.ts +++ b/game-server/test/activity.test.ts @@ -156,10 +156,10 @@ describe('活动测试', function () { it('大富翁-移动', function (done) { if (activityId) { - requestActivity(pinusClient, 'role.heroHandler.addItem', { id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.SPECIAL_DICE), count: 1 }) + requestActivity(pinusClient, 'role.heroHandler.addItem', { id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.NORMAL_DICE), count: 1 }) .then((data: any) => { checkSuccessResponse(data); - return requestActivity(pinusClient, 'activity.activityMonopolyHandler.move', { activityId: activityId, step: 1 }) + return requestActivity(pinusClient, 'activity.activityMonopolyHandler.move', { activityId: activityId, step: 0 }) }) .then((data: any) => { checkSuccessResponse(data); diff --git a/web-server/app/controller/game.ts b/web-server/app/controller/game.ts index b98940984..a30ee76a8 100644 --- a/web-server/app/controller/game.ts +++ b/web-server/app/controller/game.ts @@ -12,11 +12,12 @@ export default class GameController extends Controller { public async checkVersion() { const { ctx } = this; const { version } = ctx.request.body; - if (version < CLIENT_VERSION) {//版本号太低 - ctx.body = ctx.service.utils.resResult(STATUS.VERSION_ERR, { version: CLIENT_VERSION }); + if (version >= CLIENT_VERSION) { + ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS); return; } - ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS); + //版本号太低 + ctx.body = ctx.service.utils.resResult(STATUS.VERSION_ERR, { version: CLIENT_VERSION }); return; }