fix: 修复绑定微信二维码生成时未登录用户的异常提示
This commit is contained in:
@@ -140,6 +140,11 @@ public class FuwuhaoService : ApplicationService
|
||||
[HttpPost("fuwuhao/qrcode")]
|
||||
public async Task<QrCodeOutput> 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);
|
||||
|
||||
Reference in New Issue
Block a user