From 2698ff2db5c49efacc0a7d8f77e00d036b2cd38e Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期三, 01 七月 2020 12:07:27 +0800
Subject: [PATCH] fix uni-push intent
---
service/msgPush.go | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/service/msgPush.go b/service/msgPush.go
index a1c29e0..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,8 @@
"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 {
@@ -86,8 +87,8 @@
"notification": {
"title": title,
"body": msg,
- "click_type": "url",
- "url": "http://baidu.com",
+ "click_type": "intent",
+ "intent": intent,
},
},
},
--
Gitblit v1.8.0