Commit 19c09fee authored by home's avatar home

zxf

parent f8ad2eb6
......@@ -55,55 +55,55 @@
}
},
methods:{
// hgServiceFun(){
// const hgService = uni.requireNativePlugin("HG-Background"); //初始化
// hgService.config({
// title:"鹿马商家助手",
// content:"小鹿正在为您进行实时播报...",
// mode: 1, //0省电模式 1流氓模式
// });
hgServiceFun(){
const hgService = uni.requireNativePlugin("HG-Background"); //初始化
hgService.config({
title:"鹿马商家助手",
content:"小鹿正在为您进行实时播报...",
mode: 1, //0省电模式 1流氓模式
});
// var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
// if(rsult.isLimit){ //限制了后台运行
// hgService.requestIgnoreLimit(); //申 请
if(rsult.isLimit){ //限制了后台运行
hgService.requestIgnoreLimit(); //申 请
// }
// // console.log('没有限制');
// hgService.startService(); //启动前台服务
// // hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
}
// console.log('没有限制');
hgService.startService(); //启动前台服务
// hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
// //var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
// },
//var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
},
hgServiceFun(){
// hgServiceFun(){
const pushLive = uni.requireNativePlugin('push-live');
pushLive.startService({ //启动服务
title: "鹿马商家助手",
content: "小鹿正在为您进行实时播报...",
mode: 1 //0省电模式 1流氓模式
}, function(res) {
// console.log(res,111111111111111111)
});
// const pushLive = uni.requireNativePlugin('push-live');
// pushLive.startService({ //启动服务
// title: "鹿马商家助手",
// content: "小鹿正在为您进行实时播报...",
// mode: 1 //0省电模式 1流氓模式
// }, function(res) {
// // console.log(res,111111111111111111)
// });
pushLive.isIgnoringBatteryOptimizations(function(res) { //是否添加到白名单中
console.log(res)
if(res.flag){ //添加进去了
//pushLive.gotoWhiteListSetting();
}else{
pushLive.requestIgnoreBatteryOptimizations(); //申请加入白名单
// console.log(222222222222222222222222222222222222)
}
// pushLive.isIgnoringBatteryOptimizations(function(res) { //是否添加到白名单中
// console.log(res)
// if(res.flag){ //添加进去了
// //pushLive.gotoWhiteListSetting();
// }else{
// pushLive.requestIgnoreBatteryOptimizations(); //申请加入白名单
// // console.log(222222222222222222222222222222222222)
// }
})
// })
// var globalEvent = uni.requireNativePlugin('globalEvent');
// globalEvent.addEventListener('doJobEvent', function() {
// console.log("我被定时启动了。。。。。。。。。。。。。。。。。")
// });
},
// // var globalEvent = uni.requireNativePlugin('globalEvent');
// // globalEvent.addEventListener('doJobEvent', function() {
// // console.log("我被定时启动了。。。。。。。。。。。。。。。。。")
// // });
// },
//获取 语音消息
async getnewsRemind(type){
......
......@@ -155,17 +155,17 @@
},
"compilerVersion" : 2,
"nativePlugins" : {
"push-live" : {
"HG-Background" : {
"__plugin_info__" : {
"name" : "安卓保活插件(限制 防杀) - [试用版,仅用于自定义调试基座]",
"description" : "如果你的应用希望能够一直在后台运行而不被系统自动杀死的话,可以尝试一下。群485147231",
"name" : "保活 前台运行",
"description" : "用于提高app存活概率或添加前台显示 q群:219508489",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=2930",
"android_package_name" : "",
"url" : "https://ext.dcloud.net.cn/plugin?id=2203",
"android_package_name" : "com.app.lumastore",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 0,
"pid" : "2930",
"bought" : 1,
"pid" : "2203",
"parameters" : {}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment