Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ashermed_old_push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
backend
ashermed_old_push
Commits
b5ecfdc3
Commit
b5ecfdc3
authored
May 28, 2022
by
张盛懿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
91极光推送
parent
c0c671c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
JiguangPushMessage.cs
PushInfo.Core/BLL/JiguangPushMessage.cs
+1
-1
Program.cs
PushTest/Program.cs
+6
-4
No files found.
PushInfo.Core/BLL/JiguangPushMessage.cs
View file @
b5ecfdc3
...
...
@@ -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
.
ToString
().
Contains
(
"\""
)
?
item
.
Value
.
ToString
().
Replace
(
"\""
,
"\\\""
)
:
item
.
Value
);
param
.
AppendFormat
(
"S.{0}=
{1};"
,
item
.
Key
,
item
.
Value
);
else
if
(
IsNumericType
(
item
.
Value
))
param
.
AppendFormat
(
"i.{0}={1};"
,
item
.
Key
,
item
.
Value
);
}
...
...
PushTest/Program.cs
View file @
b5ecfdc3
...
...
@@ -27,12 +27,14 @@ namespace PushTest
{
static
void
Main
(
string
[]
args
)
{
var
message
=
new
JiguangPushMessage
(
"298ec6f7cdcdee87a3faf64b"
,
"36dd48a9028eeb4471acec46"
);
var
result
=
message
.
SendPush
(
new
Jiguang
.
JPush
.
Model
.
Audience
{
RegistrationId
=
new
List
<
string
>
{
"171976fa8a74aa10a22"
}
},
// android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
//var message = new JiguangPushMessage("298ec6f7cdcdee87a3faf64b", "36dd48a9028eeb4471acec46");
var
message
=
new
JiguangPushMessage
(
"3629af15196fd106fab58797"
,
"55295b24333c733510f8ac42"
);
var
result
=
message
.
SendPush
(
new
Jiguang
.
JPush
.
Model
.
Audience
{
RegistrationId
=
new
List
<
string
>
{
"190e35f7e0bf15515c4"
}
},
// android: 1a0018970a578514295, ios: 161a3797c8f24d790c1
"我的头痛日记"
,
"您的头痛时间已持续72小时,请确认是否已结束?点击确认>>"
,
"intent:#Intent;action=android.intent.action.MAIN;end"
,
// 首页
//
"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]\"}"
}
},
true
);
"intent:#Intent;action=android.intent.action.about;component=com.ashermed.ysedc.old;end"
,
new
Dictionary
<
string
,
object
>
{
{
"InfoType"
,
1
},
{
"Data"
,
"{\"ProjectId\":\"9bfc78a8-6d2e-47b9-94cb-c3f40dfd9dc7\",\"PatientNumber\":\"005005\"}"
}
},
true
);
var
field1
=
"<field>501a4360-5648-45be-8aaa-935d5f6673c3</field>"
;
//体重
var
field2
=
"<field>c7142c7b-2372-4a79-8626-6ae218e9ae0b</field>"
;
//身高
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment