protected override void Init() { #if UNITY_IPHONE && !UNITY_EDITOR send = new SendSMSIOS(); #elif UNITY_ANDROID && !UNITY_EDITOR send = new SendSMSAndroid(); #else send = new SendSMSEditor(); #endif }
/// <summary> /// 发送短信 /// </summary> /// <param name="mobiles">手机号码</param> /// <param name="content">内容</param> /// <returns>发送结果:0-成功;其他-错误信息</returns> public static string SendMessage(string mobiles, string content) { MyConfig = GetConfig(); if (MyConfig != null) { ISendSMS iSend = (ISendSMS)MyConfig.TheClass; iSend.Config = MyConfig.ConfigString; return(iSend.Send(mobiles, content)); } else { return("无法加载短信网关配置信息,请检查sms.config配置文件是否正确。"); } }
public AccountController(UserManager <ApplictionUser> userManger, SignInManager <ApplictionUser> signInManager, ILogger <AccountController> logger, GoogleReCAPTCHAService googleReCAPTCHAService, IEmailSender emailSender, ISendSMS sendSMS) { this.userManger = userManger; this.signInManager = signInManager; this.logger = logger; this.googleReCAPTCHAService = googleReCAPTCHAService; this.emailSender = emailSender; this.sendSMS = sendSMS; }