后台新订单提醒


        // 新订单提醒

        function hello() {
            $.ajax({
                url:'checkOrderNum',
                type:'get',
                success:function (result) {
                    console.log(result);
                    if (result == 1){
                        // 右下角弹框
                       layer.open({
                          type:0,
                          title: '提示',
                          content: '您有新的订单,请及时查看',
                          anim: 2,
                          shade:0,
                          offset:"rb"
                        }); 
                    }
                }
            });

            $.ajax({
                url:'checkSpeedOrderNum',
                type:'get',
                success:function (result) {
                    console.log(result);
                    if (result == 1){
                        // 右下角弹框
                       layer.open({
                          type:0,
                          title: '提示',
                          content: '您有新的快速测试订单,请及时查看',
                          anim: 2,
                          shade:0,
                          offset:"rb"
                        }); 
                    }
                }
            });

        }
        setInterval("hello()",10000);

http://www.runoob.com/jsref/met-win-setinterval.html

使用setInterval()方法


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM