修改问题
This commit is contained in:
parent
314aefbdc9
commit
79b8822acc
|
|
@ -71,7 +71,7 @@ public class AccountController : CloudGamingControllerBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
/// 实名认证接口(需要登录)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
|
|
@ -83,9 +83,9 @@ public class AccountController : CloudGamingControllerBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资产收入、支出
|
||||
/// 资产收入、支出(需要登录)
|
||||
/// </summary>
|
||||
/// <param name="consumeType">0支出,收入</param>
|
||||
/// <param name="consumeType">0支出,1收入</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Authorize]
|
||||
|
|
@ -96,11 +96,12 @@ public class AccountController : CloudGamingControllerBase
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户昵称
|
||||
/// 修改用户昵称(需要登录)
|
||||
/// </summary>
|
||||
/// <param name="accountNickNameRequest"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public async Task<BaseResponse<bool>> UpdateUserNickName([FromBody] AccountNickNameRequest accountNickNameRequest)
|
||||
{
|
||||
AccountBLL account = new AccountBLL(ServiceProvider);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ namespace CloudGaming.Code.Account
|
|||
/// <returns></returns>
|
||||
public static IUserAccount? GetUserAccount(string jsonString, CloudGamingBase cloudGamingBase)
|
||||
{
|
||||
var jwt = cloudGamingBase.HttpContextAccessor.HttpContext.Request.Headers.GetAuthorization();
|
||||
if (!string.IsNullOrEmpty(jwt))
|
||||
{
|
||||
IUserAccount authorizationUserLogin = new AuthorizationUserLogin(jwt, cloudGamingBase);
|
||||
return authorizationUserLogin;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jsonString))
|
||||
{
|
||||
JObject jsonObject = JObject.Parse(jsonString);
|
||||
|
|
@ -45,12 +51,7 @@ namespace CloudGaming.Code.Account
|
|||
return phoneUserLogin;
|
||||
} //检测是否还有jwt登录
|
||||
}
|
||||
var jwt = cloudGamingBase.HttpContextAccessor.HttpContext.Request.Headers.GetAuthorization();
|
||||
if (!string.IsNullOrEmpty(jwt))
|
||||
{
|
||||
IUserAccount authorizationUserLogin = new AuthorizationUserLogin(jwt, cloudGamingBase);
|
||||
return authorizationUserLogin;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,15 +84,12 @@ public class SignMiddleware
|
|||
|
||||
private static string GetSignError(HttpContext context)
|
||||
{
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
};
|
||||
|
||||
// 返回 500 错误
|
||||
context.Response.StatusCode = 200;
|
||||
BaseResponse<object> baseResponse = new BaseResponse<object>(ResonseCode.SignError, "sign加密验证失败", null)
|
||||
{ };
|
||||
var json = JsonConvert.SerializeObject(baseResponse, settings);
|
||||
var json = baseResponse.ToString();
|
||||
return json;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class SevenDayDto
|
|||
/// <summary>
|
||||
/// 每日签到信息列表
|
||||
/// </summary>
|
||||
public List<SevenDay> List = new List<SevenDay>();
|
||||
public List<SevenDay> List { get; set; } = new List<SevenDay>();
|
||||
/// <summary>
|
||||
/// 今天是否签到
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace CloudGaming.Model.DbSqlServer.Db_Phone;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user