Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
f8ad2eb6
Commit
f8ad2eb6
authored
Nov 17, 2020
by
home
Browse files
Options
Browse Files
Download
Plain Diff
zxf
parents
be646ba3
5ffad7dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
34 deletions
+91
-34
App.vue
App.vue
+63
-24
manifest.json
manifest.json
+7
-7
pages/index/index.vue
pages/index/index.vue
+20
-2
utils/debug.js
utils/debug.js
+1
-1
No files found.
App.vue
View file @
f8ad2eb6
<
script
>
const
bgAudioMannager
=
uni
.
getBackgroundAudioManager
();
const
platform
=
uni
.
getSystemInfoSync
().
platform
;
const
time
=
''
;
const
time
=
''
;
import
{
newsRemind
}
from
"
@/utils/api/api.js
"
;
//获取商家消息
export
default
{
...
...
@@ -17,7 +17,6 @@
bgAudioMannager
.
pause
();
//pause 暂停
});
}
// #ifdef APP-PLUS
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
...
...
@@ -56,47 +55,84 @@
}
},
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(); //申 请
}
else
{
//没有限制后台运行
console
.
log
(
'
没有限制
'
);
hgService
.
startService
();
//启动前台服务
//hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
// }
// // console.log('没有限制');
// hgService.startService(); //启动前台服务
// // hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
// //var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
// },
hgServiceFun
(){
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)
}
//var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
})
// var globalEvent = uni.requireNativePlugin('globalEvent');
// globalEvent.addEventListener('doJobEvent', function() {
// console.log("我被定时启动了。。。。。。。。。。。。。。。。。")
// });
},
//获取 语音消息
async
getnewsRemind
(
type
){
var
date
=
new
Date
();
let
hours
=
date
.
getHours
();
//当前 时间 小时
let
datestime
=
5000
;
//默认15秒
let
datestime
=
5000
;
//默认15秒
if
(
this
.
$store
.
state
.
token
!=
""
){
//判断是否 已登录
//#ifdef APP-PLUS
let
cid
=
plus
.
push
.
getClientInfo
().
clientid
//#endif
console
.
log
(
'
这里
'
)
let
res
=
await
newsRemind
({
uid
:
this
.
$store
.
state
.
userInfo
.
user_id
,
cid
:
plus
.
push
.
getClientInfo
().
client
id
cid
:
c
id
});
if
(
res
.
code
==
0
){
console
.
log
(
'
有语音
'
,
'
--------
'
,
res
);
if
(
res
.
data
.
length
!=
0
){
let
KJres
=
res
.
data
.
filter
(
item
=>
{
//快捷支付
return
item
.
type
==
3
return
item
.
type
==
3
||
item
.
type
==
0
})
let
PSres
=
res
.
data
.
filter
(
item
=>
{
//订单
return
item
.
type
==
4
||
item
.
type
==
5
||
item
.
type
==
6
return
item
.
type
==
4
||
item
.
type
==
5
||
item
.
type
==
6
||
item
.
type
==
1
})
if
(
platform
==
'
ios
'
){
...
...
@@ -140,17 +176,21 @@
}
else
{
if
(
PSres
.
length
!=
0
){
let
msgtext
=
`你有
${
PSres
.
length
}
条鹿马订单,请及时处理`
;
console
.
log
(
'
商城语音播报
'
)
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msgtext
).
then
((
e
)
=>
{
uni
.
vibrateLong
();
//震动 调用//400ms//长震动
})
}
}
if
(
KJres
.
length
!=
0
){
let
payText
=
""
KJres
.
map
(
item
=>
{
payText
=
payText
+
"
,
"
+
item
.
contents
});
console
.
log
(
'
快捷支付播报
'
)
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
payText
).
then
((
e
)
=>
{
uni
.
vibrateLong
();
//震动 调用//400ms//长震动
...
...
@@ -161,7 +201,6 @@
}
}
if
(
type
!=
2
){
return
true
;
}
...
...
@@ -182,4 +221,4 @@
@import
'./common/qiun.css'
;
@import
'./style.css'
;
//我的
</
style
>
</
style
>
\ No newline at end of file
manifest.json
View file @
f8ad2eb6
...
...
@@ -155,17 +155,17 @@
},
"compilerVersion"
:
2
,
"nativePlugins"
:
{
"
HG-Background
"
:
{
"
push-live
"
:
{
"__plugin_info__"
:
{
"name"
:
"
保活 前台运行
"
,
"description"
:
"
用于提高app存活概率或添加前台显示 q群:219508489
"
,
"name"
:
"
安卓保活插件(限制 防杀) - [试用版,仅用于自定义调试基座]
"
,
"description"
:
"
如果你的应用希望能够一直在后台运行而不被系统自动杀死的话,可以尝试一下。群485147231
"
,
"platforms"
:
"Android"
,
"url"
:
"https://ext.dcloud.net.cn/plugin?id=2
203
"
,
"android_package_name"
:
"
com.app.lumastore
"
,
"url"
:
"https://ext.dcloud.net.cn/plugin?id=2
930
"
,
"android_package_name"
:
""
,
"ios_bundle_id"
:
""
,
"isCloud"
:
true
,
"bought"
:
1
,
"pid"
:
"2
203
"
,
"bought"
:
0
,
"pid"
:
"2
930
"
,
"parameters"
:
{}
}
}
...
...
pages/index/index.vue
View file @
f8ad2eb6
...
...
@@ -67,7 +67,23 @@
<view>
总收入
</view>
<view
class=
"shuju_01_s"
v-if=
"countdata.money"
>
¥
{{
countdata
.
money
}}
</view>
<view
class=
"shuju_01_s"
v-else
>
¥0
</view>
</view>
</view>
<view
class=
"shuju_01"
v-if=
"is_bld"
>
<view>
现金支付数
</view>
<view
class=
"shuju_01_s"
v-if=
"countdata.cash"
>
¥
{{
countdata
.
cash
}}
</view>
<view
class=
"shuju_01_s"
v-else
>
¥0
</view>
</view>
<view
class=
"shuju_01 no"
v-if=
"is_bld"
>
<view>
昨日/现金支付数
</view>
<view
class=
"shuju_01_s"
v-if=
"countdata.yesterday_cash"
>
¥
{{
countdata
.
yesterday_cash
}}
</view>
<view
class=
"shuju_01_s"
v-else
>
¥0
</view>
</view>
</navigator>
<view
class=
"BH"
></view>
<view
class=
"six"
>
...
...
@@ -286,6 +302,7 @@
if
(
res
.
code
==
0
){
this
.
is_bld
=
res
.
data
.
is_bld
// this.is_bld = 1
}
})
//显示欢迎回来~
...
...
@@ -312,7 +329,8 @@
if
(
uni
.
getSystemInfoSync
().
platform
!=
'
ios
'
){
getApp
().
hgServiceFun
();
//安卓后台运行
// getApp().hgServiceFun(); //安卓后台运行
console
.
log
(
'
走到后台运行这
'
)
}
...
...
utils/debug.js
View file @
f8ad2eb6
...
...
@@ -6,7 +6,7 @@ module.exports = {
isdebug
:
false
,
//正式
//isdebug:true,//测试
//
isdebug:true,//测试
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment