1234567891011121314151617181920212223242526 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Bowin.Common;
- using Bowin.Common.Cache;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- namespace YLShipBuildLandMap.Web.Controllers.SystemSetting
- {
- [Route("api/[controller]")]
- [ApiController]
- public class VerCodeController : ControllerBase
- {
- [HttpGet]
- public ActionResult Get(string key)
- {
- var code = VerifyCodeHelper.GetCode(4);
- CacheHelper.Add(key, code.Code, DateTime.Now.AddMinutes(5));
- return Content("data:image/png;base64," + code.CodeBase64);
- }
- }
- }
|