引入js文件,可能还需要jq 自行引入
链接: https://pan.baidu.com/s/16y-Q8w8sB2BUQXBXqGcF5Q 提取码: j3nz
var iNotify = new Notify({
message: '有消息了。',//标题
effect: 'flash', // flash | scroll 闪烁还是滚动
interval: 300,
audio:{
//file: ['/Public/sound/msg.mp4','/Public/sound/msg.mp3','/Public/sound/msg.wav']
file:'http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=有客户申请提现啦'
}
});
// if(1== 1){
setInterval(function() {
$.ajax({
type: "get",
url: "", //接口地址 根据自己的业务需求
cache: false,
success: function (res) {
if (res.code ==200) {
iNotify.setFavicon(res.code).setTitle('提现通知').notify({
title: "新通知",
body: "有客户申请提现啦..."
}).player();
}else{
iNotify.stopPlay();
iNotify.setTitle();
}
}
});
},8000);