aleyds před 3 roky
rodič
revize
0bf5829943
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8 0
      utils/pushUtils.js

+ 8 - 0
utils/pushUtils.js

@@ -9,6 +9,8 @@ const _handlePush = function(message) {
 					let content = JSON.parse(message.content);
 					if (content.type === 1){
 						deviceParkIn(content)
+					}else if (content.type === 2){
+						deviceParkOut(content)
 					}
 				} catch(e){
 					
@@ -39,6 +41,12 @@ function deviceParkIn(content){
 	});
 }
 
+function deviceParkOut(content){
+	if(content.speakMsg){
+		speaker.speakAction(content.speakMsg)
+	}
+}
+
 function pushreg(vue){	
 	     alog.info({msg: '推送注册'});
 		//监听系统通知栏消息点击事件