作者 郭文星

123

... ... @@ -62,6 +62,7 @@ class Dashboard extends Backend
'todayuserlogin' => User::whereTime('logintime', 'today')->count(),
'sevendau' => User::whereTime('jointime|logintime|prevtime', '-7 days')->count(),
//'thirtydau' => User::whereTime('jointime|logintime|prevtime', '-30 days')->count(),
'notselectedorder' => \app\admin\model\Order::where("driver_id","")->count(),
'newadditionorder' => \app\admin\model\Order::where("is_check",0)->count(),
'threednu' => User::whereTime('jointime', '-3 days')->count(),
'sevendnu' => User::whereTime('jointime', '-7 days')->count(),
... ...
... ... @@ -267,7 +267,16 @@
})
$.ajax({ // 定义ajax发送请求
url: 'order/notselectedorder', // 请求发送的地址 有三种填写方式,与form标签的action一致
method: 'post', // 请求发送的方式
success: function (data) { // 异步等待,当后端响应成功会回调执行匿名函数,并将数据传递给data参数
var divValue = document.getElementById("notselectedorder").innerHTML;
console.log(divValue)
document.getElementById("notselectedorder").innerHTML = data;
}// 使用ajax交互,那么后端返回的数据会被data接收,不在直接影响整个浏览器页面
})
}, 5000); // 1000毫秒为间隔
</script>
\ No newline at end of file
... ...