From dbc843d0b37f786fb816131bcc7ebca86dbe72e9 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期四, 06 八月 2020 09:58:46 +0800
Subject: [PATCH] add crossRecord

---
 service/msgPush.go |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/service/msgPush.go b/service/msgPush.go
index 3f3c4ce..844ae2e 100644
--- a/service/msgPush.go
+++ b/service/msgPush.go
@@ -66,6 +66,7 @@
 		return false, errors.New("token is nil")
 	}
 	url := baseUrl+"/push/all"
+	intent := "intent:#Intent;action=android.intent.action.oppopush;launchFlags=0x14000000;component=uni.UNIEDF0B5C/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title="+title+";S.content="+msg+";S.payload=test;end"
 	reqBody := map[string]interface{} {
 		"request_id": time.Now().Format("20060102150405") + util.GenValidateCode(6),
 		"settings":map[string]int {
@@ -76,8 +77,20 @@
 			"notification": {
 				"title": title,
 				"body": msg,
-				"click_type": "url",
-				"url": "http://baidu.com",
+				"click_type": "intent",
+				"intent": intent,
+			},
+		},
+		"push_channel": map[string]map[string]map[string]map[string]string {
+			"android": {
+				"ups": {
+					"notification": {
+						"title": title,
+						"body": msg,
+						"click_type": "intent",
+						"intent": intent,
+					},
+				},
 			},
 		},
 	}

--
Gitblit v1.8.0