34 lines
803 B
C#
34 lines
803 B
C#
using ChouBox.Code.Other;
|
|
|
|
using HuanMeng.DotNetCore.AttributeExtend;
|
|
using HuanMeng.DotNetCore.Base;
|
|
using HuanMeng.DotNetCore.Extensions;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace ChouBox.WebApi.Controllers;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="serviceProvider"></param>
|
|
[Route("api/v2/[controller]")]
|
|
[ApiController]
|
|
public class AccountController(IServiceProvider serviceProvider) : ControllerBase
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
/// 发送验证码
|
|
/// </summary>
|
|
/// <param name="phone"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("sendSms")]
|
|
public async Task<string> SendPhoneAsync([FromForm]string phone)
|
|
{
|
|
SMSBLL sms = new SMSBLL(serviceProvider);
|
|
return await sms.SendPhoneAsync(phone);
|
|
}
|
|
}
|