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
5508f298
Commit
5508f298
authored
Nov 12, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111~
parent
6b0a429e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
22 deletions
+82
-22
pages/chat/chat/chat.vue
pages/chat/chat/chat.vue
+13
-14
pages/setup/setup.vue
pages/setup/setup.vue
+32
-5
store/Im_store.js
store/Im_store.js
+34
-3
utils/yicode.js
utils/yicode.js
+3
-0
No files found.
pages/chat/chat/chat.vue
View file @
5508f298
...
...
@@ -33,7 +33,7 @@
<view
@
tap=
"catphone"
class=
"iconsbtn"
>
<image
class=
"iconsimg"
src=
"/static/chat/telephony.png"
mode=
""
></image>
</view>
<view
@
tap=
"toorderinfo"
class=
"iconsbtn"
>
<view
v-if=
"type==2"
@
tap=
"toorderinfo"
class=
"iconsbtn"
>
<image
class=
"iconsimg"
src=
"/static/chat/ordericonss.png"
mode=
""
></image>
</view>
</view>
...
...
@@ -619,7 +619,7 @@
getGroupsInfofun
()
{
this
.
$store
.
dispatch
(
"
getGroupsInfo
"
,
{}).
then
((
res
)
=>
{
if
(
res
.
groupInfoList
.
length
!=
0
)
{
this
.
groupInfodata
=
res
.
groupInfoList
[
0
];
this
.
groupInfodata
=
res
.
groupInfoList
[
0
]
.
info
;
}
});
},
...
...
@@ -762,31 +762,30 @@
//查看订单
toorderinfo
()
{
console
.
info
(
'
查看订单详情
'
);
return
false
;
let
Merchantinfo
=
this
.
Merchantinfo
;
//商家
let
shopid
=
''
;
let
shoptype
=
''
;
let
order_id
=
this
.
groupInfodata
.
customInfo
.
order_id
;
let
order_type
=
this
.
groupInfodata
.
customInfo
.
order_type
;
let
tourl
=
""
;
if
(
Merchantinfo
.
customInfo
)
{
shoptype
=
Merchantinfo
.
customInfo
.
shoptype
;
shopid
=
Merchantinfo
.
customInfo
.
shopid
;
switch
(
shoptype
)
{
if
(
order_id
)
{
switch
(
order_type
)
{
case
'
ele
'
:
tourl
=
`/pages/
takeout/takeout?id=
${
shop
id
}
`
tourl
=
`/pages/
order/detail/detail?id=
${
order_
id
}
`
break
;
case
'
goods
'
:
tourl
=
`/pages/
shophome/shophome?id=
${
shop
id
}
`
tourl
=
`/pages/
order/shoporderdetail/shoporderdetail?order_id=
${
order_
id
}
`
break
;
case
'
hotel
'
:
tourl
=
`/pages/Hotel/Hoteldetails/Hoteldetails?hotel_id=
${
shopid
}
`
tourl
=
'
/pages/hotelOrderDetaile/hotelOrderDetaile?order_id=
'
+
order_id
+
'
&shop=shop
'
break
;
default
:
}
if
(
tourl
==
''
){
return
false
;
}
wx
.
navigateTo
({
url
:
tourl
,
})
}
else
{
this
.
$api
.
msg
(
"
商家
信息有误
"
);
this
.
$api
.
msg
(
"
信息有误
"
);
}
},
//返回上一页
...
...
pages/setup/setup.vue
View file @
5508f298
...
...
@@ -25,9 +25,16 @@
<view
class=
"list-cell m-t"
>
<text
class=
"cell-tit"
>
接收
语音
提醒
</text>
<text
class=
"cell-tit"
>
接收
订单
提醒
</text>
<switch
:checked=
"ischecked"
color=
"#ff6900"
@
change=
"switchChange"
/>
</view>
</view>
<view
class=
"list-cell m-t"
>
<text
class=
"cell-tit"
>
接收消息提醒
</text>
<switch
:checked=
"isvoicemsg"
color=
"#ff6900"
@
change=
"switchChangesmg"
/>
</view>
<navigator
url=
"/pages/Course/Courselist"
class=
"list-cell m-t"
>
<text
class=
"cell-tit"
>
收不到语音提示?
</text>
...
...
@@ -129,13 +136,19 @@
version
:
"
1.00
"
,
ischeckedtwo
:
false
,
//店铺打烊情况
isshowdy
:
false
,
//是否显示打烊按钮
platform
:
'
ios
'
,
platform
:
'
ios
'
,
isvoicemsg
:
true
,
//是否打开消息提醒 短信消息
};
},
onLoad
()
{
this
.
platform
=
uni
.
getSystemInfoSync
().
platform
;
this
.
getv
();
this
.
storeEleInfofun
();
//查询外卖店铺详情信息
this
.
storeEleInfofun
();
//查询外卖店铺详情信息
let
isvoicemsg
=
uni
.
getStorageSync
(
"
isvoicemsg
"
);
if
(
isvoicemsg
==-
1
){
this
.
isvoicemsg
=
false
;
}
},
computed
:{
//选中状态
...
...
@@ -144,7 +157,9 @@
},
debug
(){
return
debug
;
}
},
},
methods
:{
...
...
@@ -283,6 +298,18 @@
})
this
.
$store
.
commit
(
"
changeisvoice
"
,
e
.
detail
.
value
);
//直接修改 双向绑定的
},
//消息提醒
switchChangesmg
(
e
){
// console.info(e,"eeee");
let
val
=
e
.
detail
.
value
;
if
(
val
){
this
.
isvoicemsg
=
true
;
uni
.
setStorageSync
(
"
isvoicemsg
"
,
""
)
}
else
{
this
.
isvoicemsg
=
false
;
uni
.
setStorageSync
(
"
isvoicemsg
"
,
"
-1
"
)
}
},
//店铺打烊
switchChangetwo
(
e
){
...
...
store/Im_store.js
View file @
5508f298
...
...
@@ -131,8 +131,7 @@ const Im_store = {
store
.
dispatch
(
"
getConversationList
"
,
{}).
then
(()
=>
{});
//刷新获取会话列表
}
else
{
store
.
dispatch
(
"
getConversationList
"
,
{}).
then
(()
=>
{});
//刷新获取会话列表
store
.
dispatch
(
"
messageTisfun
"
,
{});
//播放提醒消息
}
if
(
store
.
state
.
groupId
==
result
.
msg
.
groupId
){
...
...
@@ -579,7 +578,39 @@ const Im_store = {
})
});
},
//新消息提示
messageTisfun
(){
console
.
info
(
"
语音消息提醒
"
);
let
isvoicemsg
=
uni
.
getStorageSync
(
"
isvoicemsg
"
);
if
(
isvoicemsg
==
'
-1
'
){
console
.
info
(
"
设置关闭了消息 不提示 !
"
);
return
false
;
}
this
.
platform
=
uni
.
getSystemInfoSync
().
platform
;
let
src
=
'
https://runimg.jxdsy.cn/bank/msg_tips.mp3
'
if
(
this
.
platform
==
'
ios
'
){
const
bgAudioMannager
=
uni
.
getBackgroundAudioManager
();
bgAudioMannager
.
title
=
'
鹿马消息提示...
'
;
bgAudioMannager
.
singer
=
'
小马将为你进行实时播报语音
'
;
bgAudioMannager
.
coverImgUrl
=
'
https://runimg.jxdsy.cn/bank/logo.png
'
;
bgAudioMannager
.
src
=
src
;
bgAudioMannager
.
play
();
bgAudioMannager
.
onEnded
((
res
)
=>
{
//自然播放完毕
bgAudioMannager
.
pause
();
//pause 暂停
});
}
else
{
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
true
;
innerAudioContext
.
src
=
src
;
innerAudioContext
.
onPlay
(()
=>
{
//音频播放时
uni
.
vibrateLong
();
//震动 调用//400ms//长震动
});
innerAudioContext
.
onError
((
res
)
=>
{
//音频播放错误
console
.
log
(
res
,
'
播放失败
'
)
});
}
}
...
...
utils/yicode.js
View file @
5508f298
...
...
@@ -364,6 +364,9 @@ const checkPhone = (phone)=>{
//时间戳解析多久前
const
formatMsgTime
=
(
timespan
)
=>
{
if
(
!
timespan
){
return
""
;
}
timespan
=
timespan
*
1000
;
//
var
dateTime
=
new
Date
(
timespan
)
// 将传进来的字符串或者毫秒转为标准时间
var
year
=
dateTime
.
getFullYear
()
...
...
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