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
66b3324e
Commit
66b3324e
authored
Nov 09, 2020
by
home
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fd
parent
a1a30795
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
162 additions
and
85 deletions
+162
-85
App.vue
App.vue
+134
-76
manifest.json
manifest.json
+18
-1
pages/eleProduct/eleProduct.vue
pages/eleProduct/eleProduct.vue
+3
-3
pages/index/index.vue
pages/index/index.vue
+2
-2
pages/order/detail/detail.vue
pages/order/detail/detail.vue
+5
-3
No files found.
App.vue
View file @
66b3324e
...
...
@@ -2,9 +2,23 @@
import
{
newsRemind
}
from
"
@/utils/api/api.js
"
;
//获取商家消息
export
default
{
data
:{
cid
:
''
cid
:
''
,
platform
:
''
},
onLaunch
:
function
()
{
onLaunch
:
function
()
{
this
.
hgServiceFun
()
this
.
platform
=
uni
.
getSystemInfoSync
().
platform
;
if
(
this
.
platform
==
'
ios
'
){
bgAudioMannager
.
title
=
'
您已进入鹿马配送...
'
;
bgAudioMannager
.
singer
=
'
小马将为你进行实时播报语音
'
;
bgAudioMannager
.
coverImgUrl
=
'
https://runimg.jxdsy.cn/bank/logo.png
'
;
bgAudioMannager
.
src
=
'
https://runimg.jxdsy.cn/bank/1703.mp3
'
;
bgAudioMannager
.
play
();
bgAudioMannager
.
onEnded
((
res
)
=>
{
//自然播放完毕
bgAudioMannager
.
pause
();
//pause 暂停
});
}
// #ifdef APP-PLUS
let
cID
=
plus
.
push
.
getClientInfo
();
this
.
cid
=
cID
.
clientid
...
...
@@ -60,6 +74,35 @@
}
},
methods
:{
hgServiceFun
(){
let
platform
=
uni
.
getSystemInfoSync
().
platform
;
if
(
platform
!=
'
ios
'
){
const
hgService
=
uni
.
requireNativePlugin
(
"
HG-Background
"
);
//初始化
hgService
.
config
({
title
:
"
商家语音播报
"
,
content
:
"
鹿马商家语音播实时播报中
"
,
mode
:
1
,
//0省电模式 1流氓模式
});
var
rsult
=
hgService
.
checkIfLimited
();
//检测是否限制后台运行
if
(
rsult
.
isLimit
){
//限制了后台运行
hgService
.
requestIgnoreLimit
();
//申请允许后台运行
}
else
{
//没有限制后台运行
console
.
log
(
'
没有限制
'
)
hgService
.
startService
();
//启动前台服务
//hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
}
var
globalEvent
=
uni
.
requireNativePlugin
(
'
globalEvent
'
);
//全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
// globalEvent.addEventListener('doJob', function() {
console
.
log
(
globalEvent
,
'
aaaaa
'
)
// });
}
},
//获取 语音消息
async
getnewsRemind
(){
...
...
@@ -71,52 +114,35 @@
let
res
=
await
newsRemind
({
uid
:
this
.
$store
.
state
.
userInfo
.
user_id
,
cid
:
this
.
cid
})
})
if
(
res
.
code
==
0
){
if
(
res
.
data
.
length
!=
0
){
//进来了就是有消息
let
msglist
=
res
.
data
;
if
(
msglist
.
length
==
1
){
//一条就播放 如果多条 直接告诉商家多少条
// isvoice 开关
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msglist
[
0
].
message
).
then
((
e
)
=>
{
// console.log(e);
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
})
}
else
{
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
}
}
else
if
(
msglist
.
length
!=
0
){
// 类型(0商城快捷支付,1商城快递,2商城店付,3餐饮快捷支付,4达达配送,5堂食,6鹿马配送)
let
KJres
=
msglist
.
filter
(
item
=>
{
return
item
.
type
==
3
})
let
PSres
=
msglist
.
filter
(
item
=>
{
return
item
.
type
==
4
||
item
.
type
==
5
||
item
.
type
==
6
})
if
(
res
.
data
.
length
!=
0
){
if
(
this
.
platform
==
'
ios
'
){
if
(
bgAudioMannager
.
paused
){
//没有播放或者暂停了播放
bgAudioMannager
.
title
=
'
您已进入鹿马配送...
'
;
bgAudioMannager
.
singer
=
'
小马将为你进行实时播报语音
'
;
bgAudioMannager
.
coverImgUrl
=
'
https://runimg.jxdsy.cn/bank/logo.png
'
;
bgAudioMannager
.
src
=
'
https://runimg.jxdsy.cn/bank/run.mp3
'
;
bgAudioMannager
.
seek
({
position
:
0
});
bgAudioMannager
.
play
();
bgAudioMannager
.
onEnded
((
res
)
=>
{
//自然播放完毕
console
.
log
(
'
自然播放完毕
'
);
bgAudioMannager
.
pause
();
//pause 暂停
})
}
else
{
console
.
log
(
'
这里这里
'
)
}
if
(
PSres
.
length
!=
0
){
let
msgtext
=
`你有新鹿马订单,请及时处理`
;
}
else
{
//进来了就是有消息
let
msglist
=
res
.
data
;
if
(
msglist
.
length
==
1
){
//一条就播放 如果多条 直接告诉商家多少条
// isvoice 开关
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msg
text
).
then
((
e
)
=>
{
console
.
info
(
e
,
"
循环消息列表2
"
);
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msg
list
[
0
].
message
).
then
((
e
)
=>
{
// console.log(e
);
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
...
...
@@ -134,18 +160,30 @@
}
})
}
}
setTimeout
(()
=>
{
if
(
KJres
.
length
!=
0
){
let
payText
=
""
for
(
let
i
=
0
;
i
<
KJres
.
length
;
i
++
){
payText
=
payText
+
"
,
"
+
KJres
[
i
].
contents
}
console
.
log
(
payText
);
let
msgtext
=
`
${
payText
}
`
;
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msgtext
).
then
((
e
)
=>
{
console
.
info
(
e
,
"
循环消息列表2
"
);
}
else
if
(
msglist
.
length
!=
0
){
// 类型(0商城快捷支付,1商城快递,2商城店付,3餐饮快捷支付,4达达配送,5堂食,6鹿马配送)
let
KJres
=
msglist
.
filter
(
item
=>
{
return
item
.
type
==
3
})
let
PSres
=
msglist
.
filter
(
item
=>
{
return
item
.
type
==
4
||
item
.
type
==
5
||
item
.
type
==
6
})
if
(
PSres
.
length
!=
0
){
let
msgtext
=
`你有新鹿马订单,请及时处理`
;
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msgtext
).
then
((
e
)
=>
{
console
.
info
(
e
,
"
循环消息列表2
"
);
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
})
}
else
{
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
...
...
@@ -153,26 +191,46 @@
fail
:(
a
)
=>
{
}
})
})
}
else
{
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
}
}
}
},
1000
*
5
)
}
//回调
setTimeout
(()
=>
{
this
.
getnewsRemind
()
},
datestime
)
setTimeout
(()
=>
{
if
(
KJres
.
length
!=
0
){
let
payText
=
""
for
(
let
i
=
0
;
i
<
KJres
.
length
;
i
++
){
payText
=
payText
+
"
,
"
+
KJres
[
i
].
contents
}
console
.
log
(
payText
);
let
msgtext
=
`
${
payText
}
`
;
if
(
this
.
$store
.
state
.
isvoice
){
this
.
$store
.
dispatch
(
'
AudioVoice
'
,
msgtext
).
then
((
e
)
=>
{
console
.
info
(
e
,
"
循环消息列表2
"
);
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
})
}
else
{
//震动 调用//400ms//长震动
uni
.
vibrateLong
({
success
:(
re
)
=>
{
},
fail
:(
a
)
=>
{
}
})
}
}
},
1000
*
5
)
}
//回调
setTimeout
(()
=>
{
this
.
getnewsRemind
()
},
datestime
)
}
}
else
{
//获取到的消息列表为空列表
//回调
...
...
manifest.json
View file @
66b3324e
...
...
@@ -56,6 +56,7 @@
/*
ios打包配置
*/
"ios"
:
{
"idfa"
:
false
,
"UIBackgroundModes"
:
[
"location"
,
"audio"
],
"privacyDescription"
:
{
"NSPhotoLibraryUsageDescription"
:
"需要获得的允许,才能在上传商城产品时选择图片"
,
"NSPhotoLibraryAddUsageDescription"
:
"需要获得的允许,才能在生成店铺二维码后将海报保存到相册"
,
...
...
@@ -152,7 +153,23 @@
"iosStyle"
:
"common"
}
},
"compilerVersion"
:
2
"compilerVersion"
:
2
,
"nativePlugins"
:
{
"HG-Background"
:
{
"__plugin_info__"
:
{
"name"
:
"保活 前台运行 - [试用版,仅用于自定义调试基座]"
,
"description"
:
"用于提高app存活概率或添加前台显示 q群:219508489"
,
"platforms"
:
"Android"
,
"url"
:
"https://ext.dcloud.net.cn/plugin?id=2203"
,
"android_package_name"
:
""
,
"ios_bundle_id"
:
""
,
"isCloud"
:
true
,
"bought"
:
0
,
"pid"
:
"2203"
,
"parameters"
:
{}
}
}
}
},
/*
快应用特有相关
*/
"quickapp"
:
{},
...
...
pages/eleProduct/eleProduct.vue
View file @
66b3324e
...
...
@@ -3,16 +3,16 @@
<!-- 产品 -->
<view
class=
"ProductManage pb-100 yocode"
>
<view
class=
"projuctTab flex"
style=
"background-color: #EEEEEE;justify-content: center;align-items:center ;"
>
<!--
<view
class=
"projuctTab flex"
style=
"background-color: #EEEEEE;justify-content: center;align-items:center ;"
>
<view
class=
""
style=
"width: 65%;"
>
<input
type=
"searchInput"
value=
""
placeholder=
"搜索"
style=
" "
/>
</view>
<view
class=
""
style=
"width: 90upx;height: 90upx;"
>
<image
src=
"../../static/icon/1.png"
mode=
""
style=
"display: inline;"
></image>
</view>
</view>
</view>
-->
<!-- tab切换 -->
<view
class=
"projuctTab flex"
style=
"top: 184upx;"
>
<view
class=
"projuctTab flex"
>
<view
class=
"tabitems flex1"
:class=
"
{active:tabactive==1}" @tap="taggletab(1)">
<view
class=
"tabtitle"
>
出售中
</view>
<!-- (
{{
count
[
0
]
}}
) -->
...
...
pages/index/index.vue
View file @
66b3324e
...
...
@@ -224,7 +224,7 @@
</navigator>
</view>
<view
class=
"jiu_max "
>
<
!--
<
view
class=
"jiu_max "
>
<navigator
url=
"/pages/eleProduct/eleProduct?edit=1"
>
<view
class=
"jiu_min"
>
<view><image
class=
"img"
src=
"/static/icon/psfei.png"
mode=
""
></image></view>
...
...
@@ -240,7 +240,7 @@
<view>
增减库存
</view>
</view>
</navigator>
</view>
</view>
-->
</view>
<view
class=
"BH"
></view>
...
...
pages/order/detail/detail.vue
View file @
66b3324e
...
...
@@ -23,13 +23,15 @@
</view>
</view>
<view
class=
""
v-if=
"products.length!=0"
>
<view
class=
'tag-e'
v-if=
"products[0].productname!='快捷支付'"
>
<view
class=
'tag-e'
v-if=
"products[0].productname!='快捷支付'"
style=
"height: 200upx;"
>
<view
class=
"goods "
v-for=
"(item,index) of products"
:key=
"index"
>
<image
class=
"img"
:src=
"staticUrl+item.photo"
mode=
""
></image>
<view
class=
'goods_02'
>
<view
class=
'goods_02'
>
<strong><strong><strong><strong><strong><strong></strong></strong></strong></strong></strong></strong>
<view
class=
'goods_title'
>
{{
item
.
product_name
}}
</view>
<view
class=
"goods_des"
>
{{
item
.
desc
}}
</view>
<view
class=
"goods_des"
>
{{
item
.
desc
}}
</view>
<view
class=
"goods_des"
>
取餐码:
{{
detail
.
delivery_num
}}
</view>
<view
class=
"goods_des"
>
配送费:
{{
detail
.
logistics
}}
</view>
<view
class=
'good_p'
>
<view
class=
"good_price"
>
¥
{{
item
.
fprice
}}
</view>
<view
class=
'i'
>
x
{{
item
.
num
}}
</view>
...
...
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