|
@@ -58,6 +58,29 @@ namespace MySystem
|
|
|
return AlibabaCloud.TeaUtil.Common.ToJSONString(response.Body.ToMap());
|
|
|
}
|
|
|
|
|
|
+ public static string PushForIos(string Account, string Title, string Body)
|
|
|
+ {
|
|
|
+ AlibabaCloud.SDK.Push20160801.Client client = CreateClient();
|
|
|
+ AlibabaCloud.SDK.Push20160801.Models.PushRequest request = new AlibabaCloud.SDK.Push20160801.Models.PushRequest
|
|
|
+ {
|
|
|
+ AppKey = 333673916,
|
|
|
+ PushType = "NOTICE",
|
|
|
+ DeviceType = "iOS",
|
|
|
+ StoreOffline = true,
|
|
|
+ IOSRemind = true,
|
|
|
+ Target = "ACCOUNT",
|
|
|
+ TargetValue = Account,
|
|
|
+ Title = Title,
|
|
|
+ Body = Body,
|
|
|
+ IOSRemindBody = Body,
|
|
|
+ IOSMutableContent = true,
|
|
|
+ IOSMusic = "pushSound.mp3",
|
|
|
+ IOSApnsEnv = Library.ConfigurationManager.EnvironmentFlag == 2 ? "DEV" : "PRODUCTION",
|
|
|
+ IOSExtParameters = "{\"Url\":\"welcome-test\"}",
|
|
|
+ };
|
|
|
+ AlibabaCloud.SDK.Push20160801.Models.PushResponse response = client.Push(request);
|
|
|
+ return AlibabaCloud.TeaUtil.Common.ToJSONString(response.Body.ToMap());
|
|
|
+ }
|
|
|
|
|
|
public static string IosPush(string Account, string Title, string Body)
|
|
|
{
|
|
@@ -70,6 +93,7 @@ namespace MySystem
|
|
|
Title = Title,
|
|
|
Body = Body,
|
|
|
ApnsEnv = Library.ConfigurationManager.EnvironmentFlag == 2 ? "DEV" : "PRODUCTION",
|
|
|
+
|
|
|
};
|
|
|
AlibabaCloud.SDK.Push20160801.Models.PushNoticeToiOSResponse response = client.PushNoticeToiOS(request);
|
|
|
return AlibabaCloud.TeaUtil.Common.ToJSONString(response.Body.ToMap());
|