Beispiel #1
0
 /// <summary>
 /// 发送验证码
 /// </summary>
 /// <param name="arg"></param>
 /// <returns></returns>
 public Task <IApiResult> SendSMS(P_SendCode arg)
 {
     return(Task.Run(() =>
     {
         var ar = new IApiResult();
         int SecurityCode = new Random().Next(100000, 999999);
         var message = "Your verification code is:" + SecurityCode;
         if (arg.type == 1)
         {
         }
         else if (arg.type == 2)
         {
         }
         return Common.SMSHelper.Send(arg.phone, message);
     }));
 }
Beispiel #2
0
 public Task <IApiResult> SendCode([FromUri] P_SendCode pars)
 {
     return(ApiAsync(pars, new LoginManager().SendSMS));
     //return VerificationCode.Send(phone);
 }