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
7161e91e
Commit
7161e91e
authored
Apr 24, 2022
by
席世权
Browse files
Options
Browse Files
Download
Plain Diff
合并冲突
parents
51abdfb0
7e281ce4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
JiguangPushMessage.cs
PushInfo.Core/BLL/JiguangPushMessage.cs
+1
-1
Program.cs
PushTest/Program.cs
+5
-5
No files found.
PushInfo.Core/BLL/JiguangPushMessage.cs
View file @
7161e91e
...
...
@@ -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
);
}
...
...
PushTest/Program.cs
View file @
7161e91e
...
...
@@ -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>"
;
//身高
...
...
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