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