瀏覽代碼

Merge branch 'master' of http://git.cc-lotus.info/ball-court/ball-applet

YY 2 年之前
父節點
當前提交
ef92f6cb85
共有 4 個文件被更改,包括 43 次插入52 次删除
  1. 22 20
      pages/stuAdmin/fee/list.js
  2. 7 4
      pages/stuAdmin/study/list.js
  3. 9 15
      pages/stuAdmin/study/list.less
  4. 5 13
      pages/stuAdmin/study/list.wxss

+ 22 - 20
pages/stuAdmin/fee/list.js

@@ -47,27 +47,29 @@ Page({
         var xdata = that.data.xdata;
         const chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr });
         canvas.setChart(chart);
-        var option = {
-            tooltip: { trigger: 'item' },
-            legend: {
-                orient: 'vertical',
-                height: 40,
-                padding: 50
-            },
-            series: [
-                {
-                    name: '课时费',
-                    type: 'pie',
-                    radius: '50%',
-                    data: xdata,
-                    emphasis: {
-                        itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' }
+        if (xdata) {
+            var option = {
+                tooltip: { trigger: 'item' },
+                legend: {
+                    orient: 'vertical',
+                    height: 40,
+                    padding: 50
+                },
+                series: [
+                    {
+                        name: '课时费',
+                        type: 'pie',
+                        radius: '50%',
+                        data: xdata,
+                        emphasis: {
+                            itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' }
+                        }
                     }
-                }
-            ]
-        };
-        chart.setOption(option, true);
-        return chart;
+                ]
+            };
+            chart.setOption(option, true);
+            return chart;
+        }
     },
     /**
     * 生命周期函数--监听页面初次渲染完成

+ 7 - 4
pages/stuAdmin/study/list.js

@@ -37,8 +37,8 @@ Page({
                     // 数据
                     that.data.schooldata = schooldata;
                     that.data.xdata = ['1月份', '2月份', '3月份', '4月份', '5月份', '6月份', '7月份', '8月份', '9月份', '10月份', '11月份', '12月份'];
-                    that.data.data1 = [230, 150, 178, 70, 178, 340, 133, 118, 136, 165, 130, 178];
-                    that.data.data2 = [112, 150, 151, 135, 170, 130, 200, 112, 150, 151, 135, 170];
+                    that.data.data1 = [30, 15, 17, 70, 18, 40, 13, 18, 16, 65, 30, 78];
+                    that.data.data2 = [12, 50, 51, 35, 70, 30, 20, 12, 15, 51, 35, 70];
                     clearTimeout(times);
                 }, 1000)
             },
@@ -122,7 +122,7 @@ Page({
                     yAxis: [
                         {
                             type: 'value',
-                            name: '时长',
+                            name: '签到数',
                             position: 'left',
                             alignTicks: true,
                             axisLine: {
@@ -133,7 +133,7 @@ Page({
                                 }
                             },
                             axisLabel: {
-                                formatter: '{value} 小时'
+                                formatter: '{value}'
                             }
                         },
                         {
@@ -155,6 +155,9 @@ Page({
                                 lineStyle: {
                                     color: '#293C55',
                                 }
+                            },
+                            axisLabel: {
+                                formatter: '{value}小时'
                             }
                         }
                     ],

+ 9 - 15
pages/stuAdmin/study/list.less

@@ -1,17 +1,11 @@
-ec-canvas {
-    width: 100%;
-    height: 100%;
-}
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
 
-.container {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: space-between;
-    box-sizing: border-box;
+
+
+    ec-canvas {
+        width: 100%;
+        height: 100%;
+    }
 }

+ 5 - 13
pages/stuAdmin/study/list.wxss

@@ -1,16 +1,8 @@
-ec-canvas {
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main ec-canvas {
   width: 100%;
   height: 100%;
 }
-.container {
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
-  box-sizing: border-box;
-}