js右下角通知

<script src="/js/iNotify.js"></script>
<script>
	var iNotify = new iNotify({
        message: '有消息了。',//标题
        effect: 'flash', // flash | scroll 闪烁还是滚动
        interval: 300,
        audio:{
            //file: ['/Public/sound/msg.mp4','/Public/sound/msg.mp3','/Public/sound/msg.wav']
            file:'https://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=有客户申请提现请及时处理'
        }
    });


    setInterval(function() {
            $.ajax({
                type: "GET",
                url: "url",
                cache: false,
                success: function (res) {
                    if (res.data.pay_num>0) {
                        iNotify.setFavicon(res.data.pay_num).setTitle('充值通知').notify({
                            title: "提现通知",
                            body: "有客户申请充值,请及时处理"
                        }).player();
                    }

                     if (res.data.withdrawal_num>0) {
                        iNotify.setFavicon(res.data.withdrawal_num).setTitle('提现通知').notify({
                            title: "提现通知",
                            body: "有客户申请提现,请及时处理"
                        }).player();
                    }
                }
            });
        },10000);
ForDream:当前文章用户名 http://lowfk.com/index.php/2021/08/24/105.html:当前文章地址
THE END
分享
二维码
< <上一篇
下一篇>>