Browse Source

默认的

Kirin 4 years ago
parent
commit
2897d3d370
1 changed files with 111 additions and 111 deletions
  1. 111 111
      app/admin/view/index/main.php

+ 111 - 111
app/admin/view/index/main.php

@@ -246,117 +246,117 @@
                         that.myChart.user_echart.setOption(that.userchartsetoption(res.data.data));
                         that.myChart.user_echart.setOption(that.userchartsetoption(res.data.data));
                     });
                     });
                 },
                 },
-                getlist:function (e) {
-                    var that=this;
-                    var cycle = e!=null ? e :'thirtyday';
-                    axios.get("{:Url('orderchart')}?cycle="+cycle).then((res)=>{
-                            that.myChart.order_echart.clear();
-                            that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
-                            that.active = cycle;
-                            switch (cycle){
-                                case 'thirtyday':
-                                    that.cyclename = '最近30天';
-                                    that.precyclename = '上个30天';
-                                    break;
-                                case 'week':
-                                    that.precyclename = '上周';
-                                    that.cyclename = '本周';
-                                    break;
-                                case 'month':
-                                    that.precyclename = '上月';
-                                    that.cyclename = '本月';
-                                    break;
-                                case 'year':
-                                    that.cyclename = '去年';
-                                    that.precyclename = '今年';
-                                    break;
-                                default:
-                                    break;
-                            }
-                            var data=res.data.data;
-                            if(data) {
-                                that.cyclecount = data.cycle.count.data;
-                                that.cyclecount_percent = data.cycle.count.percent;
-                                that.cyclecount_is_plus = data.cycle.count.is_plus;
-                                that.cycleprice = data.cycle.price.data;
-                                that.cycleprice_percent = data.cycle.price.percent;
-                                that.cycleprice_is_plus = data.cycle.price.is_plus;
-                                that.pre_cyclecount = data.pre_cycle.count.data;
-                                that.pre_cycleprice = data.pre_cycle.price.data;
-                            }
-                    });
-                },
-                orderchartsetoption:function(data){
-                    data = data == undefined ? {} : data;
-                        this.option = {
-                            tooltip: {
-                                trigger: 'axis',
-                                axisPointer: {
-                                    type: 'cross',
-                                    crossStyle: {
-                                        color: '#999'
-                                    }
-                                }
-                            },
-                            toolbox: {
-                                feature: {
-                                    dataView: {show: true, readOnly: false},
-                                    magicType: {show: true, type: ['line', 'bar']},
-                                    restore: {show: false},
-                                    saveAsImage: {show: true}
-                                }
-                            },
-                            legend: {
-                                data: data.legend || []
-                            },
-                            grid: {
-                                x: 70,
-                                x2: 50,
-                                y: 60,
-                                y2: 50
-                            },
-                            xAxis: [
-                                {
-                                    type: 'category',
-                                    data: data.xAxis,
-                                    axisPointer: {
-                                        type: 'shadow'
-                                    },
-                                    axisLabel:{
-                                        interval: 0,
-                                        rotate:40
-                                    }
-
-
-                                }
-                            ],
-                            yAxis:[{type : 'value'}],
-//                            yAxis: [
-//                                {
-//                                    type: 'value',
-//                                    name: '',
-//                                    min: 0,
-//                                    max: data.yAxis.maxprice,
-////                                    interval: 0,
-//                                    axisLabel: {
-//                                        formatter: '{value} 元'
-//                                    }
-//                                },
-//                                {
-//                                    type: 'value',
-//                                    name: '',
-//                                    min: 0,
-//                                    max: data.yAxis.maxnum,
-//                                    interval: 5,
-//                                    axisLabel: {
-//                                        formatter: '{value} 个'
-//                                    }
-//                                }
-//                            ],
-                            series: data.series
-                        };
-                    return  this.option;
-                },
+                // getlist:function (e) {
+                //     var that=this;
+                //     var cycle = e!=null ? e :'thirtyday';
+                //     axios.get("{:Url('orderchart')}?cycle="+cycle).then((res)=>{
+                //             that.myChart.order_echart.clear();
+                //             that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
+                //             that.active = cycle;
+                //             switch (cycle){
+                //                 case 'thirtyday':
+                //                     that.cyclename = '最近30天';
+                //                     that.precyclename = '上个30天';
+                //                     break;
+                //                 case 'week':
+                //                     that.precyclename = '上周';
+                //                     that.cyclename = '本周';
+                //                     break;
+                //                 case 'month':
+                //                     that.precyclename = '上月';
+                //                     that.cyclename = '本月';
+                //                     break;
+                //                 case 'year':
+                //                     that.cyclename = '去年';
+                //                     that.precyclename = '今年';
+                //                     break;
+                //                 default:
+                //                     break;
+                //             }
+                //             var data=res.data.data;
+                //             if(data) {
+                //                 that.cyclecount = data.cycle.count.data;
+                //                 that.cyclecount_percent = data.cycle.count.percent;
+                //                 that.cyclecount_is_plus = data.cycle.count.is_plus;
+                //                 that.cycleprice = data.cycle.price.data;
+                //                 that.cycleprice_percent = data.cycle.price.percent;
+                //                 that.cycleprice_is_plus = data.cycle.price.is_plus;
+                //                 that.pre_cyclecount = data.pre_cycle.count.data;
+                //                 that.pre_cycleprice = data.pre_cycle.price.data;
+                //             }
+                //     });
+                // },
+//                 orderchartsetoption:function(data){
+//                     data = data == undefined ? {} : data;
+//                         this.option = {
+//                             tooltip: {
+//                                 trigger: 'axis',
+//                                 axisPointer: {
+//                                     type: 'cross',
+//                                     crossStyle: {
+//                                         color: '#999'
+//                                     }
+//                                 }
+//                             },
+//                             toolbox: {
+//                                 feature: {
+//                                     dataView: {show: true, readOnly: false},
+//                                     magicType: {show: true, type: ['line', 'bar']},
+//                                     restore: {show: false},
+//                                     saveAsImage: {show: true}
+//                                 }
+//                             },
+//                             legend: {
+//                                 data: data.legend || []
+//                             },
+//                             grid: {
+//                                 x: 70,
+//                                 x2: 50,
+//                                 y: 60,
+//                                 y2: 50
+//                             },
+//                             xAxis: [
+//                                 {
+//                                     type: 'category',
+//                                     data: data.xAxis,
+//                                     axisPointer: {
+//                                         type: 'shadow'
+//                                     },
+//                                     axisLabel:{
+//                                         interval: 0,
+//                                         rotate:40
+//                                     }
+//
+//
+//                                 }
+//                             ],
+//                             yAxis:[{type : 'value'}],
+// //                            yAxis: [
+// //                                {
+// //                                    type: 'value',
+// //                                    name: '',
+// //                                    min: 0,
+// //                                    max: data.yAxis.maxprice,
+// ////                                    interval: 0,
+// //                                    axisLabel: {
+// //                                        formatter: '{value} 元'
+// //                                    }
+// //                                },
+// //                                {
+// //                                    type: 'value',
+// //                                    name: '',
+// //                                    min: 0,
+// //                                    max: data.yAxis.maxnum,
+// //                                    interval: 5,
+// //                                    axisLabel: {
+// //                                        formatter: '{value} 个'
+// //                                    }
+// //                                }
+// //                            ],
+//                             series: data.series
+//                         };
+//                     return  this.option;
+//                 },
                 userchartsetoption:function(data){
                 userchartsetoption:function(data){
                     this.option = {
                     this.option = {
                         tooltip: {
                         tooltip: {