diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index 29c0479..4f2d6a4 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -573,19 +573,16 @@ namespace Home.Controllers Func> process = async (data) => { var notifyOrder = data.FromJsonTo(); - LogHelper.Info("TaoBao process"); if (notifyOrder == null || notifyOrder.Tid.NotHas()) return false; if (m_ScoreService.ExistTaoBaoScore(notifyOrder.Tid)) return true; - - var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.ReceiverPhone : notifyOrder.ReceiverMobile; - if (phone.NotHas()) return false; - - var userEntity = await m_UserService.Query(m => m.Phone == phone).FirstOrDefaultAsync(); - + // var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.ReceiverPhone : notifyOrder.ReceiverMobile; + // if (phone.NotHas()) return false; + var userEntity = await m_UserService.Query(m => m.TaoBao == notifyOrder.BuyerNick).FirstOrDefaultAsync(); + var phone = notifyOrder.BuyerNick; if (userEntity == null) { diff --git a/Host/Views.Mobile/User/Login.cshtml b/Host/Views.Mobile/User/Login.cshtml index 5d5b672..d41df96 100644 --- a/Host/Views.Mobile/User/Login.cshtml +++ b/Host/Views.Mobile/User/Login.cshtml @@ -19,7 +19,7 @@
-

+

diff --git a/Host/Views/Home/Index.cshtml b/Host/Views/Home/Index.cshtml index 8ead76a..dfca37e 100644 --- a/Host/Views/Home/Index.cshtml +++ b/Host/Views/Home/Index.cshtml @@ -211,7 +211,7 @@
- +
diff --git a/Host/Views/Shared/_Layout.cshtml b/Host/Views/Shared/_Layout.cshtml index 58e745a..33e2a2c 100644 --- a/Host/Views/Shared/_Layout.cshtml +++ b/Host/Views/Shared/_Layout.cshtml @@ -316,7 +316,7 @@
- +
diff --git a/Host/Views/User/Index.cshtml b/Host/Views/User/Index.cshtml index 3af9d90..d9c419c 100644 --- a/Host/Views/User/Index.cshtml +++ b/Host/Views/User/Index.cshtml @@ -245,6 +245,9 @@
+
+ +
@@ -547,12 +550,17 @@ function realname(){ let id_code = $('#real-name-code').val(), - name = $('#real-name-name').val(); + name = $('#real-name-name').val(), + phone = $('#real-name-phone').val(); if(id_code.length <= 0){ alert("抱歉!请重新输入身份证号!"); return; } + if(phone.length != 11){ + alert("抱歉!请重新输入手机号!"); + return; + } if(name.length <= 0){ alert("抱歉!请重新输入姓名!"); return; @@ -568,7 +576,8 @@ let data = { cookie:document.cookie, id_code: id_code, - name: name + name: name, + phone: phone } diff --git a/Services/Hncore.Pass.BaseInfo/Service/UserService.cs b/Services/Hncore.Pass.BaseInfo/Service/UserService.cs index 99035e4..91a0db2 100644 --- a/Services/Hncore.Pass.BaseInfo/Service/UserService.cs +++ b/Services/Hncore.Pass.BaseInfo/Service/UserService.cs @@ -113,7 +113,7 @@ namespace Hncore.Pass.BaseInfo.Service { BusinessException.Throw("用户名或者密码为空"); } - var userInfo = await this.Query(m => m.LoginCode == request.Logincode && m.Password == HashPassword(request.Password)).FirstOrDefaultAsync(); + var userInfo = await this.Query(m => (m.LoginCode == request.Logincode && m.Password == HashPassword(request.Password))||(m.TaoBao == request.Logincode && m.Password == HashPassword(request.Password))).FirstOrDefaultAsync(); if (userInfo == null) { BusinessException.Throw("用户名或者密码不正确"); @@ -201,7 +201,7 @@ namespace Hncore.Pass.BaseInfo.Service return new ApiResult(ResultCode.C_LONGIN_NAME_ERROR, "账号或者手机号为空"); } - if (this.Exist(m => m.LoginCode == entity.LoginCode || m.Phone == entity.Phone)) + if (this.Exist(m => m.LoginCode == entity.LoginCode || m.Phone == entity.Phone || m.TaoBao == entity.Phone)) { return new ApiResult(ResultCode.C_ALREADY_EXISTS_ERROR, "该账号或者手机号被注册了"); }