瀏覽代碼

出场语音

aleyds 3 年之前
父節點
當前提交
0bf5829943
共有 1 個文件被更改,包括 8 次插入0 次删除
  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: '推送注册'});
 		//监听系统通知栏消息点击事件