|
@@ -0,0 +1,48 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en" style="width: 100%">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
+ <title>用户地域统计</title>
|
|
|
+ <style type="text/css">
|
|
|
+ *{
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script src="js/jquery.min.js"></script>
|
|
|
+ <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(function(){
|
|
|
+ $.post("./user/getUserOrderByCity", {}, function(resp) {
|
|
|
+ if (resp.code == 'error') {
|
|
|
+ console.log(resp.code);
|
|
|
+ }else{
|
|
|
+ for(let index in resp.data){
|
|
|
+ var str = "<tr><td>" + (index + 1) + "</td><td>";
|
|
|
+ if(resp.data[index].city == null || resp.data[index].city == ""){
|
|
|
+ str += "未知</td><td>";
|
|
|
+ }else{
|
|
|
+ str += resp.data[index].city + "</td><td>";
|
|
|
+ }
|
|
|
+ str += resp.data[index].quantity + "</td></tr>"
|
|
|
+ $("table").append(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body style="width: 100%">
|
|
|
+ <table class="table table-condensed">
|
|
|
+ <tr>
|
|
|
+ <th>#</th>
|
|
|
+ <th>地区</th>
|
|
|
+ <th>人数</th>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+</body>
|
|
|
+</html>
|