Browse Source

tugengxin

zjh 5 years ago
parent
commit
21b30639d5
3 changed files with 8 additions and 6 deletions
  1. 7 5
      pages/item/item.js
  2. 1 0
      pages/rise/rise.js
  3. 0 1
      pages/rise/rise.wxss

+ 7 - 5
pages/item/item.js

@@ -290,7 +290,7 @@ Page({
         currentTab: 0,
         follow:"",
           ec: {
-      // onInit: initChart
+      onInit: true
     },
     realchartData:{
       // actual:[572,556,3555,4744,552,576,3555],
@@ -446,11 +446,12 @@ Page({
            follow:res.data.data.isFollowed ? "已关注":"关注"
           })
           // initChart(real.detail.canvas, real.detail.width, real.detail.height,real.detail.dpr,that.recursion(res.data.data));
-          this.actualComponent.init((canvas, width, height) => {
+          this.actualComponent.init((canvas, width, height,dpr) => {
             // 初始化图表
             const Chart = echarts.init(canvas, null, {
               width: width,
-              height: height
+              height: height,
+              devicePixelRatio: dpr // new
             });
             Chart.setOption(this.getOption(that.recursion(res.data.data)));
             return Chart;
@@ -488,11 +489,12 @@ Page({
               nextchartData:that.recursion(res.data.data),
             })
             // initChart(under.detail.canvas, under.detail.width, under.detail.height,under.detail.dpr,that.recursion(res.data.data));
-            this.underComponnet.init((canvas, width, height) => {
+            this.underComponnet.init((canvas, width, height,dpr) => {
               // 初始化图表
               const Chart = echarts.init(canvas, null, {
                 width: width,
-                height: height
+                height: height,
+                devicePixelRatio: dpr // new
               });
               Chart.setOption(this.getOption(that.recursion(res.data.data)));
               return Chart;

+ 1 - 0
pages/rise/rise.js

@@ -193,6 +193,7 @@ Page({
     var that = this;
     this.onLoad(); //重新加载onLoad()
   },
+
   //获取上周实际
   getinclast:function(){
     var that = this;

+ 0 - 1
pages/rise/rise.wxss

@@ -1,6 +1,5 @@
 page {
   background: #000;
-
 }  
 .swiper-tab {
   width: 100%;