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);
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容