提交 4fc472fc 编写于 作者: Richard__Hu's avatar Richard__Hu

适配登录方式传送机制

上级 417dc64f
......@@ -72,6 +72,10 @@ namespace CommonLibrary
/// </summary>
public static string PasswordText { get { return "Password"; } }
/// <summary>
/// 用于存储和传送的名称
/// </summary>
public static string LoginWayText { get { return "LoginWay"; } }
/// <summary>
/// 深度拷贝当前的账户信息
/// </summary>
/// <typeparam name="T">返回的类型,应该为继承后的类型</typeparam>
......
......@@ -147,7 +147,8 @@ namespace 软件系统客户端Wpf
JObject json = new JObject
{
{ UserAccount.UserNameText, new JValue(UserName) },
{ UserAccount.PasswordText, new JValue(UserPassword) }
{ UserAccount.PasswordText, new JValue(UserPassword) },
{ UserAccount.LoginWayText, new JValue("wpf") }
};
result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.账户检查, json.ToString());
if (result.IsSuccess)
......
......@@ -209,8 +209,9 @@ namespace 软件系统客户端模版
//包装数据
JObject json = new JObject
{
{ UserAccount.UserNameText, new Newtonsoft.Json.Linq.JValue(textBox_userName.Text) },
{ UserAccount.PasswordText, new Newtonsoft.Json.Linq.JValue(textBox_password.Text) }
{ UserAccount.UserNameText, new JValue(textBox_userName.Text) },
{ UserAccount.PasswordText, new JValue(textBox_password.Text) },
{ UserAccount.LoginWayText, new JValue("winform") }
};
result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.账户检查, json.ToString());
if (result.IsSuccess)
......
......@@ -496,8 +496,9 @@ namespace 软件系统服务端模版
//提取账户,密码
string name = SoftBasic.GetValueFromJsonObject(json, UserAccount.UserNameText, "");
string password = SoftBasic.GetValueFromJsonObject(json, UserAccount.PasswordText, "");
string way = SoftBasic.GetValueFromJsonObject(json, UserAccount.LoginWayText, "winform");
UserAccount account = UserServer.ServerAccounts.CheckAccount(name, password, state.GetRemoteEndPoint().Address.ToString());
UserAccount account = UserServer.ServerAccounts.CheckAccount(name, password, state.GetRemoteEndPoint().Address.ToString(), way);
//检测是否重复登录
if(account.LoginEnable)
{
......
......@@ -58,7 +58,8 @@ namespace 软件系统浏览器模版.Controllers
JObject json = new JObject
{
{ UserAccount.UserNameText, new JValue(fc["UserName"]) },
{ UserAccount.PasswordText, new JValue(fc["UserPassword"]) }
{ UserAccount.PasswordText, new JValue(fc["UserPassword"]) },
{ UserAccount.LoginWayText, new JValue("webApp") }
};
result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.账户检查, json.ToString());
if (result.IsSuccess)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册