<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<div class="tabs-border">
			<div class="item active">订单统计</div>
		</div>
		<div class="main">
		<div id="pv" style="width: 100%;height:400px;"></div>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/plugin/echarts/echarts.common.min.js"></script>
		<script>
		var myChart = echarts.init(document.getElementById('pv'));
		getPvStat();
		function getPvStat(){
			$.get("/moduleadmin.php?m=b2b_stat&a=data&ajax=1",function(res){
				var option = {
				    title: {
				        text: ''
				    },
				    tooltip: {
						trigger: 'axis'
					},
					legend: {
						data:['订单金额']
					},
				    xAxis: {
						type: 'category',
						data: res.data.labels
					},
					yAxis: {
						type: 'value'
					},
					series: [
						{
							name:"订单金额",
							data: res.data.orderMoneys,
							type: 'line',
							smooth: true
						}			
						
					]
				};
				 myChart.setOption(option);
			},"json")
		}
		</script>
	</body>
</html>
