From 1b00e505b7e63fb00c232cab5a60c4f9cae8134c Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Sat, 30 Aug 2025 18:02:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=97=B6=E6=9C=AA=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/FuwuhaoService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FuwuhaoService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FuwuhaoService.cs index f47eb872..c58c38dc 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FuwuhaoService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FuwuhaoService.cs @@ -140,6 +140,11 @@ public class FuwuhaoService : ApplicationService [HttpPost("fuwuhao/qrcode")] public async Task GetQrCodeAsync([FromQuery] SceneTypeEnum sceneType) { + if (sceneType == SceneTypeEnum.Bind && CurrentUser.Id is null) + { + throw new UserFriendlyException("绑定微信,需登录用户,请重新登录后重试"); + } + //生成一个随机场景值 var scene = Guid.NewGuid().ToString("N"); var qrCodeUrl = await _fuwuhaoManager.CreateQrCodeAsync(scene);