QRCoder
<img src="/Controller/GetImg"/>
public ActionResult GetImg() { string authorizeUrl=""; string authorizeCode = Guid.NewGuid().ToString(); //生成二維碼 string url = $"{authorizeUrl}?authorizeCode={authorizeCode}"; QRCodeGenerator qrGenerator = new QRCoder.QRCodeGenerator(); QRCodeData qrCodeData = qrGenerator.CreateQrCode(url, QRCodeGenerator.ECCLevel.Q); QRCode qrcode = new QRCode(qrCodeData); Bitmap qrCodeImage = qrcode.GetGraphic(5, Color.Black, Color.White, null, 15, 6, false); MemoryStream ms = new MemoryStream(); qrCodeImage.Save(ms, ImageFormat.Jpeg); return File(ms.ToArray(), "image/jpeg"); }
angular-cli server - how to proxy API requests to another server?
C# 生成二維碼 QRCoderhtml