Commit 7161e91e authored by 席世权's avatar 席世权

合并冲突

parents 51abdfb0 7e281ce4
......@@ -92,7 +92,7 @@ namespace PushInfo.Core.BLL
{
var valueType = item.Value.GetType();
if (valueType == typeof(string))
param.AppendFormat("S.{0}=\"{1}\";", item.Key, item.Value);
param.AppendFormat("S.{0}=\"{1}\";", item.Key, item.Value.ToString().Contains("\"") ? item.Value.ToString().Replace("\"", "\\\"") : item.Value);
else if (IsNumericType(item.Value))
param.AppendFormat("i.{0}={1};", item.Key, item.Value);
}
......
......@@ -28,11 +28,11 @@ namespace PushTest
static void Main(string[] args)
{
var message = new JiguangPushMessage("298ec6f7cdcdee87a3faf64b", "36dd48a9028eeb4471acec46");
var resylt = message.SendPush(new Jiguang.JPush.Model.Audience { RegistrationId = new List<string> { "13065ffa4efe527f388" } }, // android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
"我的头痛日记", "您的头痛时间已持续72小时,请确认是否已结束?点击确认>>",
"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;",
//"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;S.key1=\"哈哈\";i.key2=2;end",
new Dictionary<string, object> { { "project_id", "9bfc78a8-6d2e-47b9-94cb-c3f40dfd9dc7" } },true);
message.SendPush(new Jiguang.JPush.Model.Audience { RegistrationId = new List<string> { "1a0018970a578514295" } }, // android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
"上海保供物资管理意见1700", "备用手机号避免因注册1700",
//"intent:#Intent;action=android.intent.action.MAIN;end", // 首页
"intent:#Intent;action=android.intent.action.MAIN;component=com.aisha.headache.ui.activity.SplashActivity;S.key1=\"哈哈\";i.key2=2;end", // 指定页面并传参
new Dictionary<string, object> { { "Data", "{\"ProjectId\":\"[projectId]\",\"PatientNumber\":\"[patientNumber]\"}" } });
var field1 = "<field>501a4360-5648-45be-8aaa-935d5f6673c3</field>"; //体重
var field2 = "<field>c7142c7b-2372-4a79-8626-6ae218e9ae0b</field>"; //身高
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment