|
@@ -169,22 +169,22 @@
|
|
},
|
|
},
|
|
onLaunch: function() {
|
|
onLaunch: function() {
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
-
|
|
|
|
|
|
+ let type = uni.getSystemInfoSync().platform
|
|
|
|
+ console.log(type)
|
|
|
|
+ if (type == "android") {
|
|
|
|
+ //注意:开启服务之后,配置后台运行,白名单,自启动,即可实现长时间保活,黑屏传数据
|
|
|
|
+ this.goStartService();
|
|
|
|
+ // !!!如果在设置后台运行的情况下,黑屏不发送数据,请使用setInterval代替 定时任务回调
|
|
|
|
+ var globalEvent = uni.requireNativePlugin('globalEvent');
|
|
|
|
+ globalEvent.addEventListener('doJobEvent', function() {
|
|
|
|
+ console.log("---------")
|
|
|
|
+ /* uni.request({}) */
|
|
|
|
+ });
|
|
|
|
+ }
|
|
//获取安卓版本号
|
|
//获取安卓版本号
|
|
pushLive.checkAndroidVersion(function(res) {
|
|
pushLive.checkAndroidVersion(function(res) {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
- //注意:开启服务之后,配置后台运行,白名单,自启动,即可实现长时间保活,黑屏传数据
|
|
|
|
- this.goStartService();
|
|
|
|
- // !!!如果在设置后台运行的情况下,黑屏不发送数据,请使用setInterval代替 定时任务回调
|
|
|
|
- var globalEvent = uni.requireNativePlugin('globalEvent');
|
|
|
|
- globalEvent.addEventListener('doJobEvent', function() {
|
|
|
|
- console.log("---------")
|
|
|
|
- /* uni.request({}) */
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
var that = this
|
|
var that = this
|
|
plus.push.getClientInfoAsync((info) => {
|
|
plus.push.getClientInfoAsync((info) => {
|
|
var name = 'clientId'
|
|
var name = 'clientId'
|