Exemplo n.º 1
0
    private static List <string> GetSmsAudio(string eventId)
    {
        eventId = eventId.Replace(".json", "");

        List <string> list = new List <string>();

        FileInfo fileInfo = new FileInfo(I18NDataPath + "/Sms/" + eventId + ".json");

        if (fileInfo.Exists == false)
        {
            Debug.LogError("短信json文件不存在=====ID:" + eventId);
        }
        else
        {
            string text = FileUtil.ReadFileText(fileInfo.FullName);
            SmsVo  vo   = JsonConvert.DeserializeObject <SmsVo>(text);
            if (vo.Event != null)
            {
                list.AddRange(GetEventAudio(vo.Event));
            }
        }

        return(list);
    }
 public static void SendSms(SmsVo smsVo, Action <IRestResponse <ResultSrv <ServiceCallResultSrv <ResponseSrv <SmsSrv> > > > > callback)
 {
     PrepareRestClient(ServiceCallProducts.SendSms, smsVo, Method.POST, out var client, out var request);
     callback(client.Execute <ResultSrv <ServiceCallResultSrv <ResponseSrv <SmsSrv> > > >(request));
 }