Browse Source

Merge branch 'master' of http://39.106.8.246:3003/sagacloud/sagacloud-sagacare-miniprogram

chenzhen2 2 years ago
parent
commit
652912f5b6

+ 1 - 2
app.json

@@ -23,8 +23,7 @@
     "header": "./components/header/header",
     "loading": "/components/loading/loading",
     "van-icon": "./vant-weapp/dist/icon/index",
-    "van-sticky": "./vant-weapp/dist/sticky/index",
-    "lottie": "./miniprogram_npm/lottie-miniapp/component/lottie"
+    "van-sticky": "./vant-weapp/dist/sticky/index"
   },
   "style": "v2",
   "sitemapLocation": "sitemap.json",

+ 13 - 6
components/envchart/envchart.js

@@ -9,16 +9,16 @@ function deteleNull(arr){
   })
   return brr
 }
-let envTypelist={
+ let envTypelist={
   hcho:{
     min:0,
-    max:0.2
+    max:0.31
   },
   pm25:{
     min:0,
     max:100
   }
-}
+} 
 function chartFn(data=[],envType,envName) {
   function onInitChart(canvas, width, height, F2) {
     // const data = data;
@@ -40,8 +40,16 @@ function chartFn(data=[],envType,envName) {
     let maxTemp;
     let minTemp;
     if(envTypelist[envType]){
-      maxTemp=envTypelist[envType].max;
-      minTemp=envTypelist[envType].min;
+        let envArr= [];
+        data.forEach(item=>{
+            envArr = envArr.concat(item['标准区间'])
+            envArr.push(item.sales)
+        })
+        envArr = deteleNull(envArr);
+        maxTemp=Math.max.call(null,...envArr);
+        minTemp=Math.min.call(null,...envArr);
+        /* maxTemp=envTypelist[envType].max;
+        minTemp=envTypelist[envType].min; */
     }else{
       let envArr= [];
       data.forEach(item=>{
@@ -52,7 +60,6 @@ function chartFn(data=[],envType,envName) {
       maxTemp=Math.ceil(Math.max.call(null,...envArr)) + 1;
       minTemp=Math.floor(Math.min.call(null,...envArr)) - 1;
     }
-    console.log(maxTemp,minTemp,"envType")
     chart = new F2.Chart({
       el: canvas,
       width,

+ 0 - 1
components/spacecard/index.json

@@ -2,7 +2,6 @@
   "component": true,
   "usingComponents": {
     "van-icon": "../../vant-weapp/dist/icon/index",
-    "lottie": "../../miniprogram_npm/lottie-miniapp/component/lottie",
     "van-loading": "../../vant-weapp/dist/loading/index"
   }
 }

+ 1 - 1
components/spacecard/index.wxml

@@ -19,7 +19,7 @@
 				</view>
 				<view class="imgbox">
 					<view  class="lottie {{canvashidden?'':lottiehidden}}" wx:if="{{canvashidden}}">
-						<lottie id="lottie{{cardDate.id}}" canId="{{cardDate.id}}" animationData="{{statusList[cardDate.stateId].canvasDate}}" width="25" height="25"/>
+						<!-- <lottie id="lottie{{cardDate.id}}" canId="{{cardDate.id}}" animationData="{{statusList[cardDate.stateId].canvasDate}}" width="25" height="25"/> -->
 					</view>
 					<!-- <image src="{{statusList[cardDate.stateId].canvasDate}}"></image> -->
 					<text>{{cardDate.state}}</text>

File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/@antv/adjust/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/@antv/adjust/miniprogram_npm/@antv/util/index.js


File diff suppressed because it is too large
+ 205 - 204
miniprogram_npm/@antv/f2/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/@antv/gl-matrix/index.js


File diff suppressed because it is too large
+ 59 - 58
miniprogram_npm/@antv/scale/index.js


File diff suppressed because it is too large
+ 179 - 178
miniprogram_npm/@antv/util/index.js


File diff suppressed because it is too large
+ 287 - 286
miniprogram_npm/@antv/util/miniprogram_npm/tslib/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/@antv/wx-f2/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/fecha/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/hammerjs/index.js


+ 0 - 85
miniprogram_npm/lottie-miniapp/component/lottie.js

@@ -1,85 +0,0 @@
-'use strict';
-
-var _index = require('../index.js');
-
-var _index2 = _interopRequireDefault(_index);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-Component({
-  properties: {
-    width: {
-      type: Number,
-      value: 100
-    },
-    height: {
-      type: Number,
-      value: 100
-    },
-    path: {
-      type: String,
-      observer: function observer() {
-        this.init();
-      }
-    },
-    animationData: {
-      type: Object,
-      observer: function observer() {
-        this.init();
-      }
-    },
-    loop: {
-      type: Boolean,
-      value: true
-    },
-    autoplay: {
-      type: Boolean,
-      value: true
-    }
-  },
-  ready: function ready() {
-    this.init();
-  },
-
-  methods: {
-    init: function init(animationData) {
-      var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.properties.width;
-      var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.properties.height;
-
-      var data = animationData || this.properties.animationData;
-      var dataPath = this.properties.path;
-      if (!data && !dataPath) {
-        return;
-      }
-
-      this.destory();
-
-      var canvasContext = _index.api.createCanvasContext('lottie-canvas', this);
-      canvasContext.canvas = {
-        width: width,
-        height: height
-      };
-
-      this.lottie = _index2.default.loadAnimation({
-        renderer: 'canvas', // 只支持canvas
-        loop: this.data.loop,
-        autoplay: this.data.autoplay,
-        animationData: data,
-        path: dataPath,
-        rendererSettings: {
-          context: canvasContext,
-          clearCanvas: true
-        }
-      });
-    },
-    destory: function destory() {
-      if (this.lottie) {
-        this.lottie.destroy();
-        this.lottie = null;
-      }
-    }
-  },
-  detached: function detached() {
-    this.destory();
-  }
-});

+ 0 - 3
miniprogram_npm/lottie-miniapp/component/lottie.json

@@ -1,3 +0,0 @@
-{
-  "component": true
-}

+ 0 - 1
miniprogram_npm/lottie-miniapp/component/lottie.wxml

@@ -1 +0,0 @@
-<canvas canvas-id="lottie-canvas" class="lottie-canvas"></canvas>

+ 0 - 4
miniprogram_npm/lottie-miniapp/component/lottie.wxss

@@ -1,4 +0,0 @@
-.lottie-canvas {
-  width: 100%;
-  height: 100%;
-}

File diff suppressed because it is too large
+ 0 - 1
miniprogram_npm/lottie-miniapp/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/regenerator-runtime/index.js


File diff suppressed because it is too large
+ 295 - 294
miniprogram_npm/tslib/index.js


File diff suppressed because it is too large
+ 3 - 2
miniprogram_npm/wolfy87-eventemitter/index.js


+ 0 - 5
package-lock.json

@@ -106,11 +106,6 @@
       "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
       "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
     },
-    "lottie-miniapp": {
-      "version": "1.9.0-0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/lottie-miniapp/-/lottie-miniapp-1.9.0-0.tgz",
-      "integrity": "sha512-oQRgOO6xAkqWu8NqylBFZcmRAYdhQH2E0IreoyDJ83ggrNRMGMrMq/j4M2U/a97DIt54iB7kBYMiHhU4fVaffw=="
-    },
     "regenerator-runtime": {
       "version": "0.13.7",
       "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",

+ 1 - 2
package.json

@@ -9,7 +9,6 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "@antv/f2-canvas": "^1.0.5",
-    "lottie-miniapp": "^1.9.0-0"
+    "@antv/f2-canvas": "^1.0.5"
   }
 }

+ 3 - 3
pages/adjust/index.wxml

@@ -45,7 +45,7 @@
                 <view class="spacestate flex_row">
                     {{spaceDetail.state}}
                     <view>
-                        <lottie wx:if="{{!feedBack}}" id="lottie{{spaceDetail.id}}" canId="{{spaceDetail.id}}" animationData="{{statusList[spaceDetail.stateId].canvasDate}}" width="20" height="20"/>
+                        <!-- <lottie wx:if="{{!feedBack}}" id="lottie{{spaceDetail.id}}" canId="{{spaceDetail.id}}" animationData="{{statusList[spaceDetail.stateId].canvasDate}}" width="20" height="20"/> -->
                     </view>
                 </view>
             </view>
@@ -197,7 +197,7 @@
     <view class="feedback_box">
         <view class="feedimgbox flex_row">
             <view  class="lottie" >
-                <lottie id="lottie" animationData="{{spacestatusList[spaceStatusId].canvasDate}}" width="20" height="20"/>
+                <!-- <lottie id="lottie" animationData="{{spacestatusList[spaceStatusId].canvasDate}}" width="20" height="20"/> -->
             </view>
             <text class="feedtext_title">{{spaceStatus}}</text>
         </view>
@@ -277,7 +277,7 @@
     <view class="seconddetail">
         <view class="secondtxt flex_row secondtxt_title">
             <view class="lottie"  wx:if="{{!lottieShow}}">
-                <lottie id="lottieup" animationData="{{spacestatusList[secondIcon-1].canvasDate}}" width="25" height="25" />
+                <!-- <lottie id="lottieup" animationData="{{spacestatusList[secondIcon-1].canvasDate}}" width="25" height="25" /> -->
             </view>
             {{secondSpaceStatus || '空调无法频繁开关'}}
         </view>

+ 1 - 1
pages/detail/index.js

@@ -87,7 +87,7 @@ Page({
       throw "网络错误";
     }
     let {avg,propertyData,dayTarget}=res;
-    console.log(res,'返回数据集值');
+    // console.log(res,'返回数据集值');
     this.initChartdate(propertyData,dayTarget);
     let levelList=[];
 

+ 3 - 1
pages/index/index.wxml

@@ -57,7 +57,9 @@
                             <text wx:if="{{item.isPassengerPassShow}}" class="peoplestate {{item.isPassengerPass=='有人'?'activepeople':''}}">{{item.isPassengerPass}}</text>
                             <view class="spacestate flex_row">
                                 <text>{{item.state}}</text>
-                                <view hidden="{{!lottieShow}}"><lottie id="lottie{{item.id}}" animationData="{{statusList[item.stateId].canvasDate}}" width="25" height="25"/></view>
+                                <view hidden="{{!lottieShow}}">
+                                    <!-- <lottie id="lottie{{item.id}}" animationData="{{statusList[item.stateId].canvasDate}}" width="25" height="25"/> -->
+                                </view>
                             </view>
                         </view>
                         <view class="msg_right" catchtap="toDetail" data-istemp="{{true}}" data-spaceid="{{item.id}}" data-projectid="{{item.projectId}}">

+ 9 - 19
project.config.json

@@ -1,7 +1,8 @@
 {
-  "description": "项目配置文件",
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "packOptions": {
-    "ignore": []
+    "ignore": [],
+    "include": []
   },
   "setting": {
     "urlCheck": true,
@@ -39,46 +40,31 @@
     "disableUseStrict": false,
     "showES6CompileOption": false,
     "useCompilerPlugins": false,
-    "minifyWXML": true
+    "minifyWXML": true,
+    "useStaticServer": true
   },
   "compileType": "miniprogram",
   "libVersion": "2.11.1",
   "appid": "wxa2bf334720c47626",
   "projectname": "env-pc",
-  "debugOptions": {
-    "hidedInDevtools": []
-  },
-  "isGameTourist": false,
   "simulatorType": "wechat",
   "simulatorPluginLibVersion": {},
   "condition": {
-    "plugin": {
-      "list": []
-    },
-    "game": {
-      "list": []
-    },
-    "gamePlugin": {
-      "list": []
-    },
     "miniprogram": {
       "list": [
         {
-          "id": 0,
           "name": "pages/index/index",
           "pathName": "pages/index/index",
           "query": "",
           "scene": null
         },
         {
-          "id": -1,
           "name": "pages/adjust/index",
           "pathName": "pages/adjust/index",
           "query": "",
           "scene": null
         },
         {
-          "id": -1,
           "name": "pages/detail/index",
           "pathName": "pages/detail/index",
           "query": "",
@@ -104,5 +90,9 @@
         }
       ]
     }
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
   }
 }

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+  "projectname": "sagacloud-sagacare-miniprogram",
+  "setting": {
+    "compileHotReLoad": true
+  },
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
+}