| | |
| | | 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 { |
| | |
| | | "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 { |
| | |
| | | "notification": { |
| | | "title": title, |
| | | "body": msg, |
| | | "click_type": "url", |
| | | "url": "http://baidu.com", |
| | | "click_type": "intent", |
| | | "intent": intent, |
| | | }, |
| | | }, |
| | | }, |