|
@@ -37,16 +37,17 @@ const _handlePush = function(message) {
|
|
|
// jumpTo: 页面跳转地址
|
|
|
// data: {} 其他参数,JSON格式
|
|
|
function deviceParkIn(content){
|
|
|
+ let speakDeviceParkIn='';
|
|
|
//获取存储的设备入场语音播报开关状态
|
|
|
uni.getStorage({
|
|
|
key:'speakData',
|
|
|
success: (res) => {
|
|
|
- let speakDeviceParkIn = res.data.switchVal1;
|
|
|
+ speakDeviceParkIn = res.data.switchVal1;
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
}
|
|
|
})
|
|
|
- if(content.speakMsg&&speakDeviceParkIn==true){
|
|
|
+ if(content.speakMsg&&(speakDeviceParkIn==true||speakDeviceParkIn='')){
|
|
|
speaker.speakAction(content.speakMsg)
|
|
|
}
|
|
|
// const value = uni.getStorageSync('pushModel_switch');
|
|
@@ -71,16 +72,17 @@ function deviceParkIn(content){
|
|
|
}
|
|
|
|
|
|
function deviceParkOut(content){
|
|
|
+ let speakDeviceParkOut='';
|
|
|
//获取存储的设备出场语音播报开关状态
|
|
|
uni.getStorage({
|
|
|
key:'speakData',
|
|
|
success: (res) => {
|
|
|
- let speakDeviceParkOut = res.data.switchVal2;
|
|
|
+ speakDeviceParkOut = res.data.switchVal2;
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
}
|
|
|
})
|
|
|
- if(content.speakMsg&&speakDeviceParkOut==true){
|
|
|
+ if(content.speakMsg&&(speakDeviceParkOut==true||speakDeviceParkOut='')){
|
|
|
speaker.speakAction(content.speakMsg)
|
|
|
}
|
|
|
}
|