From 1c2ed90e27670e3a38ee1a99c7cd83a752f8338c Mon Sep 17 00:00:00 2001 From: liujiaqiang <1448951783@qq.com> Date: Wed, 27 Sep 2023 16:56:08 +0800 Subject: [PATCH] =?UTF-8?q?APP=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/Controllers/LoginController.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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 == "律师") {