1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using GxPress.Common.Tools;
- using GxPress.Result.About;
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Mvc;
- namespace GxPress.Api.AppControllers
- {
- /// <summary>
- /// app
- /// </summary>
- [Route("api/app/about")]
- [ApiController]
- [Authorize]
- public class AboutController : ControllerBase
- {
- /// <summary>
- /// 关于 对付对付
- /// </summary>
- /// <returns></returns>
- [HttpGet("info")]
- public AboutResult About()
- {
- var addressUrlDownload = ConfigHelper.GetValue("ServiceAddress:AddressUrlDownload");
- var aboutResult = new AboutResult
- {
- AboutUrl = StringUtils.AddDomain("/static/aboutus.html"),
- DownloadUrl = StringUtils.AddDomain($"{addressUrlDownload}/d")
- };
- return aboutResult;
- }
- [HttpGet("register")]
- [AllowAnonymous]
- public bool IsRegister()
- {
- var isRegisterValue = ConfigHelper.GetValue("ServiceAddress:IsRegister");
- if (bool.TryParse(isRegisterValue, out bool isRegister))
- return isRegister;
- return false;
- }
- }
- }
|