diff --git a/24Hour/Controllers/LoginController.cs b/24Hour/Controllers/LoginController.cs index febc76c..450baf9 100644 --- a/24Hour/Controllers/LoginController.cs +++ b/24Hour/Controllers/LoginController.cs @@ -427,13 +427,21 @@ namespace _24Hour.Controllers { try { - if (string.IsNullOrEmpty(UserModel.wechatId) && await _db.Queryable().AnyAsync(x => x.wechatId == UserModel.wechatId && x.IsDeleted == 0)) - { - ret.IsSucceed = false; - ret.Message = "当前微信已与其他账号绑定"; - return ret; + //if (string.IsNullOrEmpty(UserModel.wechatId) && await _db.Queryable().AnyAsync(x => x.wechatId == UserModel.wechatId && x.IsDeleted == 0)) + //{ + // ret.IsSucceed = false; + // ret.Message = "当前微信已与其他账号绑定"; + // return ret; + //} + if (string.IsNullOrEmpty(UserModel.wechatId) == false) + { + if (await _db.Queryable().AnyAsync(x => x.wechatId == UserModel.wechatId && x.IsDeleted == 0)) + { + ret.IsSucceed = false; + ret.Message = "当前微信已与其他账号绑定"; + return ret; + } } - var data = await _db.Queryable().Where(q => q.phone == UserModel.phone && q.IsDeleted == 0).FirstAsync(); if (UserModel.identity == "律师") {