Browse Source

fix 环境参数曲线 最大值、最小值问题

anxiaoxia 2 years ago
parent
commit
1afc186d89
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pages/detail/index.js

+ 2 - 2
pages/detail/index.js

@@ -188,8 +188,8 @@ Page({
       dayTarget.forEach((item,index)=>{
       dayTarget.forEach((item,index)=>{
         let time ='';
         let time ='';
         item.time&&(time = item.time.slice(0,2)+':'+item.time.slice(2,4));
         item.time&&(time = item.time.slice(0,2)+':'+item.time.slice(2,4));
-        let minarea = Number(item[`${this.data.envType}Min`].toFixed(1));
-        let maxarea = Number(item[`${this.data.envType}Max`].toFixed(1));
+        let minarea = item[`${this.data.envType}Min`] ? Number(item[`${this.data.envType}Min`].toFixed(1)) : 0;
+        let maxarea = item[`${this.data.envType}Max`] ? Number(item[`${this.data.envType}Max`].toFixed(1)) : 0;
         let initObj={
         let initObj={
           time:time,
           time:time,
           release:index,
           release:index,