Skip to content

Commit

Permalink
[增加]1. 增加接口地址的变化兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Feb 5, 2025
1 parent 2cb31df commit 0cbe80a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Assets/Hotfix/UI/Logic/UILogin/UILogin.Logic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private async void Login()
};
req.Platform = PathHelper.GetPlatformName;

var respLogin = await GameApp.Web.Post<RespLogin>($"http://127.0.0.1:28080/game/api/{nameof(ReqLogin)}", req);
var respLogin = await GameApp.Web.Post<RespLogin>($"http://127.0.0.1:28080/game/api/{nameof(ReqLogin).ConvertToSnakeCase()}", req);
if (respLogin.ErrorCode > 0)
{
Log.Error("登录失败,错误信息:" + respLogin.ErrorCode);
Expand All @@ -68,7 +68,7 @@ private async void Login()
ReqPlayerList reqPlayerList = new ReqPlayerList();

reqPlayerList.Id = respLogin.Id;
var respPlayerList = await GameApp.Web.Post<RespPlayerList>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerList)}", reqPlayerList);
var respPlayerList = await GameApp.Web.Post<RespPlayerList>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerList).ConvertToSnakeCase()}", reqPlayerList);
if (respPlayerList.ErrorCode > 0)
{
Log.Error("登录失败,错误信息:" + respPlayerList.ErrorCode);
Expand Down
4 changes: 2 additions & 2 deletions Assets/Hotfix/UI/Logic/UILogin/UIPlayerCreate.Logic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private async void OnCreateButtonClick()

#region 创建角色

var respPlayerCreate = await GameApp.Web.Post<RespPlayerCreate>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerCreate)}", req);
var respPlayerCreate = await GameApp.Web.Post<RespPlayerCreate>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerCreate).ConvertToSnakeCase()}", req);

if (respPlayerCreate.ErrorCode > 0)
{
Expand All @@ -60,7 +60,7 @@ private async void OnCreateButtonClick()
ReqPlayerList reqPlayerList = new ReqPlayerList();

reqPlayerList.Id = req.Id;
var respPlayerList = await GameApp.Web.Post<RespPlayerList>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerList)}", reqPlayerList);
var respPlayerList = await GameApp.Web.Post<RespPlayerList>($"http://127.0.0.1:28080/game/api/{nameof(ReqPlayerList).ConvertToSnakeCase()}", reqPlayerList);

if (respPlayerList.ErrorCode > 0)
{
Expand Down

0 comments on commit 0cbe80a

Please sign in to comment.