mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
18 lines
556 B
C#
18 lines
556 B
C#
using detect.gui.Models;
|
|
using detect.gui.Models.Entities;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace detect.gui.Api.Helpers;
|
|
|
|
public class UserHelper
|
|
{
|
|
public static ApiResponse<UserEntity>? Login(string? username, string? password)
|
|
{
|
|
var data = new { Username = username, Password = password };
|
|
var param = JsonConvert.SerializeObject(data, new JsonSerializerSettings
|
|
{
|
|
NullValueHandling = NullValueHandling.Ignore
|
|
});
|
|
return ApiHelper.Post<UserEntity>("/v1/system/user/login", param, false);
|
|
}
|
|
} |