footer.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. </body>
  2. <script>
  3. function replaceDoc() {
  4. window.location.reload(true);
  5. alert('刷新成功!');
  6. location.href = 'index.php';
  7. }
  8. </script>
  9. <script type="text/javascript" src="js/jquery.min.js"></script>
  10. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  11. <script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
  12. <script type="text/javascript" src="js/bootstrap-colorpicker/bootstrap-colorpicker.min.js"></script>
  13. <script type="text/javascript" src="js/main.min.js"></script>
  14. <!--图表插件-->
  15. <script type="text/javascript" src="js/Chart.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(function(e) {
  18. var $dashChartBarsCnt = jQuery('.js-chartjs-bars')[0].getContext('2d'),
  19. $dashChartLinesCnt = jQuery('.js-chartjs-lines')[0].getContext('2d');
  20. var $dashChartBarsData = {
  21. labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
  22. datasets: [{
  23. label: '订单量',
  24. borderWidth: 1,
  25. borderColor: 'rgba(0,0,0,0)',
  26. backgroundColor: 'rgba(51,202,185,0.5)',
  27. hoverBackgroundColor: "rgba(51,202,185,0.7)",
  28. hoverBorderColor: "rgba(0,0,0,0)",
  29. data: <?php echo json_encode($weeklyData); ?>
  30. }]
  31. };
  32. var $dashChartLinesData = {
  33. labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  34. datasets: [{
  35. label: '交易资金',
  36. data: <?php echo json_encode($monthlyData); ?>,
  37. borderColor: '#358ed7',
  38. backgroundColor: 'rgba(53, 142, 215, 0.175)',
  39. borderWidth: 1,
  40. fill: false,
  41. lineTension: 0.5
  42. }]
  43. };
  44. new Chart($dashChartBarsCnt, {
  45. type: 'bar',
  46. data: $dashChartBarsData
  47. });
  48. var myLineChart = new Chart($dashChartLinesCnt, {
  49. type: 'line',
  50. data: $dashChartLinesData,
  51. });
  52. });
  53. </script>
  54. </html>