guotianliang 4 years ago
parent
commit
dc6d07033a
100 changed files with 38541 additions and 2631 deletions
  1. 88 18
      app.js
  2. 16 4
      app.json
  3. 18 0
      app.wxss
  4. 202 0
      components/envchart/envchart.js
  5. 7 0
      components/envchart/envchart.json
  6. 7 0
      components/envchart/envchart.wxml
  7. 14 0
      components/envchart/envchart.wxss
  8. 27 0
      components/header/header.js
  9. 0 0
      components/header/header.json
  10. 5 0
      components/header/header.wxml
  11. 17 0
      components/header/header.wxss
  12. 18 0
      components/loading/loading.js
  13. 6 0
      components/loading/loading.json
  14. 6 0
      components/loading/loading.wxml
  15. 29 0
      components/loading/loading.wxss
  16. 3 31
      components/spacecard/index.js
  17. 2 1
      components/spacecard/index.json
  18. 6 3
      components/spacecard/index.wxml
  19. 9 0
      components/spacecard/index.wxss
  20. 0 30
      components/swiper-dots/index.js
  21. 0 5
      components/swiper-dots/index.wxml
  22. 0 23
      components/swiper-dots/index.wxss
  23. 0 165
      components/time-picker2/index.js
  24. 0 24
      components/time-picker2/index.wxml
  25. 0 4
      components/time-picker2/index.wxss
  26. 1142 0
      miniprogram_npm/@antv/adjust/index.js
  27. 1 0
      miniprogram_npm/@antv/adjust/index.js.map
  28. 6400 0
      miniprogram_npm/@antv/adjust/miniprogram_npm/@antv/util/index.js
  29. 1 0
      miniprogram_npm/@antv/adjust/miniprogram_npm/@antv/util/index.js.map
  30. 192 0
      miniprogram_npm/@antv/f2-canvas/index.js
  31. 0 0
      miniprogram_npm/@antv/f2-canvas/index.json
  32. 10 0
      miniprogram_npm/@antv/f2-canvas/index.wxml
  33. 5 0
      miniprogram_npm/@antv/f2-canvas/index.wxss
  34. 16116 0
      miniprogram_npm/@antv/f2/index.js
  35. 1 0
      miniprogram_npm/@antv/f2/index.js.map
  36. 39 0
      miniprogram_npm/@antv/gl-matrix/index.js
  37. 1 0
      miniprogram_npm/@antv/gl-matrix/index.js.map
  38. 1875 0
      miniprogram_npm/@antv/scale/index.js
  39. 1 0
      miniprogram_npm/@antv/scale/index.js.map
  40. 2252 0
      miniprogram_npm/@antv/util/index.js
  41. 1 0
      miniprogram_npm/@antv/util/index.js.map
  42. 296 0
      miniprogram_npm/@antv/util/miniprogram_npm/tslib/index.js
  43. 1 0
      miniprogram_npm/@antv/util/miniprogram_npm/tslib/index.js.map
  44. 12 0
      miniprogram_npm/@antv/wx-f2/index.js
  45. 1 0
      miniprogram_npm/@antv/wx-f2/index.js.map
  46. 413 0
      miniprogram_npm/fecha/index.js
  47. 1 0
      miniprogram_npm/fecha/index.js.map
  48. 2655 0
      miniprogram_npm/hammerjs/index.js
  49. 1 0
      miniprogram_npm/hammerjs/index.js.map
  50. BIN
      miniprogram_npm/lottie-miniapp/component/images/img_2.png
  51. 9 11
      miniprogram_npm/lottie-miniapp/component/lottie.js
  52. 1 2
      miniprogram_npm/lottie-miniapp/component/lottie.wxml
  53. 760 0
      miniprogram_npm/regenerator-runtime/index.js
  54. 1 0
      miniprogram_npm/regenerator-runtime/index.js.map
  55. 304 0
      miniprogram_npm/tslib/index.js
  56. 1 0
      miniprogram_npm/tslib/index.js.map
  57. 498 0
      miniprogram_npm/wolfy87-eventemitter/index.js
  58. 1 0
      miniprogram_npm/wolfy87-eventemitter/index.js.map
  59. 122 0
      package-lock.json
  60. 1 0
      package.json
  61. 779 0
      pages/adjust/index.js
  62. 13 0
      pages/adjust/index.json
  63. 656 0
      pages/adjust/index.less
  64. 279 0
      pages/adjust/index.wxml
  65. 607 0
      pages/adjust/index.wxss
  66. 124 0
      pages/adjustlog/index.js
  67. 5 0
      pages/adjustlog/index.json
  68. 47 0
      pages/adjustlog/index.less
  69. 28 0
      pages/adjustlog/index.wxml
  70. 47 0
      pages/adjustlog/index.wxss
  71. 36 119
      pages/auth/index.js
  72. 3 3
      pages/auth/index.wxml
  73. 129 0
      pages/detail/index.js
  74. 6 0
      pages/detail/index.json
  75. 130 0
      pages/detail/index.less
  76. 48 0
      pages/detail/index.wxml
  77. 126 0
      pages/detail/index.wxss
  78. 0 253
      pages/efficient/index.js
  79. 0 12
      pages/efficient/index.json
  80. 0 54
      pages/efficient/index.wxml
  81. 0 97
      pages/efficient/index.wxss
  82. 243 0
      pages/feedback/index.js
  83. 7 0
      pages/feedback/index.json
  84. 179 0
      pages/feedback/index.less
  85. 78 0
      pages/feedback/index.wxml
  86. 161 0
      pages/feedback/index.wxss
  87. 358 866
      pages/index/index.js
  88. 3 15
      pages/index/index.json
  89. 288 0
      pages/index/index.less
  90. 94 209
      pages/index/index.wxml
  91. 211 392
      pages/index/index.wxss
  92. 15 73
      pages/projectlist/index.js
  93. 74 142
      pages/search/index.js
  94. 2 7
      pages/search/index.json
  95. 26 0
      pages/search/index.less
  96. 17 32
      pages/search/index.wxml
  97. 18 36
      pages/search/index.wxss
  98. 98 0
      pages/spacelist/index.js
  99. 11 0
      pages/spacelist/index.json
  100. 0 0
      pages/spacelist/index.wxml

+ 88 - 18
app.js

@@ -1,34 +1,104 @@
 //app.js
 const AUTH = require('utils/auth')
 App({
-   onLaunch:async function () {
-    // 处理登录
-    // 自动登录
-    // await AUTH.checkHasLogined().then(async isLogined => {
-    //   if (!isLogined) {
-    //     AUTH.login().then(async res=>{
-    //       api.getopenId(res.code).then((res)=>{
-    //         let openId = res.data.openId;
-    //         this.globalData.openId= openId;
-    //         wx.setStorageSync({
-    //           data: openId,
-    //           key: 'openId',
-    //         })
-    //         this.check();
-    //       });
-    //     });
-    //   }
-    // })
+  initUiGlobal() {
+    wx.getSystemInfo({
+      success: e => {
+        const { statusBarHeight: StatusBar, screenHeight, windowWidth } = e
+        this.globalData.StatusBar = StatusBar
+        this.globalData.screenHeight = screenHeight
+        this.globalData.windowWidth = windowWidth
+        const capsule = wx.getMenuButtonBoundingClientRect()
+        if (capsule) {
+          this.globalData.Custom = capsule
+          this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight
+        } else {
+          this.globalData.CustomBar = StatusBar + 50
+        }
+      }
+    })
+  },
+  checkUpdate(){
+    const updateManager = wx.getUpdateManager()
+    updateManager.onCheckForUpdate(function (res) {
+      // 请求完新版本信息的回调
+      console.log(res.hasUpdate)
+    })
+    updateManager.onUpdateReady(function () {
+      wx.showModal({
+        title: '更新提示',
+        content: '新版本已经准备好,是否重启应用?',
+        success(res) {
+          if (res.confirm) {
+            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+            updateManager.applyUpdate()
+          }
+        }
+      })
+    })
+    updateManager.onUpdateFailed(function () {
+      // 新版本下载失败
+    })
+  },
+  onLaunch:async function () {
+    this.initUiGlobal();
+    this.checkUpdate();
   },
   globalData: {
+    StatusBar: null,
+    Custom: null,
+    CustomBar: null,
+    screenHeight: null,
+    windowWidth: null,
     userInfo: null,
     hasUserInfo:false,
     openId:null,
     userId:null,
     projectId:"",
     tenantId:"",
+    remote:false,
     tenants:[],
     projectName:null,
+    topSpace:null,
+    changeTenantId:false,
+    goHome:false,
+    picInitUrl:"../../static/images/initpic.png",
     imgbaseUrl:"http://api.sagacloud.cn/dp-auxiliary/image-service/common/image_get?systemId=dataPlatform&key=",
+    envNamelist:{
+      // temperature:{
+      //   name:"温度",
+      //   unit:"°C",
+      //   funcid:"Tdb"
+      //   imgSrc:"../../static/images/Temp.png"
+      // },
+      humidity:{
+        name:"湿度",
+        localName:"湿度",
+        unit:"%",
+        funcid:"RH",
+        imgSrc:"../../static/images/RH.png"
+      },
+      co2:{
+        name:"CO₂",
+        unit:"ppm",
+        localName:"CO₂",
+        funcid:"CO2",
+        imgSrc:"../../static/images/CO2.png"
+      },
+      pm25:{
+        name:"PM2.5",
+        localName:"PM2.5",
+        unit:"μg/m³",
+        funcid:"PM2d5",
+        imgSrc:"../../static/images/PM2.5.png"
+      },
+      hcho:{
+        name:"甲醛",
+        localName:"甲醛",
+        unit:"mg/m³",
+        funcid:"HCHO",
+        imgSrc:"../../static/images/HCHO.png"
+      },
+    },
   }
 })

+ 16 - 4
app.json

@@ -1,16 +1,28 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/adjust/index",
     "pages/search/index",
-    "pages/efficient/index",
     "pages/auth/index",
-    "pages/projectlist/index"
+    "pages/projectlist/index",
+    "pages/detail/index",
+    "pages/usercenter/index",
+    "pages/feedback/index",
+    "pages/spacelist/index",
+    "pages/adjustlog/index"
   ],
   "window": {
     "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#191b26",
+    "navigationBarBackgroundColor": "#ffffff",
     "navigationBarTitleText": "WeChat",
-    "navigationBarTextStyle": "white"
+    "navigationBarTextStyle": "black"
+  },
+  "usingComponents": {
+    "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"
   },
   "style": "v2",
   "sitemapLocation": "sitemap.json",

+ 18 - 0
app.wxss

@@ -7,4 +7,22 @@ page,view,text,swiper,swiper-item,image,navigator{
 /* 定义主题颜色 */
 page{
   --themeColor:#191B26;
+  --nodateColor:#eeeeee;
 }
+.flex_column{
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+.flex_row{
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+}
+.one-line-text {
+  overflow: hidden;
+  text-overflow:ellipsis;
+  white-space: nowrap;
+}

+ 202 - 0
components/envchart/envchart.js

@@ -0,0 +1,202 @@
+
+let chart = null;
+function deteleNull(arr){
+  let brr=[];
+  arr.forEach(item => {
+      if(item!==null){
+      brr.push(item)
+    }
+  })
+  return brr
+}
+let envTypelist={
+  hcho:{
+    min:0,
+    max:0.2
+  },
+  pm25:{
+    min:0,
+    max:100
+  }
+}
+function chartFn(data=[],envType,envName) {
+  function onInitChart(canvas, width, height, F2) {
+    // const data = data;
+    // const data = [
+    //   { time: "1951",release:0, sales: 38,标准区间: [ 25, 45 ] },
+    //   { time: "1952",release:1, sales: 52,标准区间: [ 25, 35 ] },
+    //   { time: "1956",release:2, sales: 61,标准区间: [ 25, 45 ] },
+    //   { time: "1957",release:3, sales: 26,标准区间: [ 25, 45 ] },
+    //   { time: "1958",release:4, sales: 48,标准区间: [ 25, 45 ] },
+    //   { time: "1959",release:5, sales: 30,标准区间: [ 25, 45 ] },
+    //   { time: "1960",release:6, sales: 38,标准区间: [ 25, 45 ] },
+    //   { time: "1962",release:7, sales: 20,标准区间: [ 25, 45 ] },
+    //   { time: "1964",release:8, sales: null,标准区间: [ 25, 45 ]},
+    //   { time: "1966",release:9, sales: 38,标准区间: [ 25, 45 ] },
+    //   { time: "1968",release:10, sales: 38,标准区间: [ 25, 45 ] },
+    //   { time: "1970",release:11, sales: 20,标准区间: [ 30, 45 ] },
+    //   { time: "1972",release:12, sales: 20,标准区间: [ 30, 45 ] },
+    // ];
+    let maxTemp;
+    let minTemp;
+    console.log(envTypelist[envType],envType,"envType")
+    if(envTypelist[envType]){
+      maxTemp=envTypelist[envType].max;
+      minTemp=envTypelist[envType].min;
+    }else{
+      let envArr= [];
+      data.forEach(item=>{
+          envArr = envArr.concat(item['标准区间'])
+          envArr.push(item.sales)
+      })
+      envArr = deteleNull(envArr);
+      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,
+      height,
+    });
+
+    chart.source(data, {
+      // release: {
+      //   range: [ 0.05, 0.95 ],
+      //   min: (dataIndex+10)>data.length?(data.length-10):dataIndex, // 设置刚开始显示的区间 0-5
+      //   max: (dataIndex+10)>data.length?data.length:dataIndex+10
+      // },
+      sales:{
+        min: minTemp,
+        max: maxTemp
+      },
+      '标准区间':{
+        min: minTemp,
+        max: maxTemp
+      }
+    });
+
+    chart.tooltip({
+      showCrosshairs: true,
+      showItemMarker: false,
+      background: {
+        radius: 2,
+        fill: '#1890FF',
+        padding: [ 3, 5 ]
+      },
+      nameStyle: {
+        fill: '#fff'
+      },
+      onShow: function onShow(ev) {
+        const items = ev.items;
+        // console.log(items)
+        let time = items[0].origin.time;
+        items[0].name = time?`${time} 区间`:'区间';
+        if(items[1]&&items[1].name){
+          items[1].name = envName
+        }
+        // items[1].name?(items[1].name = envName);
+        return (ev.items = ev.items.splice(2));
+      }
+    });
+
+    // 定义进度条
+    // chart.scrollBar({
+    //   mode: 'x',
+    //   xStyle: {
+    //     offsetY: -5
+    //   }
+    // });
+    // chart.interaction('pan',{
+    //   mode: 'x',
+    //   // step: 2,
+    //   pressTime:0,
+    //   onStart:function(){
+
+    //   },
+    //   onEnd:function(){
+
+    //   },
+
+    // });
+    chart.axis('release', {
+      label: function label(text) {
+        return {
+          fontSize: 10,
+          color:'#C3C6CB',
+          text: (data[text]&&data[text].time)?data[text].time:''
+        };
+      }
+    });
+    chart.axis('sales', {
+      label: function label(text) {
+        return {
+          text: ''
+        };
+      }
+    });
+    chart.interval().position('release*标准区间').color('#B2E6F2').size(3);
+    chart.line().position('release*sales').color('#04B49C').size(1);
+    chart.point().position('release*sales').style({
+      lineWidth: 1,
+      stroke: '#04B49C',
+    }).size(0.6);
+    chart.render();
+    return chart;
+  }
+  return onInitChart;
+}
+
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    tragetChart:{
+      type:Array,
+      value:()=>{return []},
+      observer: '_onRefresh'
+    },
+    targetIndex:{
+      type:Number,
+      value:0
+    },
+    envType:{
+      type:String,
+      value:''
+    },
+    envName:{
+      type:String,
+      value:''
+    }
+  },
+  lifetimes: {
+    attached:function (){
+      // let chartdom = this.selectComponent('#envchart')
+      // if(this.data.tragetChart&&this.data.tragetChart.length){
+      //   console.log(this.data.targetIndex,this.data.tragetChart,"this.data.targetIndex")
+      //   chartdom.init(chartFn(this.data.tragetChart,this.data.targetIndex))
+      // }
+    },
+    detached: function() {
+
+    },
+  },
+  updateChart(data){
+    // let chartdom = this.selectComponent('#envchart')
+    // this.setdata({'opts.onInit':chartFn(this.data.tragetChart)})
+  },
+  data: {
+    opts:{
+      lazyLoad: true,
+      // onInit: chartFn
+    }
+  },
+  methods: {
+    _onRefresh(){
+      let chartdom = this.selectComponent('#envchart');
+      chartdom.init(chartFn(this.data.tragetChart,this.data.envType,this.data.envName));
+    }
+  }
+})

+ 7 - 0
components/envchart/envchart.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "f2": "@antv/f2-canvas",
+    "van-loading": "../../vant-weapp/dist/loading/index"
+  }
+}

+ 7 - 0
components/envchart/envchart.wxml

@@ -0,0 +1,7 @@
+
+<view class="container">
+  <!-- <view class="nodate flex_row" wx:if="{{tragetChart&&!tragetChart.length}}">
+    暂无数据
+  </view> -->
+  <f2 class="f2-chart" id="envchart" opts="{{opts}}" />
+</view>

+ 14 - 0
components/envchart/envchart.wxss

@@ -0,0 +1,14 @@
+.container{
+  /* width: 3000px; */
+  width: 100%;
+  height: 360rpx;
+}
+.nodate{
+  width: 100%;
+  height: 360rpx;
+}
+.f2-chart {
+  width: 100%;
+  /* width: 3000px; */
+  height: 360rpx;
+}

+ 27 - 0
components/header/header.js

@@ -0,0 +1,27 @@
+import $ from './../../utils/Tool'
+
+Component({
+  properties:{
+    customClass:{
+        type:Boolean,
+        value:false
+    },
+  },
+  lifetimes: {
+    attached: function() {
+      // 在组件实例进入页面节点树时执行
+    },
+    detached: function() {
+      // 在组件实例被从页面节点树移除时执行
+      this.setData({"customClass":false})
+    },
+  },
+  options: {
+    addGlobalClass: true,
+    multipleSlots: true
+  },
+  data: {
+    StatusBar: $.store.get('StatusBar'),
+    CustomBar: $.store.get('CustomBar')
+  }
+})

components/swiper-dots/index.json → components/header/header.json


+ 5 - 0
components/header/header.wxml

@@ -0,0 +1,5 @@
+<view class='header {{customClass?"customheader":""}}'  style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
+  <view class="content" style="top:{{StatusBar}}px;">
+    <slot name="content"></slot>
+  </view>
+</view>

+ 17 - 0
components/header/header.wxss

@@ -0,0 +1,17 @@
+.header {
+  width: 100%;
+  box-sizing: border-box;
+  background:rgba(255, 255, 255);
+}
+.customheader{
+  background:rgba(255, 255, 255,0);
+}
+.header_custom{
+  float: left;
+}
+.content {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+}

+ 18 - 0
components/loading/loading.js

@@ -0,0 +1,18 @@
+Component({
+  options: {
+    addGlobalClass: true
+  },
+  data: {
+    show: false,
+    mask: false,
+    loadingText: '加载中···'
+  },
+  methods: {
+    show(loadingText, mask) {
+      this.setData({ loadingText, show: true, mask })
+    },
+    hide() {
+      this.setData({ show: false, mask: false })
+    }
+  }
+})

+ 6 - 0
components/loading/loading.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-loading": "../../vant-weapp/dist/loading/index"
+  }
+}

+ 6 - 0
components/loading/loading.wxml

@@ -0,0 +1,6 @@
+<view wx:if="{{show}}" class="mask" style="background-color:{{mask?'rgba(255, 255, 255, 0.4)':'transparent'}}">
+  <view class="loading">
+    <van-loading type="spinner" color="#1989fa" />
+    <text class="loading-text">{{loadingText}}</text>
+  </view>
+</view>

+ 29 - 0
components/loading/loading.wxss

@@ -0,0 +1,29 @@
+.mask {
+  position: absolute;
+  height: 100vh;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 999;
+}
+
+.loading {
+  display: flex;
+  flex-direction: column;
+  position: absolute;
+  align-items: center;
+  width: 100%;
+  top: 45vh;
+}
+
+.loading-icon {
+  width: 44rpx;
+  height: 44rpx;
+}
+
+.loading-text {
+  margin-top: 28rpx;
+  font-size: 28rpx;
+  color: #333333;
+}

File diff suppressed because it is too large
+ 3 - 31
components/spacecard/index.js


+ 2 - 1
components/spacecard/index.json

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

+ 6 - 3
components/spacecard/index.wxml

@@ -6,19 +6,22 @@
 	<view class="card_box" bindtap="goHome">
 		<view class="card_img">
 		<!-- 1592813009674.jpg -->
-			<image src="{{cardDate.picInit}}" wx:if="{{!imgShow}}"></image>
+			<view wx:if="{{!imgShow}}" class="picinit">
+				<!-- <van-loading type="spinner" color="#1989fa" size="18"/> -->
+				 <image src="{{picInitUrl}}" lazy-load="{{true}}" wx:if="{{!item.pic}}"/>
+			</view>
+			<!-- <image src="{{cardDate.picInit}}" wx:if="{{!imgShow}}"></image> -->
 			<image src="{{imgbaseUrl+cardDate.pic}}&width=136&height=108" wx:if="{{cardDate.pic}}" class='{{imgShow ? "" : "before-load"}}'  bindload="imageLoad" lazy-load="{{true}}"></image>
 			<!-- <view wx:if="{{!cardDate.pic}}" class="noimgbox">暂无图片</view> -->
 		</view>
 		<view class="card_msg">
 			<view>
 				<text>{{cardDate.localName}}</text>
-				<van-icon name="{{cardDate.subscribe?'star':'star-o'}}" wx:if="{{!isCheckbox}}" catchtap="changeStar" data-checked="{{cardDate.subscribe}}" color="{{cardDate.subscribe?'#f5a900':''}}" />
 			</view>
 			<view>
 				<view class="imgbox">
 					<view  class="lottie {{canvashidden?'':lottiehidden}}" wx:if="{{canvashidden}}">
-					<lottie id="lottie" canId="{{cardDate.id}}" animationData="{{statusList[cardDate.stateId].canvasDate}}" width="25" height="25"/></view>
+					<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>
 				</view>

+ 9 - 0
components/spacecard/index.wxss

@@ -10,6 +10,14 @@
   border-radius:8rpx;
   overflow: hidden;
 }
+.picinit{
+  width:136rpx;
+  height: 108rpx;
+  background:#ccc;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
 .noimgbox{
   width: 100%;
   height: 100%;
@@ -36,6 +44,7 @@
 .imgbox{
   display: flex;
   align-items: center;
+  transform: translateZ(0)
 }
 .imgbox image{
   width: 40rpx;

+ 0 - 30
components/swiper-dots/index.js

@@ -1,30 +0,0 @@
-// components/swiper-dots/index.js
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    swiperCurrent:{
-      type:Number,
-      value:0
-    },
-    swiperNum:{
-      type:Number,
-      value:1
-    }
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-
-  }
-})

+ 0 - 5
components/swiper-dots/index.wxml

@@ -1,5 +0,0 @@
-<view class="dots" wx:if="{{swiperNum!==1}}"> 
-    <view>
-      <view wx:for="{{swiperNum}}" class="dot{{index == swiperCurrent ? ' active' : ''}}"  wx:key="{{index}}"></view> 
-    </view> 
-  </view>

+ 0 - 23
components/swiper-dots/index.wxss

@@ -1,23 +0,0 @@
-/* components/swiper-dots/index.wxss */
-.dots{
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-.dots>view view{
-  display: inline-block;
-}
-
-.dots .dot{ 
-  margin: 0 8rpx; 
-  width: 8rpx; 
-  height: 8rpx; 
-  background: #D8D8D8; 
-  border-radius: 4rpx; 
-  transition: all .6s; 
-} 
-.dots .dot.active{ 
-  width:32rpx;
-  border-radius:4rpx;
-  background: #5575FF;
-}

+ 0 - 165
components/time-picker2/index.js

@@ -1,165 +0,0 @@
-import util from "../../utils/util";
-const date = new Date()
-const days = ["今天", "明天"]
-// 初始化日期
-for (var i = 2; i <= 15; i++) {
-  var date1 = new Date(date);
-  date1.setDate(date.getDate() + i);
-  var md = (date1.getMonth() + 1) + "-" + date1.getDate();
-  days.push(md);
-}
-
-function getDistanceSpecifiedTime(yyyy,mth,dd) {
-  // 指定日期和时间
-  var EndTime = new Date(yyyy,mth,dd);
-  // 当前系统时间
-  var NowTime = new Date();
-  var NowTimeday = NowTime.getDay();
-  var EndTimeday = EndTime.getDay();
-  var t = EndTime.getTime() - NowTime.getTime();
-  var d = Math.ceil(t / 1000 / 60 / 60 / 24);
-  console.log(NowTimeday,EndTimeday);
-  if(NowTimeday==EndTimeday){
-    d=0;
-  }else if(NowTimeday!=EndTimeday&&d==0){
-    d=1
-  }
-  // var h = Math.floor(t / 1000 / 60 / 60 % 24);
-  // var m = Math.floor(t / 1000 / 60 % 60);
-  // var s = Math.floor(t / 1000 % 60);
-  // var html = d + " 天" + h + " 时" + m + " 分" + s + " 秒";
-  return d;
-}
-
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    nextOpenTime:{
-      type:String,
-      value:''
-    }
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    days,
-    hours: [],
-    minutes: [],
-    minute: 2,
-    hour: 8,
-    day: 2,
-    multiIndex: [0, 0, 0],
-    
-  },
-  attached() {
-    this.loadTime("today",0);
-    if(this.data.nextOpenTime){ 
-      let nextHour=this.data.nextOpenTime.substring(8,10);
-      let nextMin=this.data.nextOpenTime.substring(10,12);
-      var day = getDistanceSpecifiedTime(this.data.nextOpenTime.substring(0,4),this.data.nextOpenTime.substring(4,6)-1,this.data.nextOpenTime.substring(6,8));
-      if(day == 0){
-        let currentHours = date.getHours();
-        let currentMinute = date.getMinutes();
-        this.setData({multiIndex:[0,nextHour - currentHours,currentMinute-nextMin]})
-      }else if(day == 1){
-        this.loadTime();
-        this.setData({multiIndex:[1,Number(nextHour),Number(nextMin)]});
-      }else{
-        console.log(day,"day")
-        this.loadTime();
-        this.setData({multiIndex:[day,nextHour,nextMin]});
-      }
-
-    }
-    console.log(this.data.multiIndex);
-    
-  },
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    bindChange(e) {
-      const val = e.detail.value;
-      console.log(e)
-      if (val[0] !== 0) {
-        this.loadTime();
-      }else{
-        this.loadTime("today",e.detail.value[1]);
-      }
-      this.setData({
-        day: this.data.days[val[0]],
-        hour: this.data.hours[val[1]],
-        minute: this.data.minutes[val[2]]
-      })
-      this.sendDate();
-    },
-    fillZore(value){
-      if(value<10){
-        value = 0+value
-      }
-      return value
-    },
-    // 发送数据
-    sendDate(){
-      var monthDay=this.data.day;
-      var dayHour=this.data.hour;
-      var dayMinute=this.data.minute;
-      var monthDaystring='2020';
-      if ( monthDay=== "今天") {
-        var month = date.getMonth() + 1;
-        var day = date.getDate();
-        monthDaystring=monthDaystring+util.PrefixZero(month)+util.PrefixZero(day)+util.PrefixZero(dayHour)+util.PrefixZero(dayMinute);
-        monthDay = monthDay + dayHour +':'+dayMinute;
-      } else if (monthDay === "明天") {
-        var date1 = new Date(date);
-        date1.setDate(date.getDate() + 1);
-        monthDaystring=monthDaystring+util.PrefixZero(date1.getMonth() + 1)+util.PrefixZero(date1.getDate())+util.PrefixZero(dayHour)+util.PrefixZero(dayMinute);
-        monthDay = monthDay + dayHour +':'+dayMinute;
-      } else {
-        var month = monthDay.split("-")[0]; // 返回月
-        var day = monthDay.split("-")[1]; // 返回日
-        monthDaystring=monthDaystring+util.PrefixZero(month)+util.PrefixZero(day)+util.PrefixZero(dayHour)+util.PrefixZero(dayMinute);
-        monthDay = month + "月" + day + "日"+ dayHour +':'+dayMinute;
-      }
-      monthDaystring=monthDaystring+'00';
-      this.triggerEvent('timeChange', {monthDay,monthDaystring});
-    },
-    loadTime(value,now) {
-      let hours=[];
-      let minutes=[];
-      var startHours = 0;
-      var startMinute = 0;
-      if(value==="today"){
-        var currentHours = date.getHours();
-        var currentMinute = date.getMinutes();
-        startHours=currentHours;
-        startMinute=now===0?currentMinute:0;
-      }
-      // 初始化小时
-      for (let i = startHours; i <= 23; i++) {
-        if (i < 10) {
-          hours.push('0' + i)
-        } else {
-          hours.push(i)
-        }
-      }
-      // 初始化分钟
-      for (let i = startMinute; i <= 59; i++) {
-        if (i < 10) {
-          minutes.push('0' + i)
-        } else {
-          minutes.push(i)
-        }
-      }
-      var data={
-        hours:hours,
-        minutes:minutes,
-      }
-      this.setData(data)
-    },
-  }
-})

+ 0 - 24
components/time-picker2/index.wxml

@@ -1,24 +0,0 @@
-<view class="container">
-		<view class="page-body">
-			<picker-view indicator-style="height: 64px;" style="width: 100%; height: 340rpx;" value="{{multiIndex}}" bindchange="bindChange">
-				<picker-view-column>
-					<view wx:for="{{days}}" wx:key="{{index}}" class="center_box">{{item}}</view>
-				</picker-view-column>
-				<picker-view-column>
-					<view wx:for="{{hours}}" wx:key="{{index}}" class="center_box">{{item}}</view>
-				</picker-view-column>
-				<picker-view-column>
-					<view wx:for="{{minutes}}" wx:key="{{index}}" class="center_box">{{item}}</view>
-				</picker-view-column>
-				<!-- <picker-view-column>
-					<view class="icon-container center_box">
-              AM
-					</view>
-					<view class="icon-container center_box">
-						PM
-					</view>
-				</picker-view-column> -->
-			</picker-view>
-		</view>
-
-	</view>

+ 0 - 4
components/time-picker2/index.wxss

@@ -1,4 +0,0 @@
-/* components/time-picker/index.wxss */
-.center_box{
-  line-height: 64px; text-align: center;
-}

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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/adjust/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/adjust/miniprogram_npm/@antv/util/index.js.map


+ 192 - 0
miniprogram_npm/@antv/f2-canvas/index.js

@@ -0,0 +1,192 @@
+module.exports =
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _wxF = __webpack_require__(1);
+
+var _wxF2 = _interopRequireDefault(_wxF);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    canvasId: {
+      type: String,
+      value: 'f2-canvas'
+    },
+
+    opts: {
+      type: Object
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {},
+
+  ready: function ready() {
+    if (!this.data.opts) {
+      console.warn('组件需绑定 opts 变量,例:<ff-canvas id="mychart-dom-bar" canvas-id="mychart-bar" opts="{{ opts }}"></ff-canvas>');
+      return;
+    }
+
+    if (!this.data.opts.lazyLoad) {
+      this.init();
+    }
+  },
+
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    init: function init(callback) {
+      var _this = this;
+
+      var version = wx.version.version.split('.').map(function (n) {
+        return parseInt(n, 10);
+      });
+      var isValid = version[0] > 1 || version[0] === 1 && version[1] > 9 || version[0] === 1 && version[1] === 9 && version[2] >= 91;
+      if (!isValid) {
+        console.error('微信基础库版本过低,需大于等于 1.9.91。');
+        return;
+      }
+
+      var ctx = wx.createCanvasContext(this.data.canvasId, this); // 获取小程序上下文
+      var canvas = new _wxF2.default.Renderer(ctx);
+      this.canvas = canvas;
+
+      var query = wx.createSelectorQuery().in(this);
+      query.select('.f2-canvas').boundingClientRect(function (res) {
+        if (typeof callback === 'function') {
+          _this.chart = callback(canvas, res.width, res.height, _wxF2.default);
+        } else if (_this.data.opts && _this.data.opts.onInit) {
+          _this.chart = _this.data.opts.onInit(canvas, res.width, res.height, _wxF2.default);
+        }
+      }).exec();
+    },
+    touchStart: function touchStart(e) {
+      if (this.canvas) {
+        this.canvas.emitEvent('touchstart', [e]);
+      }
+    },
+    touchMove: function touchMove(e) {
+      if (this.canvas) {
+        this.canvas.emitEvent('touchmove', [e]);
+      }
+    },
+    touchEnd: function touchEnd(e) {
+      if (this.canvas) {
+        this.canvas.emitEvent('touchend', [e]);
+      }
+    },
+    press: function press(e) {
+      if (this.canvas) {
+        this.canvas.emitEvent('press', [e]);
+      }
+    }
+  }
+}); // f2-canvas.js
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+module.exports = require("@antv/wx-f2");
+
+/***/ })
+/******/ ]);

components/time-picker2/index.json → miniprogram_npm/@antv/f2-canvas/index.json


+ 10 - 0
miniprogram_npm/@antv/f2-canvas/index.wxml

@@ -0,0 +1,10 @@
+<canvas
+  class="f2-canvas"
+  canvas-id="{{ canvasId }}"
+  bindinit="init"
+  bindtouchstart="touchStart"
+  bindtouchmove="touchMove"
+  bindtouchend="touchEnd"
+  bindlongtap="press"
+>
+</canvas>

+ 5 - 0
miniprogram_npm/@antv/f2-canvas/index.wxss

@@ -0,0 +1,5 @@
+/* f2-canvas.wxss */
+.f2-canvas {
+  width: 100%;
+  height: 100%;
+}

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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/f2/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/gl-matrix/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/scale/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/util/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/util/miniprogram_npm/tslib/index.js.map


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/@antv/wx-f2/index.js.map


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


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


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


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


BIN
miniprogram_npm/lottie-miniapp/component/images/img_2.png


+ 9 - 11
miniprogram_npm/lottie-miniapp/component/lottie.js

@@ -35,20 +35,17 @@ Component({
     autoplay: {
       type: Boolean,
       value: true
-    },
-    canId:{
-      type:String,
-      value:'0'
     }
   },
   ready: function ready() {
-    this.init.bind(this);
+    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) {
@@ -56,18 +53,19 @@ Component({
       }
 
       this.destory();
-      var that=this;
-      var canvasContext = _index.api.createCanvasContext(`test-canvas`, that);
+
+      var canvasContext = _index.api.createCanvasContext('lottie-canvas', this);
       canvasContext.canvas = {
         width: width,
         height: height
       };
 
-      that.lottie = _index2.default.loadAnimation({
+      this.lottie = _index2.default.loadAnimation({
         renderer: 'canvas', // 只支持canvas
-        loop: that.data.loop,
-        autoplay: that.data.autoplay,
+        loop: this.data.loop,
+        autoplay: this.data.autoplay,
         animationData: data,
+        path: dataPath,
         rendererSettings: {
           context: canvasContext,
           clearCanvas: true
@@ -82,6 +80,6 @@ Component({
     }
   },
   detached: function detached() {
-    this.destory.bind(this);
+    this.destory();
   }
 });

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

@@ -1,2 +1 @@
-<canvas canvas-id="test-canvas" class="lottie-canvas"></canvas>
-<!-- {{canId}} -->
+<canvas canvas-id="lottie-canvas" class="lottie-canvas"></canvas>

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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/regenerator-runtime/index.js.map


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


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


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


File diff suppressed because it is too large
+ 1 - 0
miniprogram_npm/wolfy87-eventemitter/index.js.map


+ 122 - 0
package-lock.json

@@ -4,10 +4,132 @@
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
+    "@antv/adjust": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/@antv/adjust/-/adjust-0.1.1.tgz",
+      "integrity": "sha512-9FaMOyBlM4AgoRL0b5o0VhEKAYkexBNUrxV8XmpHU/9NBPJONBOB/NZUlQDqxtLItrt91tCfbAuMQmF529UX2Q==",
+      "requires": {
+        "@antv/util": "~1.3.1"
+      },
+      "dependencies": {
+        "@antv/util": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz",
+          "integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==",
+          "requires": {
+            "@antv/gl-matrix": "^2.7.1"
+          }
+        }
+      }
+    },
+    "@antv/f2": {
+      "version": "3.7.7",
+      "resolved": "https://registry.npmjs.org/@antv/f2/-/f2-3.7.7.tgz",
+      "integrity": "sha512-xv1K9BAN5t+PPu8RcpF36mLO/D19PIboddgMgR6Pdmp1PMVyyrT9uuV3SD+sxbn9iVDk2w6HtML30yGkmfkwnw==",
+      "requires": {
+        "@antv/adjust": "~0.1.1",
+        "@antv/scale": "~0.3.3",
+        "@antv/util": "~2.0.6",
+        "@babel/runtime": "^7.7.7",
+        "@types/hammerjs": "^2.0.36",
+        "hammerjs": "^2.0.8",
+        "type-fest": "^0.15.1"
+      }
+    },
+    "@antv/f2-canvas": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/@antv/f2-canvas/-/f2-canvas-1.0.5.tgz",
+      "integrity": "sha512-iE4u1kAcxGaluu1CA6F5R0/dfsCMhubEfOKvR6zRwGC9S9bCil0y6JNCsIkyPZGCQYkAtsg3WDlcu2yneyqUuw==",
+      "requires": {
+        "@antv/wx-f2": "^1.1.4"
+      }
+    },
+    "@antv/gl-matrix": {
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/@antv/gl-matrix/-/gl-matrix-2.7.1.tgz",
+      "integrity": "sha512-oOWcVNlpELIKi9x+Mm1Vwbz8pXfkbJKykoCIOJ/dNK79hSIANbpXJ5d3Rra9/wZqK6MC961B7sybFhPlLraT3Q=="
+    },
+    "@antv/scale": {
+      "version": "0.3.4",
+      "resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.4.tgz",
+      "integrity": "sha512-mZaf3MtMoQJtd+KAgTANVbvKpaXVpzLAFbKO/wSKaLFpnWO0bwMVDYzrs+5DZhfEfMbZpP/A7qUZ2/DLh0T3Tg==",
+      "requires": {
+        "@antv/util": "~2.0.3",
+        "fecha": "~4.2.0",
+        "tslib": "^2.0.0"
+      }
+    },
+    "@antv/util": {
+      "version": "2.0.9",
+      "resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.9.tgz",
+      "integrity": "sha512-JblWzne7msAPDdxkUhEk8zAz0Wd6igKwqymGbvIeyOydGrhBhGjA3nEayFj4IlG+XixCvGFKsCB4yuFS4glRIA==",
+      "requires": {
+        "tslib": "^1.10.0"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "1.14.1",
+          "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
+        }
+      }
+    },
+    "@antv/wx-f2": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/@antv/wx-f2/-/wx-f2-1.1.4.tgz",
+      "integrity": "sha512-XaMUwS16ONcpHIEK4yv6wOIxrwSqzhLx4di2kmumQI8xi5vZK1bslJCtjSaxbNS99febpZkZqgwgAmXOOrMYmA==",
+      "requires": {
+        "@antv/f2": "^3.3.3",
+        "wolfy87-eventemitter": "^5.2.4"
+      }
+    },
+    "@babel/runtime": {
+      "version": "7.12.1",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
+      "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
+      "requires": {
+        "regenerator-runtime": "^0.13.4"
+      }
+    },
+    "@types/hammerjs": {
+      "version": "2.0.36",
+      "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.36.tgz",
+      "integrity": "sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ=="
+    },
+    "fecha": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz",
+      "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg=="
+    },
+    "hammerjs": {
+      "version": "2.0.8",
+      "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",
+      "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
+    },
+    "tslib": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
+      "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
+    },
+    "type-fest": {
+      "version": "0.15.1",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.15.1.tgz",
+      "integrity": "sha512-n+UXrN8i5ioo7kqT/nF8xsEzLaqFra7k32SEsSPwvXVGyAcRgV/FUQN/sgfptJTR1oRmmq7z4IXMFSM7im7C9A=="
+    },
+    "wolfy87-eventemitter": {
+      "version": "5.2.9",
+      "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.9.tgz",
+      "integrity": "sha512-P+6vtWyuDw+MB01X7UeF8TaHBvbCovf4HPEMF/SV7BdDc1SMTiBy13SRD71lQh4ExFTG1d/WNzDGDCyOKSMblw=="
     }
   }
 }

+ 1 - 0
package.json

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

+ 779 - 0
pages/adjust/index.js

@@ -0,0 +1,779 @@
+import $ from './../../utils/Tool'
+import router from './../../utils/router'
+import {getSetting,getLocation} from './../../utils/auth'
+const AUTH = require('../../utils/auth')
+import icons from "../../utils/icon"
+import {getPropertyData,submitAdjust,getCurrentSeason} from '../../requests/api';
+import Toast from '../../vant-weapp/dist/toast/toast';
+import {
+  userCheck,
+  powerCheck,
+  getEquipmentAction,
+  getfeedBack,
+  getSpacedetail,
+  openSpace,
+  workLeave,
+  contactTenant
+} from "../../requests/api";
+let timer=null;
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    spaceDetail:null,
+    effectTime:-1,
+    statusList: icons.statusList,
+    spacestatusList:icons.spacestatusList,
+    spaceStatus: "",
+    spaceStatusId:null,
+    tempType: [
+      {
+        id: 1,
+        value: "有点冷",
+        checked: false,
+        imgSrc: "../../static/images/cold.png"
+      },
+      {
+        id: 3,
+        value: "有点热",
+        checked: false,
+        imgSrc: "../../static/images/hot.png"
+      },
+      {
+        id: 2,
+        value: "太冷了",
+        checked: false,
+        imgSrc: "../../static/images/severityCold.png"
+      },
+      {
+        id: 4,
+        value: "太热了",
+        checked: false,
+        imgSrc: "../../static/images/severityHot.png"
+      },
+    ],
+    windType: [{
+      id: 5,
+      value: '风太大',
+      checked: false,
+      imgSrc: "../../static/images/severityWind.png"
+    }],
+    windTypeValue:-1,
+    tempTypeValue:-1,
+    currentIndex:-1,
+    StandardMode:true, //模式选择
+    envNamelist:$.store.get("envNamelist"),
+    imgbaseUrl:$.store.get("imgbaseUrl"),
+    headerShow:false,
+    pageHight:0,
+    guideInit:false,
+    guideStep:1,
+    longitude:null,
+    latitude:null,
+    feedBack:false, //控制反馈弹窗
+    targetTemp:null,
+    trunAction:false,
+    equipmentStatustext:'',
+    equipmentStatus:null,
+    willAvg:null,
+    tragetChart:[],
+    tragetChartcopy:[],
+    customPlan:[],
+    customPlancopy:null,
+    planTemp:null,
+    trunupAction:false, //开机提示框
+    secondIcon:0,
+    secondSpaceStatus:null,
+    chartIndex:null,
+    targetIndex:0,
+    singleOffice:false,
+    nextOpenTime:'',
+    bgSeasonType:null,
+    havePower:{
+      result:"fail",
+      message:""
+    },
+    picInitUrl:$.store.get("picInitUrl"),
+  },
+  goBack(){
+    router.pop()
+  },
+  changeMode(){
+    if(this.data.spaceDetail.isClose.toString()!=="true"){
+      this.setData({StandardMode:!this.data.StandardMode},()=>{
+        if(!this.data.StandardMode){
+          this.setData({effectTime:-1})
+          this.getChartDate();
+        }
+      })
+    }
+  },
+  toDetail(e){
+    if(Object.keys(e.currentTarget.dataset).length){
+      router.push("detail",e.currentTarget.dataset)
+    }else{
+      router.push("detail",{name:"温度",
+      localname:"温度",
+      param:"temperature",
+      funcid:"Tdb",
+      spaceid:this.data.spaceDetail.id,
+      projectid:this.data.spaceDetail.projectId})
+    }
+  },
+  // 检查是否过引导
+  checkGuide(){
+    if(this.data.spaceDetail.isClose.toString()=="true"){
+      return
+    }
+    !$.storage.get('guideInit')&&this.getPageheight();
+    this.setData({'guideInit':!$.storage.get('guideInit')})
+  },
+  // 反馈数据
+  changeType(e) {
+    if(this.data.bgSeasonType=="Transition"){
+      wx.showModal({
+        title: '现在是过渡季不可调节',
+        showCancel: false,
+        confirmText:"我知道了",//默认是“确定”
+        // confirmColor: 'skyblue',//确定文字的颜色
+        success: function (res) {
+        },
+        fail: function (res) { },//接口调用失败的回调函数
+        complete: function (res) { },//接口调用结束的回调函数(调用成功、失败都会执行)
+     })
+      return ;
+    }
+    if(this.data.havePower.result!=="success"){
+      Toast.fail(this.data.havePower.message);
+      return
+    }
+    var currentIndex = e.currentTarget.dataset.index;
+    if (e.currentTarget.dataset.type === "temp") {
+      this.setData({
+        tempTypeValue: currentIndex,
+        currentIndex:currentIndex,
+        feedBack:true
+      });
+    } else {
+      this.setData({
+        windTypeValue: currentIndex,
+        currentIndex:currentIndex,
+        feedBack:true
+      });
+    }
+    let data = {
+      "projectId":this.data.spaceDetail.projectId, //项目id
+      "objectId": this.data.spaceDetail.id, //空间id
+      "valueType": 1, //固定为1
+      "itemId": currentIndex,
+      "model":this.data.StandardMode?1:2,
+      userId:$.store.get('userId')
+    }
+    getEquipmentAction(data).then(res => {
+      this.setData({
+        equipmentStatus: res.equipmentStatus
+      });
+      let textMsg = "";
+      let textMsgarr=[];
+      this.data.equipmentStatus.forEach(item => {
+        if (item.actions) {
+          item.actions.forEach(items => {
+            let textMsgobj={};
+            textMsgobj.name=item.localName;
+            textMsgobj.actions=items;
+            textMsgarr.push(textMsgobj);
+            textMsg = textMsg + item.localName + '--' + items + ' ';
+          })
+        }
+      })
+      this.setData({
+        equipmentStatustext: textMsgarr
+      });
+    })
+    getfeedBack(data).then(res => {
+      let notice = res.notice ? res.notice.split('。') : [];
+      this.setData({
+        spaceStatus: res.spaceStatus,
+        spaceStatusId: res.icon - 1,
+        notice: notice,
+        willAvg:res.avg||'--',
+      });
+      this.buildContact();
+    })
+  },
+  // 建立租户关联
+  buildContact(){
+    let currentTenantId=$.storage.get('tenantId');
+    if(currentTenantId!==this.data.spaceDetail.tenantId){
+      // 通过扫码改变租户
+      $.store.set('projectId',this.data.spaceDetail.projectId);
+      $.store.set('tenantId',this.data.spaceDetail.tenantId);
+      $.store.set('changeTenantId',true);
+      $.storage.set('projectId',this.data.spaceDetail.projectId);
+      $.storage.set('tenantId',this.data.spaceDetail.tenantId);
+    }
+    const data={
+      "userId":$.store.get('userId'),//用户id
+      "projectId":this.data.spaceDetail.projectId,//项目id
+      "spaceId":this.data.spaceDetail.id,//空间id
+      "openId":$.store.get('openId'),
+      flag:1
+    }
+    contactTenant(data).then(res=>{
+      console.log("成功")
+    })
+  },
+  // 下班节能
+  turnDown(){
+    if(this.data.havePower.result!=="success"){
+      Toast.fail(this.data.havePower.message);
+      return
+    }
+    let data = {
+      model:1,
+      "projectId":this.data.spaceDetail.projectId, //项目id
+      "objectId":[this.data.spaceDetail.id], //空间id
+      userId:$.store.get('userId'),
+      nextOpenTime:this.data.spaceDetail.nextOpenTime||"",
+    }
+    workLeave(data).then(res=>{
+      this.setData({trunAction:true});
+      this.buildContact();
+    })
+  },
+  // 重新开启
+  turnUp(){
+    if(this.data.havePower.result!=="success"){
+      Toast.fail(this.data.havePower.message);
+      return
+    }
+    let data = {
+      "projectId":this.data.spaceDetail.projectId, //项目id
+      "objectId": this.data.spaceDetail.id, //空间id
+      model:1,
+      userId:$.store.get('userId')
+    }
+    openSpace(data).then(res=>{
+      this.setData({
+        secondSpaceStatus: res.spaceStatus,
+        secondNotice: res.notice,
+        secondIcon: res.icon,
+        trunupAction: true
+      });
+      this.buildContact();
+    })
+  },
+  commitClose(){
+    this.setData({trunupAction:false},()=>{
+      this.isfeeded(true);
+      this.getDetail();
+    })
+  },
+  knowClick(){
+    this.setData({feedBack:false,tempTypeValue:-1,windTypeValue:-1,},()=>{
+      this.isfeeded();
+    });
+  },
+  knowCloseClick(){
+    this.setData({feedBack:false,trunAction:false},()=>{
+      this.getDetail();
+      this.isfeeded(true);
+    });
+  },
+  // 获取容器高度
+  getPageheight:function(){
+    let that =this;
+    wx.createSelectorQuery().select('#j_page').boundingClientRect(function(rect){
+      that.setData({'pageHight':rect.height})
+    }).exec()
+  },
+  //使页面滚动到容器底部
+  pageScrollToBottom: function() {
+    wx.pageScrollTo({
+      scrollTop: this.data.pageHight
+    })
+  },
+  // 步骤引导函数
+  nextStep(e){
+    if(this.data.guideStep==2){
+      $.storage.set('guideInit',true);
+      this.setData({'guideInit':false})
+    }
+    this.setData({'guideStep':2})
+    this.pageScrollToBottom();
+  },
+
+  async isGetSetting(value) {
+    let {authSetting} = await getSetting();
+    if(authSetting['scope.userLocation']){
+      await this.getUserLocation();
+    }else{
+      wx.showModal({
+        title: '是否授权当前位置',
+        content: '需要获取您的地理位置,请确认授权',
+        confirmColor: '#f16765',
+        success: res => {
+          if (res.confirm) {
+            wx.openSetting({
+              success: async data => {
+                  await this.getUserLocation();
+                  value&&this.checkPower();
+              },
+            })
+          } else {
+            this.setData({havePower: {result: "fail",message: "未定位到您的位置"}})
+          }
+        }
+      })
+    }
+  },
+  // 获取位置信息
+  async getUserLocation(cb) {
+    var that = this;
+    let {latitude,longitude} = await getLocation();
+    this.setData({latitude,longitude});
+  },
+  // 是否有操作权限
+  async checkPower() {
+    await this.isGetSetting('cb');
+    const data = {
+      "criteria": {
+        "projectId":this.data.spaceDetail.projectId,
+        "spaceId": this.data.spaceDetail.id,
+        "userId": $.store.get('userId'),
+        "tenantId": this.data.spaceDetail.tenantId,
+        "longitude": this.data.longitude,
+        "latitude": this.data.latitude
+      }
+    };
+    await powerCheck(data).then(res => {
+      this.setData({
+        havePower: res
+      })
+    })
+  },
+  // 获取实时曲线
+  async getChartDate(){
+    wx.showLoading({
+      title:"加载中"
+    });
+    let data={
+      projectId:this.data.spaceDetail.projectId,
+      spaceId:this.data.spaceDetail.id,
+      funcid:'Tdb'
+    }
+    let res = await getPropertyData(data);
+
+    if(!res){
+      throw "网络错误";
+    }
+    let {propertyData,dayTarget}=res;
+    // 获取期望温度
+    this.getHopeTemp(dayTarget).then(()=>{
+      this.initDaytarget(dayTarget);
+      this.initChartdate(propertyData,dayTarget);
+    });
+    wx.hideLoading();
+
+  },
+  initChartdate(propertyData,dayTarget){
+    if(!propertyData&&!propertyData.length&&dayTarget&&!dayTarget.length){
+      return ;
+    }
+    // 目标  { time: "1951",release:0, sales: 38,标准区间: [ 25, 45 ] },
+    let baseArr=propertyData&&propertyData.slice(1) || [];
+    let tragetChart = [];
+    baseArr.forEach(item=>{
+      item[1] = (item[1]=="-9999")?null:item[1];
+    })
+    if(baseArr.length===dayTarget.length){
+      dayTarget.forEach((item,index)=>{
+        let time ='';
+        item.time&&(time = item.time.slice(0,2)+':'+item.time.slice(2,4));
+        item['temperatureMin']&&(item['temperatureMin']=Number(item['temperatureMin'].toFixed(1)));
+        item['temperatureMax']&&(item['temperatureMax']=Number(item['temperatureMax'].toFixed(1)));
+        let initObj={
+          time:time,
+          release:index,
+          sales:baseArr[index][1],
+          标准区间:[item['temperatureMin'],item['temperatureMax']],
+        }
+        tragetChart.push(initObj);
+      })
+    }
+    this.setData({tragetChart,tragetChartcopy:tragetChart})
+  },
+  initDaytarget(value){
+    if(!value||!value.length){
+      return
+    }
+    let customPlan=[];
+    // 格式化单位 15px为1度 28 18
+    let lenpx=25;
+    value.forEach((item,index)=>{
+      if(item.time.slice(2,6)=="0000"){
+        let obj={};
+        obj.time=item.date+item.time;
+        obj.id=index;
+        obj.name=item.time.slice(0,2)+':'+item.time.slice(2,4);
+        obj.maxValue= item.temperatureMax;
+        obj.minValue = item.temperatureMin || 0;
+        obj.distance=(obj.maxValue-obj.minValue)|| 0;
+        obj.height=obj.distance*lenpx;
+        obj.planTemp=Number(((obj.maxValue+obj.minValue)/2).toFixed(1));
+        obj.y=(28 - obj.maxValue)*lenpx;
+        customPlan.push(obj)
+      }
+    })
+    this.setData({customPlancopy:this.copyobj(customPlan)})
+  },
+  getHopeTemp(value){
+    return new Promise((reslove,reject)=>{
+      if(!value||!value.length){
+        return
+      }
+      let data=new Date();
+      let hour = data.getHours();
+      let min = data.getMinutes();
+      let minIndex = Math.floor(min/15);
+      if(minIndex>=3){
+        hour = hour + 1;
+        min = 0;
+      }else{
+        min = (minIndex+1)*15;
+      }
+      let targetTime = (hour>=10?`${hour}`:`0${hour}`)+(min>=10?`${min}`:`0${min}`);
+      let isDatelist=[];
+      let targetTemp;
+      let targetIndex;
+      value.forEach((item,index)=>{
+        if(item.temperatureMax&&item.temperatureMin){
+          isDatelist.push(index)
+        }
+        if(item.time===`${targetTime}00`){
+          targetTemp= parseInt((item.temperatureMax + item.temperatureMin)/2);
+          targetIndex = index
+        }
+      })
+      if(targetTemp){
+        this.setData({targetTemp:targetTemp,targetIndex:targetIndex})
+      }else{
+        let index = isDatelist.pop();
+        targetTemp = parseInt((value[index].temperatureMax + value[index].temperatureMin)/2);
+        this.setData({targetTemp:targetTemp,targetIndex:targetIndex})
+      }
+
+
+      reslove();
+
+    })
+    // 获取当前时间最近的15分钟
+
+  },
+  // 更改即时调节选项
+  effectChange(event){
+    this.setData({
+      effectTime: event.detail,
+    },()=>{
+      let changeDate=JSON.parse(JSON.stringify(this.data.tragetChartcopy));
+      if(event.detail==='1'){
+        let len = (this.data.targetIndex+8)>changeDate.length?changeDate.length:(this.data.targetIndex+8)
+        for(var i=this.data.targetIndex;i<len;i++){
+          changeDate[i].sales = this.data.targetTemp;
+          changeDate[i]['标准区间'] =[changeDate[i].sales-1,changeDate[i].sales+1];
+        }
+      }else if(event.detail==='2'){
+        let len = changeDate.length;
+        for(var i=this.data.targetIndex;i<len;i++){
+          changeDate[i].sales = this.data.targetTemp;
+          changeDate[i]['标准区间'] =[changeDate[i].sales-1,changeDate[i].sales+1];
+        }
+      }else{
+        let len =  (this.data.targetIndex+4)>changeDate.length?changeDate.length:(this.data.targetIndex+4);
+        let start = (this.data.targetIndex-4)<0?0:(this.data.targetIndex-4);
+        for(var i=start;i<len;i++){
+          changeDate[i].sales = this.data.targetTemp;
+          changeDate[i]['标准区间'] =[changeDate[i].sales-1,changeDate[i].sales+1];
+        }
+      }
+      this.setData({tragetChart:changeDate});
+    });
+  },
+  // 加期望温度
+  addClick(){
+    let tepNum=this.data.targetTemp;
+    let firstNum = tepNum.toString().split('.')[0]
+    let lastNum = tepNum.toString().split('.')[1]
+    if(lastNum>=5){
+      this.setData({targetTemp:Number(firstNum)+1})
+    }else{
+      this.setData({targetTemp:Number(firstNum)+0.5})
+    }
+  },
+  // 减期望温度
+  minusClick(){
+    let tepNum=this.data.targetTemp;
+    let firstNum = tepNum.toString().split('.')[0]
+    let lastNum = tepNum.toString().split('.')[1]
+    if(lastNum>5){
+      this.setData({targetTemp:Number(firstNum)+0.5})
+    }else if(lastNum<=5){
+      this.setData({targetTemp:Number(firstNum)})
+    }else{
+      this.setData({targetTemp:Number(firstNum)-0.5})
+    }
+  },
+  // 修改期望温度
+  taboneSubmit(){
+    if(this.data.havePower.result!=="success"){
+      Toast.fail(this.data.havePower.message);
+      return
+    }
+    if(!this.data.effectTime||this.data.effectTime<0){
+      wx.showToast({
+        title:"未选择保持时间",
+        icon:"none",
+        duration: 1500
+      })
+      return
+    }
+    const data={
+      "projectId": this.data.spaceDetail.projectId,
+      "objectId": this.data.spaceDetail.id,
+      "valueType": 2,
+      "model":2,
+      "durationType":this.data.effectTime || '',
+      "value":this.data.targetTemp
+    }
+
+    submitAdjust(data).then(res=>{
+      if(res.result="success"){
+        wx.hideLoading();
+        setTimeout(function () {
+          wx.showToast({
+            title:"提交成功",
+            duration: 2000
+          })
+        }, 300)
+
+      }
+      this.setData({effectTime:-1})
+      this.buildContact();
+      this.getChartDate();
+    })
+  },
+  // 修改全天温度
+  tabtwoSubmit(){
+    if(this.data.havePower.result!=="success"){
+      Toast.fail(this.data.havePower.message);
+      return
+    }
+    let customPlan = JSON.parse(JSON.stringify(this.data.customPlan));
+    customPlan.forEach(item=>{
+      delete item.id;
+      delete item.name;
+      delete item.planTemp;
+      delete item.y;
+      delete item.height;
+      delete item.distance;
+    })
+    const data={
+      "projectId": this.data.spaceDetail.projectId,
+      "objectId": this.data.spaceDetail.id,
+      "valueType": 3,
+      "model":2,
+      "value":this.data.targetTemp,
+      "customPlan":customPlan
+    }
+    submitAdjust(data).then(res=>{
+      wx.hideLoading();
+      setTimeout(function () {
+        wx.showToast({
+          title:"提交成功",
+          duration: 2000
+        })
+      }, 300)
+      this.buildContact();
+      this.getChartDate();
+    })
+  },
+  showTips(){
+      wx.showModal({
+        title: '提示',
+        content: '非工作时间如需使用空调,或遇特殊问题,请联系环境管理员',
+        showCancel:false,
+        success: function (res) {
+        }
+    })
+  },
+  chartChange(e){
+    let y =e.detail.y;
+    this.throttle(this.updateChart(y,e),500)
+  },
+  preventTouchMove: function () {
+    return
+  },
+  updateChart(y,e){
+    let lenpx=25;
+    let planTempMax = 28 - y/lenpx;
+    let {index,distance} =e.currentTarget.dataset;
+    let planTemp = Number(((planTempMax*2 - distance)/2).toFixed(1));
+    let target=`customPlan[${index}].y`;
+    let targetplan=`customPlan[${index}].planTemp`;
+    let targetTempMax=`customPlan[${index}].maxValue`;
+    let targetTempMin=`customPlan[${index}].minValue`;
+    this.setData({[target]:y,[targetplan]:planTemp,chartIndex:index,[targetTempMax]:planTempMax,[targetTempMin]:planTempMax-2});
+  },
+  throttle(func, delay) {
+      let prev = Date.now();
+    return function() {
+          let context = this;
+          let args = arguments;
+          let now = Date.now();
+      if (now - prev >= delay) {
+        func.apply(context, args);
+        prev = Date.now();
+      }
+    }
+  },
+  fillZore(value) {
+    if (value < 10) {
+      value = 0 + value
+    }
+    return value
+  },
+  formatTimeall(value) {
+    let stringValue;
+    const date = new Date();
+    var nowMonth = date.getMonth() + 1;
+    let nowDay = date.getDate();
+    let torrowDay = new Date(date);
+    torrowDay.setDate(date.getDate() + 1);
+    let torrowMonth = torrowDay.getMonth() + 1;
+    nowDay = this.fillZore(nowDay);
+    nowMonth = this.fillZore(nowMonth);
+    torrowMonth = this.fillZore(torrowMonth);
+    if (nowMonth == value.substring(4, 6) || torrowMonth == value.substring(4, 6)) {
+      if (value.substring(6, 8) == nowDay) {
+        stringValue = "今日"
+      }
+      let torrowVlue = torrowDay.getDate();
+      torrowVlue = this.fillZore(torrowVlue);
+      if (value.substring(6, 8) == torrowVlue) {
+        stringValue = "明日"
+      }
+    }
+    if (stringValue) {
+      stringValue = stringValue + `${value.substring(8,10)}:${value.substring(10,12)}`
+    } else {
+      stringValue = `${value.substring(4,6)}月${value.substring(6,8)}日${value.substring(8,10)}:${value.substring(10,12)}`
+    }
+    return stringValue
+  },
+  isfeeded(value){
+
+    !value&&router.pop();
+  },
+  copyobj(a){
+    var c={};
+    c=JSON.parse(JSON.stringify(a));
+    return c;
+
+  },
+  tabChange(event){
+    let that = this;
+    if(event.detail.name==1){
+      that.setData({customPlan:null,chartIndex:null},()=>{
+        that.setData({customPlan:this.copyobj(this.data.customPlancopy)})
+      })
+    }else{
+      this.setData({effectTime:-1})
+      this.getChartDate();
+    }
+  },
+  getnowSeason(){
+    let day = new Date();
+    let year = day.getFullYear();
+    let month = day.getMonth() + 1;
+    let today = day.getDate();
+    const data={
+      projectId:this.data.spaceDetail.projectId,
+      date:`${year}${month}${today}`
+    }
+    getCurrentSeason(data).then(res=>{
+      if(res.result=="success"){
+        this.setData({bgSeasonType:res.data})
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    options = JSON.parse(decodeURIComponent(JSON.stringify(options)));
+
+    if(options.md1){
+      this.getDetail(options.md1);
+    }else{
+      this.setData({spaceDetail:options},()=>{
+        this.checkGuide();
+        this.getnowSeason();
+        if(this.data.spaceDetail.roomFuncType&&this.data.spaceDetail.roomFuncType.startsWith("31")){
+          this.setData({singleOffice:true})
+        }
+        this.checkPower();
+      })
+    }
+
+  },
+  async getDetail(value){
+    let data;
+    if(value){
+      let projectId = 'Pj' + value.substring(2, 12);
+      this.setData({spaceId:value,projectId:projectId});
+      data= {
+        criteria: {
+          "spaceId": value,
+          "userId": $.store.get('userId'),
+          "projectId": projectId
+        }
+      }
+    }else{
+      data= {
+        criteria: {
+          "spaceId": this.data.spaceDetail.id,
+          "userId": $.store.get('userId'),
+          "projectId": this.data.spaceDetail.projectId
+        }
+      }
+    }
+    wx.showLoading();
+    let res = await getSpacedetail(data);
+    wx.hideLoading();
+    let {content} = res;
+    this.setData({spaceDetail:content[0]},()=>{
+      this.checkGuide();
+      this.getnowSeason();
+      if(this.data.spaceDetail.nextOpenTime){
+        let value = this.formatTimeall(this.data.spaceDetail.nextOpenTime);
+        this.setData({nextOpenTime:value})
+      }
+      if(this.data.spaceDetail.roomFuncType&&this.data.spaceDetail.roomFuncType.startsWith("31")){
+        this.setData({singleOffice:true})
+      }
+    });
+    $.storage.get("wxqcode")&&$.storage.set("wxqcode",'');
+    // 判断是否可以调节
+    await this.checkPower();
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+    setTimeout(()=>{
+      this.setData({'headerShow':true})
+    },500)
+  },
+})

+ 13 - 0
pages/adjust/index.json

@@ -0,0 +1,13 @@
+{
+  "usingComponents": {
+    "envchart":"../../components/envchart/envchart",
+    "van-action-sheet": "../../vant-weapp/dist/action-sheet/index",
+    "van-tabs": "../../vant-weapp/dist/tabs/index",
+    "van-tab": "../../vant-weapp/dist/tab/index",
+    "van-radio": "../../vant-weapp/dist/radio/index",
+    "van-radio-group": "../../vant-weapp/dist/radio-group/index",
+    "van-toast": "../../vant-weapp/dist/toast/index",
+    "van-loading": "../../vant-weapp/dist/loading/index"
+  },
+  "navigationStyle":"custom"
+}

+ 656 - 0
pages/adjust/index.less

@@ -0,0 +1,656 @@
+page{
+    height: 100%;
+}
+.mini_mask{
+    width: 100%;
+    z-index: 100;
+    position: absolute;
+    // overflow: hidden;
+    .stepmask{
+        padding:0 16rpx;
+        background:rgba(0, 0, 0, 0);
+        position: absolute;
+        border-radius: 4px;
+        box-shadow:0 0 5px 800px rgba(0,0,0,0.2);
+    }
+    .step_one{
+        height:310rpx;
+        width: 100%;
+        top: 510rpx;
+        left: 0;
+        .one_contant{
+            position: absolute;
+            width: 201px;
+            height: 40px;
+            top: 340rpx;
+            background: #04B49C;
+            box-shadow: 0px 1px 16px 0px rgba(227, 227, 227, 0.5);
+            border-radius: 6px;
+            color: #FFFFFF;
+            font-size: 14px;
+            &::before{
+                content: '';
+                width: 17px;
+                height: 17px;
+                position: absolute;
+                top:-7px;
+                left: 50rpx;
+                background:#04B49C;
+                transform: rotate(45deg);
+                // border-top: 10px solid transparent;
+                // border-left: 10px solid black;
+                // border-bottom: 10px solid transparent;
+                border-radius: 5px;
+            }
+        }
+    }
+    .step_two{
+        height:820rpx;
+        width: 100%;
+        left: 0;
+        top: 820rpx;
+        .two_contant{
+            position: absolute;
+            width: 341px;
+            height: 40px;
+            top: -100rpx;
+            background: #04B49C;
+            box-shadow: 0px 1px 16px 0px rgba(227, 227, 227, 0.5);
+            border-radius: 6px;
+            color: #FFFFFF;
+            font-size: 14px;
+            &::before{
+                content: '';
+                width: 16px;
+                height: 16px;
+                position: absolute;
+                top:29px;
+                left: 50rpx;
+                background:#04B49C;
+                transform: rotate(45deg);
+                // border-top: 10px solid transparent;
+                // border-left: 10px solid black;
+                // border-bottom: 10px solid transparent;
+                border-radius: 5px;
+            }
+        }
+    }
+}
+.header_custom{
+    float: left;
+    width: 100%;
+}
+.header-title{
+    display: flex;
+    align-items: center;
+    flex-direction: row;
+    padding:0 34rpx;
+    width: 100%;
+    justify-content: space-between;
+    .mode_box{
+        margin-right: 185rpx;
+        height: 64rpx;
+        display: flex;
+        align-items: center;
+        flex-direction: row;
+        background: rgba(0, 0, 0, 0.15);
+        border-radius: 25px;
+        border: 1px solid rgba(255, 255, 255, 0.25);
+        color: #ffffff;
+        padding: 0 28rpx;
+        image{
+            width: 32rpx;
+            height: 32rpx;
+        }
+        .projectname{
+            margin-left: 12rpx;
+            transition:all 1s ease;
+        }
+    }
+}
+
+.adjust_main{
+    width: 100%;
+    // height: 840rpx;
+    background: #FFFFFF;
+    .space_bg{
+        width: 100%;
+        height: 500rpx;
+        overflow: hidden;
+        image{
+            width: 100%;
+            height: 100%;
+        }
+    }
+    .space_msg{
+        height: 154rpx;
+        padding: 0 32rpx;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        .msg_left{
+            .spacename{
+                height: 56rpx;
+                font-size: 40rpx;
+                font-weight: 400;
+                color: #2B3036;
+                line-height: 56rpx;
+            }
+            .spacestate{
+                font-size: 30rpx;
+                color: #8D9399;
+                line-height: 42rpx;
+                margin-top: 8rpx;
+                justify-content:flex-start;
+                &>view{
+                    margin-left: 18rpx;
+                    width: 34rpx;
+                    height: 34rpx;
+                }
+            }
+        }
+        .msg_right{
+            text{
+                font-size: 46rpx;
+                color: #2B3036;
+            }
+        }
+    }
+    .space_paramelist{
+        margin: 0 24rpx;
+        height: 140rpx;
+        background: #F8F9FA;
+        border-radius: 4px;
+        .parame_item{
+            width: 25%;
+            .icon_name{
+                image{
+                    width: 32rpx;
+                    height: 32rpx;
+                    margin-right: 8rpx;
+                }
+                color: #8D9399;
+                font-size: 24rpx;
+            }
+            .parame_num{
+                color: #646A73;
+                font-size: 24rpx;
+                text{
+                    font-size: 32rpx;
+                }
+            }
+        }
+    }
+    .space_btns{
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+        margin-top: 32rpx;
+        button{
+            margin: 0;
+            width: auto;
+            display: inline-block;
+            font-size: 26rpx;
+            height: 76rpx;
+            display: flex;
+            padding-left: 0;
+            padding-right: 0;
+            text-align: center;
+            flex-direction: row;
+            align-items: center;
+            justify-content: center;
+            border-radius: 38rpx;
+        }
+        .btns_top{
+            width: 162rpx;
+            color: #8D9399;
+            border: 1px solid #EFF0F1;
+        }
+        .btns_top_active{
+            background: #EAFAF8;
+            color: #04B49C;
+            border: 0px solid #EFF0F1;
+        }
+        .btns_adjust{
+            width: 460rpx;
+            color: #ffffff;
+            background-color: #04B49C;
+            border-radius: 38rpx;
+        }
+    }
+}
+
+.envstate_list{
+    margin:14rpx 32rpx 0;
+    padding: 32rpx 24rpx;
+    background: #FFFFFF;
+    box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+    border-radius: 4px;
+    .list_title{
+        justify-content: flex-start;
+        image{
+            width: 48rpx;
+            height: 48rpx;
+        }
+        text{
+            font-size: 34rpx;
+            color: rgba(0, 0, 0, 0.9);
+            line-height: 24px;
+            margin-left: 16rpx;
+        }
+    }
+    .list_body{
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: space-between;
+        margin-top: 32rpx;
+        &>view{
+            width: 48%;
+            height: 104rpx;
+            background: #F5F6F7;
+            border-radius: 4px;
+            font-size: 28rpx;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            margin-bottom: 12rpx;
+            image{
+                width: 56rpx;
+                height: 56rpx;
+                margin-right: 24rpx;
+            }
+        }
+        &>.typelistactive {
+            background-color: #EAFAF8;
+          }
+    }
+}
+.closedown{
+    margin: 15rpx 32rpx 64rpx;
+    height: 80rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background: #FFFFFF;
+    border-radius: 20px;
+    border: 1px solid #EFF0F1;
+    color: #04B49C;
+    image{
+        width: 24rpx;
+        height: 24rpx;
+        margin-right: 10rpx;
+    }
+}
+.uptime{
+    position: absolute;
+    bottom: 20px;
+    left: 50%;
+    width: 100%;
+    transform: translate(-50%,0);
+    font-size: 14px;
+    color: #8D9399;
+    line-height: 19px;
+}
+.profession_box{
+    margin: 0 32rpx;
+    box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+    border-radius: 4px;
+    /* 修改标签页样式 */
+    .van-tabs__wrap{
+        margin-bottom: 24rpx;
+        height: 100rpx!important;
+    }
+    .van-tabs__nav--card{
+        height: 100rpx!important;
+        overflow: hidden;
+        border-radius: 8rpx!important;
+        /* border:1px solid rgba(25,27,38,0.1)!important; */
+    }
+    .van-ellipsis{
+        line-height: 100rpx!important;
+    }
+    .van-tab{
+        height: 100rpx!important;
+    }
+    .tab-class{
+        font-size: 17px;
+        color: #373C43;
+    }
+    .tab-active-class{
+        font-size: 17px;
+        font-weight: 500;
+        color: #04B49C!important;
+    }
+    .van-radio{
+        margin-bottom: 38rpx;
+    }
+    .van-radio__label{
+        font-size: 15px;
+        color: #8D9399;
+        line-height: 21px;
+    }
+    .chartlenged{
+        margin-top: 32rpx;
+        justify-content: flex-end;
+        &>view{
+            margin-left: 24rpx;
+            font-size: 26rpx;
+            color: #8D9399;
+            line-height: 14px;
+            image{
+                width: 13px;
+                height: 5px;
+                margin-right: 8rpx;
+            }
+            &>view{
+                width: 20rpx;
+                height: 20rpx;
+                margin-right: 8rpx;
+                background: #B2E6F2;
+            }
+            .circle{
+                background:#04B49C;
+                border-radius: 50%;
+            }
+        }
+        .tips{
+            width: 40rpx;
+            height: 40rpx;
+            border-radius: 50%;
+            background: #EAFAF8;
+            color:#04B49C;
+        }
+    }
+    .tabone{
+        margin: 0 24rpx;
+        .hopetmp{
+            justify-content: space-between;
+            .hopenum{
+                font-size: 28rpx;
+                font-weight: bold;
+                color: #04B49C;
+                .hopetxt{
+                    font-size: 34rpx;
+                    margin-right: 16rpx;
+                    color: #000000;
+                    font-weight: normal;
+                }
+                text{
+                    font-size: 36rpx;
+                }
+            }
+            .operationbtn{
+                float: right;
+                width: 60px;
+                height: 40px;
+                color: #2B3036;
+                font-weight: bold;
+                background: #F8F9FA;
+                border-radius: 4px 0px 0px 4px;
+            }
+            .minusbtn{
+                margin-right: 26rpx;
+            }
+        }
+        .choose_txt{
+            margin: 44rpx 0 34rpx;
+            font-size:34rpx;
+        }
+        .choose_box{
+            padding:38rpx 24rpx 0;
+            overflow: hidden;
+            background: #F8F9FA;
+            border-radius: 4px;
+        }
+        .profession_chart{
+            height: 360rpx;
+            width: 100%;
+            .nodate{
+                height: 360rpx;
+                color:var(--nodateColor);
+                font-size: 14px;
+            }
+        }
+
+    }
+    .submit{
+        padding: 40rpx 0;
+        background: #04B49C;
+        color: #ffffff;
+    }
+    .tabtwo{
+        margin: 0 24rpx;
+        .plantxt{
+            font-size: 30rpx;
+            color: #8D9399;
+            line-height: 21px;
+        }
+        .chartcontent{
+            // min-width: 300px;
+            // width: 100%;
+            // height: 150px;
+            height: 250px;
+            position: relative;
+            box-sizing: border-box;
+            margin: 36rpx auto 0;
+            .charty{
+                position: absolute;
+                left: -27px;
+                height: 100%;
+                justify-content: space-between;
+              }
+              .chartx{
+                position: absolute;
+                bottom: -25px;
+                width: 100%;
+                font-size:12px;
+                color:#C3C6CB;
+                display: flex;
+                flex-direction: row;
+                justify-content: space-around;
+              }
+              .chartmain{
+                    height: 100%;
+                    position: relative;
+                    display: flex;
+                    flex-direction: row;
+                    justify-content: center;
+                    // justify-content: space-around;
+                    justify-content: space-between;
+                    // flex-wrap: nowrap;
+                    // margin-left: 48px;
+                &:after{
+                    content:"";
+                    width:80px;
+                }
+                &::before{
+                    content:"";
+                    width:80px;
+                }
+                .mian_item{
+                    min-width: 27px;
+                    max-width: 27px;
+                    margin-right: 4px;
+                    height: 90%;
+                    position: relative;
+                    .chartbg{
+                        height: 100%;
+                        width: 100%;
+                        background: linear-gradient(180deg, #F5F6F7 0%, #F8F9FA 100%);
+                        .chartrange{
+                            // height: 30px;
+                            width: 18px;
+                            background: #B2E6F2;
+                            position: relative;
+                            .chartdot{
+                                width: 7px;
+                                height: 7px;
+                                background: #04B49C;
+                                border-radius: 50%;
+                            }
+                            .abdot{
+                                position: absolute;
+                                top: -12px;
+                                left: -3px;
+                                font-size: 13px;
+                            }
+                        }
+                    }
+                    .item_chartx{
+                        position: absolute;
+                        bottom: -18px;
+                        font-size: 10px;
+                        left: 0px;
+                    }
+
+                }
+              }
+            //   .chartcontent::after{
+            //     content: ">";
+            //     position: absolute;
+            //     display: inline-block;
+            //     right:-3px;
+            //     bottom:-10px;
+            //   }
+            //   .chartcontent::before{
+            //     content: ">";
+            //     display: inline-block;
+            //     position: absolute;
+            //     left: -6px;
+            //     top: -7px;
+            //     transform: rotate(-90deg);
+            //   }
+        }
+    }
+}
+.feedback_box{
+    margin: 64rpx 0 0;
+    .feedimgbox{
+        .lottie{
+            width: 40rpx;
+            height: 40rpx;
+        }
+        .feedtext_title{
+            font-size: 34rpx;
+            font-weight: 500;
+            color: #000000;
+            margin-bottom: 16rpx;
+        }
+        .feedtext_box{
+            .feedtext_desc {
+                font-size: 30rpx;
+                color: #2B3036;
+            }
+        }
+    }
+    .noticbox {
+        width: 100%;
+        height:65rpx;
+        font-size: 28rpx;
+        .noticbox_text{
+            text-align: center;
+        }
+        &>swiper{
+            height: 45rpx;
+        }
+    }
+    .envpanel{
+        justify-content: space-around;
+        margin: 20rpx 32rpx 0;
+        height: 224rpx;
+        background: #F8F9FA;
+        border-radius: 4px;
+        .panel_left{
+            .left_txt{
+                font-size: 34rpx;
+                color: #646A73;
+                line-height: 24px;
+
+            }
+            @keyframes rotate{
+                0%{
+                    transform: rotate(0);
+                  }
+                100%{
+                    transform:rotate(360deg);
+                    }
+            }
+
+            .rotate{
+                // transition: 0.5s;
+                animation: rotate 1.5s linear infinite;  /*开始动画后无限循环,用来控制rotate*/
+            }
+            .rotate_slow{
+                // transition: 0.5s;
+                animation: rotate 2s linear infinite;
+            }
+            &>view{
+                margin-top: 12px;
+                text-align: center;
+                font-size: 28rpx;
+                image{
+                    width: 68rpx;
+                    height: 68rpx;
+                }
+            }
+            .left_num{
+                font-size: 56rpx;
+                color: #2B3036;
+                line-height: 28px;
+            }
+        }
+        .panel_center{
+            image{
+                width: 32rpx;
+                height: 28rpx;
+            }
+        }
+    }
+    .feed_tips{
+        padding-bottom: 12rpx;
+        &>text:nth-child(1){
+            font-size: 17px;
+            font-weight: 500;
+            color: #000000;
+            margin-bottom: 16rpx;
+        }
+        &>text:nth-child(2){
+            font-size: 15px;
+            color: #2B3036;
+        }
+    }
+    .iknow{
+        color: #ffffff;
+        background: #04B49C;
+    }
+}
+.seconddetail{
+    padding: 25rpx 32rpx 0;
+    .secondtxt{
+        font-size: 14px;
+        margin-bottom: 16rpx;
+    }
+    .lottie{
+        width: 50rpx;
+        height: 50rpx;
+    }
+    .secondtxt_title{
+        font-size: 20px;
+        margin-bottom: 22rpx;
+    }
+    .custom_button{
+        box-sizing: content-box;
+        padding: 24rpx 32rpx;
+        height: 40rpx;
+        display: flex;
+        margin-top: 54rpx;
+        justify-content: center;
+        text-align: center;
+        align-items: center;
+        background-color: #5575FF;
+        color: #ffffff;
+        font-size: 16px;
+        border-radius:40rpx;
+    }
+}

+ 279 - 0
pages/adjust/index.wxml

@@ -0,0 +1,279 @@
+<!-- mask -->
+<loading/>
+<view class="mini_mask" style="height:{{pageHight}}px" wx:if="{{guideInit}}" bindtap="nextStep">
+    <view class="stepmask step_one" wx:if="{{guideStep===1}}">
+        <view class="one_contant flex_row">
+            可以点击查看科普数据哦
+        </view>
+    </view>
+    <view class="stepmask step_two"  wx:if="{{guideStep===2}}">
+        <view class="two_contant flex_row">
+            可以根据个人感受,点击任意一项即可生效哦!
+        </view>
+    </view>
+</view>
+<van-sticky>
+    <header class="header_custom" wx:if="{{headerShow}}" customClass="{{true}}">
+        <view slot="content" class="header-title">
+            <view class='goback' bindtap="goBack">
+                <van-icon color="#FFFFFF" name="arrow-left" />
+            </view>
+            <view class='mode_box' bindtap="changeMode">
+                <image src="../../static/images/modechange.png" />
+                <text class="projectname">{{StandardMode?'标准模式':'专业模式'}}</text>
+            </view>
+        </view>
+    </header>
+</van-sticky>
+<view id="j_page">
+    <view class="flex_row uptime" wx:if="{{nextOpenTime}}">
+            预计 {{nextOpenTime}} 重新开启环境调节
+        </view>
+    <!-- banner -->
+    <view class="adjust_main">
+        <view class="space_bg">
+            <image src="{{imgbaseUrl}}{{spaceDetail.pic}}&width=1125&height=750"  wx:if="{{spaceDetail.pic}}"/>
+            <image src="{{picInitUrl}}" lazy-load="{{true}}" wx:if="{{!spaceDetail.pic}}"/>
+        </view>
+        <view class="space_msg">
+            <view class="msg_left">
+                <text class="spacename">{{spaceDetail.localName}}</text>
+                <view class="spacestate flex_row">
+                    {{spaceDetail.state}}
+                    <view>
+                        <lottie id="lottie{{spaceDetail.id}}" canId="{{spaceDetail.id}}" animationData="{{statusList[spaceDetail.stateId].canvasDate}}" width="20" height="20"/>
+                    </view>
+                </view>
+            </view>
+            <view class="msg_right" bindtap="toDetail">
+                <text>{{spaceDetail.temperature}}</text>°C
+            </view>
+        </view>
+        <view class="space_paramelist flex_row" hidden="{{!StandardMode}}">
+            <block wx:for="{{envNamelist}}" wx:for-index="key" wx:for-item="value">
+                <view class="parame_item flex_column" key="{{key}}" data-param="{{key}}" data-spaceid="{{spaceDetail.id}}" data-projectid="{{spaceDetail.projectId}}" data-funcid="{{value.funcid}}" data-localname="{{value.localName}}" data-name="{{value.name}}" bindtap="toDetail" wx:key="{{index}}">
+                    <view class="icon_name flex_row">
+                    <image src="{{value.imgSrc}}" /> {{value.name}}
+                    </view>
+                    <view class="parame_num"><text>{{spaceDetail[key] || '--'}}</text>{{value.unit}}</view>
+                </view>
+            </block>
+        </view>
+    </view>
+    <!-- 标准模式开始 -->
+    <view class="standard_box" hidden="{{!StandardMode}}" wx:if="{{(spaceDetail.isClose+'')!='true'}}">
+        <!-- 温度调节 -->
+        <view class="envstate_list">
+            <view class="list_title flex_row">
+                <image src="../../static/images/tempadjust.png" />
+                <text>温度调节</text>
+            </view>
+            <view class="list_body">
+                <block wx:for="{{tempType}}" key="{{index}}">
+                    <view bindtap="changeType" class="{{tempTypeValue===item.id?'typelistactive':''}}" data-index="{{item.id}}" data-type="temp">
+                        <image src="{{item.imgSrc}}"></image>{{item.value}}
+                    </view>
+                </block>
+            </view>
+        </view>
+        <!-- 风速调节 -->
+        <view class="envstate_list">
+            <view class="list_title flex_row">
+                <image src="../../static/images/windadjust.png" />
+                <text>风速调节</text>
+            </view>
+            <view class="list_body">
+                <block wx:for="{{windType}}" key="{{index}}">
+                    <view bindtap="changeType" class="{{windTypeValue===item.id?'typelistactive':''}}" data-index="{{item.id}}" data-type="wind">
+                        <image src="{{item.imgSrc}}"></image>{{item.value}}
+                    </view>
+                </block>
+            </view>
+        </view>
+        <view class="closedown" bindtap="turnDown">
+            <image src="../../static/images/turndown.png"></image>关机
+        </view>
+    </view>
+    <view class="turndown" hidden="{{!StandardMode}}" wx:if="{{(spaceDetail.isClose+'')=='true'}}">
+        <view class="closedown" bindtap="turnUp">
+            <image src="../../static/images/turndown.png"></image>开启
+        </view>
+
+    </view>
+    <!-- 标准模式结束 -->
+
+    <!-- 专业模式开始 -->
+    <view class="profession_box" wx:if="{{!StandardMode}}">
+        <van-tabs bind:change="tabChange" animated color="#04B49C" type="line" line-width="30" tab-class="tab-class" tab-active-class="tab-active-class">
+            <van-tab title="即时调节">
+                <view class="tabone">
+                    <view class="hopetmp flex_row">
+                        <view class="hopenum"><text class="hopetxt">期望温度</text><text>{{targetTemp}}</text> °C</view>
+                        <view>
+                            <view class="addbtn operationbtn flex_row" bindtap="addClick">+</view>
+                            <view class="minusbtn operationbtn flex_row" bindtap="minusClick">-</view>
+                        </view>
+                    </view>
+                    <view class="choose_txt">您期望温度的有效保持时间</view >
+                    <view class="choose_box">
+                        <van-radio-group value="{{ effectTime }}" bind:change="effectChange"  label-class="label-class">
+                            <van-radio name="1" checked-color="#04B49C">2小时内保持该温度</van-radio>
+                            <van-radio name="2" checked-color="#04B49C">当天工作时间段内保持该温度</van-radio>
+                            <van-radio name="3" checked-color="#04B49C">每天的此刻都保持该温度</van-radio>
+                        </van-radio-group>
+                    </view>
+                    <view class="chartlenged flex_row">
+                        <view class="flex_row"><image src="../../static/images/lenged.png"/>温度目标</view>
+                        <view class="flex_row"><view></view>合格区间</view>
+                    </view>
+                    <view class="profession_chart">
+                        <view class="nodate flex_row" wx:if="{{tragetChart&&!tragetChart.length}}">暂无数据</view>
+                        <envchart envName="{{'温度'}}"  targetIndex="{{targetIndex}}" tragetChart="{{tragetChart}}" wx:if="{{tragetChart&&tragetChart.length}}"/>
+                    </view>
+                    <view class="closedown submit" catchtap="taboneSubmit">
+                        提交
+                    </view>
+
+                </view>
+
+            </van-tab>
+            <van-tab title="设置全天温度计划" wx:if="{{singleOffice}}">
+                <view class="tabtwo">
+                    <view class="flex_column plantxt">
+                        <text>请您根据自己的习惯,在不同的时间段</text>
+                        <text>滑动圆点,调节适合自己的温度</text>
+                    </view>
+                    <view class="chartlenged flex_row">
+                        <view class="flex_row"><view class="circle"></view>温度目标</view>
+                        <view class="flex_row"><view></view>合格区间</view>
+                        <!-- <van-icon name="question" color="#EAFAF8"/> -->
+                        <view class="flex_row tips" catchtap="showTips">?</view>
+                    </view>
+
+                    <view class="chartcontent" catchtouchmove="preventTouchMove">
+                        <!-- 中间部分区域 -->
+                        <scroll-view scroll-x="true" style="height: 100%">
+                            <view class="chartmain">
+                                <block wx:for="{{customPlan}}" wx:key="index">
+                                    <view class="mian_item">
+                                        <movable-area class="chartbg">
+                                            <movable-view direction="vertical"data-distance="{{item.distance}}" data-index="{{index}}" style="height:{{item.height}}px" x="5" y="{{item.y}}" class="chartrange flex_row" bindchange="chartChange">
+                                                <view class="abdot" style="top:{{item.planTemp>=26?'12':'-12'}}px" hidden="{{index!=chartIndex}}">{{item.planTemp}}</view><view class="chartdot"></view>
+                                            </movable-view>
+                                        </movable-area>
+                                        <view class="item_chartx">
+                                            <text>{{item.name}}</text>
+                                        </view>
+                                    </view>
+                                </block>
+                            </view>
+                        </scroll-view>
+                    </view>
+                     <view ></view>
+                    <view class="closedown submit" catchtap="tabtwoSubmit">
+                        提交
+                    </view>
+                </view>
+
+            </van-tab>
+        </van-tabs>
+    </view>
+
+</view>
+<!-- 反馈弹出框 -->
+<van-action-sheet
+  show="{{ feedBack }}"
+  close-on-click-overlay="{{false}}"
+>
+    <view class="feedback_box">
+        <view class="feedimgbox flex_row">
+            <view  class="lottie">
+                <lottie id="lottie" animationData="{{spacestatusList[spaceStatusId].canvasDate}}" width="20" height="20"/>
+            </view>
+            <text class="feedtext_title">{{spaceStatus}}</text>
+        </view>
+        <view class="flex_column feedtext_box" wx:for="{{notice}}" wx:key="{{index}}">
+            <text class="feedtext_desc flex_rew">{{item}}</text>
+        </view>
+        <!-- 滚动列表 -->
+        <view class="noticbox" wx:if="{{equipmentStatustext&&equipmentStatustext.length}}">
+            <swiper vertical autoplay duration="300" circular interval="1500">
+                <block wx:for="{{equipmentStatustext}}" >
+                    <swiper-item>
+                        <view class="noticbox_text">{{item.name}}</view>
+                    </swiper-item>
+                    <swiper-item>
+                        <view class="noticbox_text">{{item.actions}}</view>
+                    </swiper-item>
+                </block>
+            </swiper>
+        </view>
+        <view class="envpanel flex_row" wx:if="{{currentIndex!=5}}">
+            <view class="panel_left">
+                <text class="left_txt">当前温度</text>
+                <view><text class="left_num">{{spaceDetail.temperature}}</text>°C</view>
+            </view>
+            <view class="panel_center">
+                <image src="../../static/images/uptemp.png" wx:if="{{currentIndex<=2}}"/>
+                <image src="../../static/images/downtemp.png" wx:else/>
+            </view>
+            <view class="panel_left panel_right">
+                <text class="left_txt">{{currentIndex<=2?'预计升温至':'预计降温至'}}</text>
+                <view>
+                    <van-loading type="spinner" color="#1989fa" wx:if="{{!willAvg}}"/>
+                    <text class="left_num" wx:else>{{willAvg}}</text>°C</view>
+            </view>
+        </view>
+        <view class="envpanel flex_row" wx:if="{{currentIndex==5}}">
+            <view class="panel_left">
+                <text class="left_txt">当前风速</text>
+                <view class="rotate">
+                    <image src="../../static/images/morewind.png"/>
+                </view>
+            </view>
+            <view class="panel_center">
+                <image src="../../static/images/downtemp.png"/>
+            </view>
+            <view class="panel_left panel_right">
+                <text class="left_txt">预计风速</text>
+                <view class="rotate_slow">
+                    <image src="../../static/images/lesswind.png"/>
+                </view>
+            </view>
+        </view>
+        <view class="closedown iknow" catchtap="knowClick">
+            我知道了
+        </view>
+    </view>
+</van-action-sheet>
+<!--  -->
+<van-action-sheet
+  show="{{trunAction}}"
+  close-on-click-overlay="{{false}}"
+>
+    <view class="feedback_box">
+        <view class="flex_column feed_tips">
+            <text>正在关机</text>
+            <text>反馈已提交,设备正在关机中!</text>
+        </view>
+        <view class="closedown iknow" catchtap="knowCloseClick">
+            我知道了
+        </view>
+    </view>
+</van-action-sheet>
+<van-action-sheet
+  show="{{ trunupAction }}"
+  close-on-click-overlay="{{false}}"
+>
+    <view class="seconddetail">
+        <view class="secondtxt flex_row secondtxt_title">
+            <view class="lottie">
+                <lottie id="lottieup" animationData="{{spacestatusList[secondIcon-1].canvasDate}}" width="25" height="25" />
+            </view>
+            {{secondSpaceStatus}}
+        </view>
+        <view class="secondtxt flex_row">{{secondNotice}}</view>
+        <view class="closedown iknow" bindtap="commitClose">关闭</view>
+    </view>
+</van-action-sheet>
+<van-toast id="van-toast" />

+ 607 - 0
pages/adjust/index.wxss

@@ -0,0 +1,607 @@
+page {
+  height: 100%;
+}
+.mini_mask {
+  width: 100%;
+  z-index: 100;
+  position: absolute;
+}
+.mini_mask .stepmask {
+  padding: 0 16rpx;
+  background: rgba(0, 0, 0, 0);
+  position: absolute;
+  border-radius: 4px;
+  box-shadow: 0 0 5px 800px rgba(0, 0, 0, 0.2);
+}
+.mini_mask .step_one {
+  height: 310rpx;
+  width: 100%;
+  top: 510rpx;
+  left: 0;
+}
+.mini_mask .step_one .one_contant {
+  position: absolute;
+  width: 201px;
+  height: 40px;
+  top: 340rpx;
+  background: #04B49C;
+  box-shadow: 0px 1px 16px 0px rgba(227, 227, 227, 0.5);
+  border-radius: 6px;
+  color: #FFFFFF;
+  font-size: 14px;
+}
+.mini_mask .step_one .one_contant::before {
+  content: '';
+  width: 17px;
+  height: 17px;
+  position: absolute;
+  top: -7px;
+  left: 50rpx;
+  background: #04B49C;
+  transform: rotate(45deg);
+  border-radius: 5px;
+}
+.mini_mask .step_two {
+  height: 820rpx;
+  width: 100%;
+  left: 0;
+  top: 820rpx;
+}
+.mini_mask .step_two .two_contant {
+  position: absolute;
+  width: 341px;
+  height: 40px;
+  top: -100rpx;
+  background: #04B49C;
+  box-shadow: 0px 1px 16px 0px rgba(227, 227, 227, 0.5);
+  border-radius: 6px;
+  color: #FFFFFF;
+  font-size: 14px;
+}
+.mini_mask .step_two .two_contant::before {
+  content: '';
+  width: 16px;
+  height: 16px;
+  position: absolute;
+  top: 29px;
+  left: 50rpx;
+  background: #04B49C;
+  transform: rotate(45deg);
+  border-radius: 5px;
+}
+.header_custom {
+  float: left;
+  width: 100%;
+}
+.header-title {
+  display: flex;
+  align-items: center;
+  flex-direction: row;
+  padding: 0 34rpx;
+  width: 100%;
+  justify-content: space-between;
+}
+.header-title .mode_box {
+  margin-right: 185rpx;
+  height: 64rpx;
+  display: flex;
+  align-items: center;
+  flex-direction: row;
+  background: rgba(0, 0, 0, 0.15);
+  border-radius: 25px;
+  border: 1px solid rgba(255, 255, 255, 0.25);
+  color: #ffffff;
+  padding: 0 28rpx;
+}
+.header-title .mode_box image {
+  width: 32rpx;
+  height: 32rpx;
+}
+.header-title .mode_box .projectname {
+  margin-left: 12rpx;
+  transition: all 1s ease;
+}
+.adjust_main {
+  width: 100%;
+  background: #FFFFFF;
+}
+.adjust_main .space_bg {
+  width: 100%;
+  height: 500rpx;
+  overflow: hidden;
+}
+.adjust_main .space_bg image {
+  width: 100%;
+  height: 100%;
+}
+.adjust_main .space_msg {
+  height: 154rpx;
+  padding: 0 32rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+}
+.adjust_main .space_msg .msg_left .spacename {
+  height: 56rpx;
+  font-size: 40rpx;
+  font-weight: 400;
+  color: #2B3036;
+  line-height: 56rpx;
+}
+.adjust_main .space_msg .msg_left .spacestate {
+  font-size: 30rpx;
+  color: #8D9399;
+  line-height: 42rpx;
+  margin-top: 8rpx;
+  justify-content: flex-start;
+}
+.adjust_main .space_msg .msg_left .spacestate > view {
+  margin-left: 18rpx;
+  width: 34rpx;
+  height: 34rpx;
+}
+.adjust_main .space_msg .msg_right text {
+  font-size: 46rpx;
+  color: #2B3036;
+}
+.adjust_main .space_paramelist {
+  margin: 0 24rpx;
+  height: 140rpx;
+  background: #F8F9FA;
+  border-radius: 4px;
+}
+.adjust_main .space_paramelist .parame_item {
+  width: 25%;
+}
+.adjust_main .space_paramelist .parame_item .icon_name {
+  color: #8D9399;
+  font-size: 24rpx;
+}
+.adjust_main .space_paramelist .parame_item .icon_name image {
+  width: 32rpx;
+  height: 32rpx;
+  margin-right: 8rpx;
+}
+.adjust_main .space_paramelist .parame_item .parame_num {
+  color: #646A73;
+  font-size: 24rpx;
+}
+.adjust_main .space_paramelist .parame_item .parame_num text {
+  font-size: 32rpx;
+}
+.adjust_main .space_btns {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  margin-top: 32rpx;
+}
+.adjust_main .space_btns button {
+  margin: 0;
+  width: auto;
+  display: inline-block;
+  font-size: 26rpx;
+  height: 76rpx;
+  display: flex;
+  padding-left: 0;
+  padding-right: 0;
+  text-align: center;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  border-radius: 38rpx;
+}
+.adjust_main .space_btns .btns_top {
+  width: 162rpx;
+  color: #8D9399;
+  border: 1px solid #EFF0F1;
+}
+.adjust_main .space_btns .btns_top_active {
+  background: #EAFAF8;
+  color: #04B49C;
+  border: 0px solid #EFF0F1;
+}
+.adjust_main .space_btns .btns_adjust {
+  width: 460rpx;
+  color: #ffffff;
+  background-color: #04B49C;
+  border-radius: 38rpx;
+}
+.envstate_list {
+  margin: 14rpx 32rpx 0;
+  padding: 32rpx 24rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 4px;
+}
+.envstate_list .list_title {
+  justify-content: flex-start;
+}
+.envstate_list .list_title image {
+  width: 48rpx;
+  height: 48rpx;
+}
+.envstate_list .list_title text {
+  font-size: 34rpx;
+  color: rgba(0, 0, 0, 0.9);
+  line-height: 24px;
+  margin-left: 16rpx;
+}
+.envstate_list .list_body {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  margin-top: 32rpx;
+}
+.envstate_list .list_body > view {
+  width: 48%;
+  height: 104rpx;
+  background: #F5F6F7;
+  border-radius: 4px;
+  font-size: 28rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 12rpx;
+}
+.envstate_list .list_body > view image {
+  width: 56rpx;
+  height: 56rpx;
+  margin-right: 24rpx;
+}
+.envstate_list .list_body > .typelistactive {
+  background-color: #EAFAF8;
+}
+.closedown {
+  margin: 15rpx 32rpx 64rpx;
+  height: 80rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: #FFFFFF;
+  border-radius: 20px;
+  border: 1px solid #EFF0F1;
+  color: #04B49C;
+}
+.closedown image {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 10rpx;
+}
+.uptime {
+  position: absolute;
+  bottom: 20px;
+  left: 50%;
+  width: 100%;
+  transform: translate(-50%, 0);
+  font-size: 14px;
+  color: #8D9399;
+  line-height: 19px;
+}
+.profession_box {
+  margin: 0 32rpx;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 4px;
+  /* 修改标签页样式 */
+}
+.profession_box .van-tabs__wrap {
+  margin-bottom: 24rpx;
+  height: 100rpx!important;
+}
+.profession_box .van-tabs__nav--card {
+  height: 100rpx!important;
+  overflow: hidden;
+  border-radius: 8rpx!important;
+  /* border:1px solid rgba(25,27,38,0.1)!important; */
+}
+.profession_box .van-ellipsis {
+  line-height: 100rpx!important;
+}
+.profession_box .van-tab {
+  height: 100rpx!important;
+}
+.profession_box .tab-class {
+  font-size: 17px;
+  color: #373C43;
+}
+.profession_box .tab-active-class {
+  font-size: 17px;
+  font-weight: 500;
+  color: #04B49C !important;
+}
+.profession_box .van-radio {
+  margin-bottom: 38rpx;
+}
+.profession_box .van-radio__label {
+  font-size: 15px;
+  color: #8D9399;
+  line-height: 21px;
+}
+.profession_box .chartlenged {
+  margin-top: 32rpx;
+  justify-content: flex-end;
+}
+.profession_box .chartlenged > view {
+  margin-left: 24rpx;
+  font-size: 26rpx;
+  color: #8D9399;
+  line-height: 14px;
+}
+.profession_box .chartlenged > view image {
+  width: 13px;
+  height: 5px;
+  margin-right: 8rpx;
+}
+.profession_box .chartlenged > view > view {
+  width: 20rpx;
+  height: 20rpx;
+  margin-right: 8rpx;
+  background: #B2E6F2;
+}
+.profession_box .chartlenged > view .circle {
+  background: #04B49C;
+  border-radius: 50%;
+}
+.profession_box .chartlenged .tips {
+  width: 40rpx;
+  height: 40rpx;
+  border-radius: 50%;
+  background: #EAFAF8;
+  color: #04B49C;
+}
+.profession_box .tabone {
+  margin: 0 24rpx;
+}
+.profession_box .tabone .hopetmp {
+  justify-content: space-between;
+}
+.profession_box .tabone .hopetmp .hopenum {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #04B49C;
+}
+.profession_box .tabone .hopetmp .hopenum .hopetxt {
+  font-size: 34rpx;
+  margin-right: 16rpx;
+  color: #000000;
+  font-weight: normal;
+}
+.profession_box .tabone .hopetmp .hopenum text {
+  font-size: 36rpx;
+}
+.profession_box .tabone .hopetmp .operationbtn {
+  float: right;
+  width: 60px;
+  height: 40px;
+  color: #2B3036;
+  font-weight: bold;
+  background: #F8F9FA;
+  border-radius: 4px 0px 0px 4px;
+}
+.profession_box .tabone .hopetmp .minusbtn {
+  margin-right: 26rpx;
+}
+.profession_box .tabone .choose_txt {
+  margin: 44rpx 0 34rpx;
+  font-size: 34rpx;
+}
+.profession_box .tabone .choose_box {
+  padding: 38rpx 24rpx 0;
+  overflow: hidden;
+  background: #F8F9FA;
+  border-radius: 4px;
+}
+.profession_box .tabone .profession_chart {
+  height: 360rpx;
+  width: 100%;
+}
+.profession_box .tabone .profession_chart .nodate {
+  height: 360rpx;
+  color: var(--nodateColor);
+  font-size: 14px;
+}
+.profession_box .submit {
+  padding: 40rpx 0;
+  background: #04B49C;
+  color: #ffffff;
+}
+.profession_box .tabtwo {
+  margin: 0 24rpx;
+}
+.profession_box .tabtwo .plantxt {
+  font-size: 30rpx;
+  color: #8D9399;
+  line-height: 21px;
+}
+.profession_box .tabtwo .chartcontent {
+  height: 250px;
+  position: relative;
+  box-sizing: border-box;
+  margin: 36rpx auto 0;
+}
+.profession_box .tabtwo .chartcontent .charty {
+  position: absolute;
+  left: -27px;
+  height: 100%;
+  justify-content: space-between;
+}
+.profession_box .tabtwo .chartcontent .chartx {
+  position: absolute;
+  bottom: -25px;
+  width: 100%;
+  font-size: 12px;
+  color: #C3C6CB;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+.profession_box .tabtwo .chartcontent .chartmain {
+  height: 100%;
+  position: relative;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  justify-content: space-between;
+}
+.profession_box .tabtwo .chartcontent .chartmain:after {
+  content: "";
+  width: 80px;
+}
+.profession_box .tabtwo .chartcontent .chartmain::before {
+  content: "";
+  width: 80px;
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item {
+  min-width: 27px;
+  max-width: 27px;
+  margin-right: 4px;
+  height: 90%;
+  position: relative;
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item .chartbg {
+  height: 100%;
+  width: 100%;
+  background: linear-gradient(180deg, #F5F6F7 0%, #F8F9FA 100%);
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item .chartbg .chartrange {
+  width: 18px;
+  background: #B2E6F2;
+  position: relative;
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item .chartbg .chartrange .chartdot {
+  width: 7px;
+  height: 7px;
+  background: #04B49C;
+  border-radius: 50%;
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item .chartbg .chartrange .abdot {
+  position: absolute;
+  top: -12px;
+  left: -3px;
+  font-size: 13px;
+}
+.profession_box .tabtwo .chartcontent .chartmain .mian_item .item_chartx {
+  position: absolute;
+  bottom: -18px;
+  font-size: 10px;
+  left: 0px;
+}
+.feedback_box {
+  margin: 64rpx 0 0;
+}
+.feedback_box .feedimgbox .lottie {
+  width: 40rpx;
+  height: 40rpx;
+}
+.feedback_box .feedimgbox .feedtext_title {
+  font-size: 34rpx;
+  font-weight: 500;
+  color: #000000;
+  margin-bottom: 16rpx;
+}
+.feedback_box .feedimgbox .feedtext_box .feedtext_desc {
+  font-size: 30rpx;
+  color: #2B3036;
+}
+.feedback_box .noticbox {
+  width: 100%;
+  height: 65rpx;
+  font-size: 28rpx;
+}
+.feedback_box .noticbox .noticbox_text {
+  text-align: center;
+}
+.feedback_box .noticbox > swiper {
+  height: 45rpx;
+}
+.feedback_box .envpanel {
+  justify-content: space-around;
+  margin: 20rpx 32rpx 0;
+  height: 224rpx;
+  background: #F8F9FA;
+  border-radius: 4px;
+}
+.feedback_box .envpanel .panel_left .left_txt {
+  font-size: 34rpx;
+  color: #646A73;
+  line-height: 24px;
+}
+@keyframes rotate {
+  0% {
+    transform: rotate(0);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+.feedback_box .envpanel .panel_left .rotate {
+  animation: rotate 1.5s linear infinite;
+  /*开始动画后无限循环,用来控制rotate*/
+}
+.feedback_box .envpanel .panel_left .rotate_slow {
+  animation: rotate 2s linear infinite;
+}
+.feedback_box .envpanel .panel_left > view {
+  margin-top: 12px;
+  text-align: center;
+  font-size: 28rpx;
+}
+.feedback_box .envpanel .panel_left > view image {
+  width: 68rpx;
+  height: 68rpx;
+}
+.feedback_box .envpanel .panel_left .left_num {
+  font-size: 56rpx;
+  color: #2B3036;
+  line-height: 28px;
+}
+.feedback_box .envpanel .panel_center image {
+  width: 32rpx;
+  height: 28rpx;
+}
+.feedback_box .feed_tips {
+  padding-bottom: 12rpx;
+}
+.feedback_box .feed_tips > text:nth-child(1) {
+  font-size: 17px;
+  font-weight: 500;
+  color: #000000;
+  margin-bottom: 16rpx;
+}
+.feedback_box .feed_tips > text:nth-child(2) {
+  font-size: 15px;
+  color: #2B3036;
+}
+.feedback_box .iknow {
+  color: #ffffff;
+  background: #04B49C;
+}
+.seconddetail {
+  padding: 25rpx 32rpx 0;
+}
+.seconddetail .secondtxt {
+  font-size: 14px;
+  margin-bottom: 16rpx;
+}
+.seconddetail .lottie {
+  width: 50rpx;
+  height: 50rpx;
+}
+.seconddetail .secondtxt_title {
+  font-size: 20px;
+  margin-bottom: 22rpx;
+}
+.seconddetail .custom_button {
+  box-sizing: content-box;
+  padding: 24rpx 32rpx;
+  height: 40rpx;
+  display: flex;
+  margin-top: 54rpx;
+  justify-content: center;
+  text-align: center;
+  align-items: center;
+  background-color: #5575FF;
+  color: #ffffff;
+  font-size: 16px;
+  border-radius: 40rpx;
+}

+ 124 - 0
pages/adjustlog/index.js

@@ -0,0 +1,124 @@
+import $ from './../../utils/Tool'
+import router from './../../utils/router'
+import {formatMsgTime} from './../../utils/util'
+import {getFeedbackList} from '../../requests/api'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    dataList:[],
+    page:0,
+    tempType:{
+      1: "有点冷",
+      3: "有点热",
+      2: "太冷了",
+      4: "太热了",
+      5:"风太大",
+      10: "关闭设备",
+      11:"赞",
+      12:"开启设备"
+    },
+    type:null,
+    allCount:0
+  },
+  goBack(){
+    router.pop()
+  },
+  goHome(){
+    $.store.set('goHome',true);
+    router.toHome()
+  },
+  initDate(value){
+    let date = new Date(value);
+    let month = date.getMonth() + 1
+    let day = date.getDate()
+    let hour = date.getHours()
+    let minute = date.getMinutes()
+    hour = hour<10?`0${hour}`:hour;
+    minute = minute<10?`0${minute}`:minute;
+
+    return `${month}.${day} ${hour}:${minute}`
+  },
+  getDate(){
+    this.setData({page:this.data.page+1},async ()=>{
+      let data={
+          "criteria": {
+              "projectId": $.store.get('projectId'),
+              "userId":$.store.get('userId')
+          },
+          page: this.data.page,
+          size:30,
+          "orders": [
+              {
+                  "column": "createTime",
+                  "asc": false
+              }
+          ]
+      }
+      if(this.data.type==="space"){
+        data.orders.push(
+          {
+            "column": "objectId",
+            "asc": true
+        })
+      }
+
+      wx.showLoading({
+        title:"加载中"
+      })
+      await getFeedbackList(data).then(res=>{
+        if(res.count){
+          res.content.forEach(item=>{
+            item.text=this.data.tempType[item.itemId] || '';
+            if(!item.text){
+              item.text = item.valueType==3?'设置了全天的温度计划':`调温至${item.value}°C`;
+            }
+            item.createTime = formatMsgTime(new Date(item.createTime)); //this.initDate
+          })
+        }
+        this.setData({dataList:this.data.dataList.concat(res.content)});
+        // console.log(res);
+      })
+      wx.hideLoading()
+    });
+
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    let {spaceFeedbackNum,type} = options;
+    this.setData({allCount:Number(spaceFeedbackNum),type:type},()=>{
+      this.getDate();
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+   onPullDownRefresh() {
+    this.setData({page:0,dataList:[]},async ()=>{
+      await this.getDate();
+      wx.stopPullDownRefresh();
+    })
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    if(this.data.dataList&&(this.data.dataList.length<this.data.allCount)){
+      this.getDate();
+    }
+  },
+
+})

+ 5 - 0
pages/adjustlog/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationStyle":"custom",
+  "enablePullDownRefresh": true
+}

+ 47 - 0
pages/adjustlog/index.less

@@ -0,0 +1,47 @@
+.header-title{
+    background-color: #ffffff;
+    justify-content: space-between;
+    padding: 0 32rpx;
+    width: 100%;
+    .titlename{
+        font-size: 17px;
+    }
+    .goback{
+        width:30px;
+    }
+    .righttext{
+        width: 112rpx;
+    }
+    .gohome{
+        margin-left: 20rpx;
+        image{
+            width: 80rpx;
+            height: 80rpx;
+        }
+    }
+}
+.loglist{
+    margin:40rpx 32rpx 0;
+    .log_item{
+        height: 84rpx;
+        border-bottom:1px solid #EFF0F1;
+        font-size: 26rpx;
+        justify-content: space-between;
+        .logtime{
+            color: #C3C6CB;
+            margin-right: 18rpx;
+            min-width: 160rpx;
+            text-align: right;
+        }
+        .logaction{
+            color: #2B3036;
+            text{
+                color: #04B49C;
+            }
+        }
+    }
+}
+.nomore{
+    height: 90rpx;
+    color: #8D9399;
+}

+ 28 - 0
pages/adjustlog/index.wxml

@@ -0,0 +1,28 @@
+<loading id="loading"/>
+<van-sticky>
+    <header class="header_custom">
+        <view slot="content" class="header-title flex_row">
+            <view class="flex_row">
+                <view class='goback' bindtap="goBack">
+                    <van-icon name="arrow-left" />
+                </view>
+                <view class="gohome" bindtap="goHome">
+                    <image src="../../static/images/home.png" />
+                </view>
+            </view>
+            <text class="titlename">调节记录</text>
+             <text class="righttext"></text>
+        </view>
+    </header>
+</van-sticky>
+<view class="loglist">
+    <block wx:for="{{dataList}}">
+        <view class="log_item flex_row " wx:key="{{index}}">
+            <view class="logaction one-line-text">对<text>{{item.spaceName}}</text>
+            提交了{{item.text}}
+            </view>
+            <text class="logtime">{{item.createTime}}</text>
+        </view>
+    </block>
+    <view class="nomore flex_row" wx:if="{{dataList&&(dataList.length==allCount)}}">没有更多了哦!</view>
+</view>

+ 47 - 0
pages/adjustlog/index.wxss

@@ -0,0 +1,47 @@
+.header-title {
+  background-color: #ffffff;
+  justify-content: space-between;
+  padding: 0 32rpx;
+  width: 100%;
+}
+.header-title .titlename {
+  font-size: 17px;
+}
+.header-title .goback {
+  width: 30px;
+}
+.header-title .righttext {
+  width: 112rpx;
+}
+.header-title .gohome {
+  margin-left: 20rpx;
+}
+.header-title .gohome image {
+  width: 80rpx;
+  height: 80rpx;
+}
+.loglist {
+  margin: 40rpx 32rpx 0;
+}
+.loglist .log_item {
+  height: 84rpx;
+  border-bottom: 1px solid #EFF0F1;
+  font-size: 26rpx;
+  justify-content: space-between;
+}
+.loglist .log_item .logtime {
+  color: #C3C6CB;
+  margin-right: 18rpx;
+  min-width: 160rpx;
+  text-align: right;
+}
+.loglist .log_item .logaction {
+  color: #2B3036;
+}
+.loglist .log_item .logaction text {
+  color: #04B49C;
+}
+.nomore {
+  height: 90rpx;
+  color: #8D9399;
+}

+ 36 - 119
pages/auth/index.js

@@ -1,167 +1,84 @@
-// pages/auth/index.js
+import $ from './../../utils/Tool';
 const app = getApp();
 const AUTH = require('../../utils/auth');
 import {userSave,getuserPhone} from "../../requests/api";
+import router from '../../utils/router';
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    canIUse: wx.canIUse('button.open-type.getUserInfo'),
     phonePop:false,
     wxqcode:'',
-    locationFalg:false,
   },
   getUserInfoFn(res){
     if(res.detail.errMsg==='getUserInfo:ok'){
-      app.globalData.userInfo=res.detail.userInfo;
-      this.setData({phonePop:true});
-    }else{
-      this.setData({phonePop:true});
+      $.store.set('userInfo',res.detail.userInfo)
     }
+    this.setData({phonePop:true});
   },
   bindGetPhoneNumber(e){
     if (e.detail.errMsg == "getPhoneNumber:ok"){
-      AUTH.checkHasLogined().then(isLogined=>{
-        console.log(isLogined,"isLogined")
-        if(isLogined){
-          var data={};
-          data.encryptedData=e.detail.encryptedData;
-          data.iv=e.detail.iv;
-          data.openid=wx.getStorageSync('openId') || app.globalData.openId;
-          getuserPhone(data).then(async result=>{
-            console.log(result,"result")
-            if(result.result==="success"){
-              app.globalData.phoneNumber=result.phoneNumber;
-              await this.creatUser();
-              this.goHome();
-            }
-          })
-        }
-      })
+      let isLogined = AUTH.checkHasLogined();
+      if(isLogined){
+        var data={};
+        data.encryptedData=e.detail.encryptedData;
+        data.iv=e.detail.iv;
+        data.openid=wx.getStorageSync('openId') || app.globalData.openId;
+        getuserPhone(data).then(async result=>{
+          if(result.result==="success"){
+            $.store.set('phoneNumber',result.phoneNumber);
+            await this.creatUser();
+            this.goHome();
+          }
+        })
+      }
     }else{
-      this.goHome()
+      this.goHome();
     }
   },
-  
+
   goHome(){
-    // wx.redirectTo({
-    //   url: '../index/index',
+    // let pages = getCurrentPages();
+    // let prevPage = pages[ pages.length - 2 ];
+    // prevPage.setData({
+    //   formAuth:true,
     // })
-    let pages = getCurrentPages(); 
-    let prevPage = pages[ pages.length - 2 ];
-    if(this.data.wxqcode){
-      prevPage.setData({  // 将我们想要传递的参数在这里直接setData。上个页面就会执行这里的操作。
-        wxqcode:this.data.wxqcode,
-        formWxcode:true,
-      })
-    }
-    
-    console.log(prevPage,"prevPage")
-    prevPage.setData({ 
-      formAuth:true,
-    })
-    console.log(prevPage.data,"prevPage")
-    wx.navigateBack({
-      delta: 1  // 返回上一级页面。
-    })
+    router.reLaunch();
   },
   onClose(event){
-    console.log(event);
     if(event.detail==="cancel"){
       this.setData({phonePop:false});
-      wx.setStorage({
-        data: true,
-        key: 'clickPhone',
-      })
-      // wx.redirectTo({
-      //   url: '../index/index',
-      // })
+      $.store.set('clickPhone',true)
       this.goHome();
     }
   },
   // 创建用户
   async creatUser(){
     const data={};
-    data.phone =app.globalData.phoneNumber;
-    data.openId =wx.getStorageSync('openId') ;
-    data.nickname=app.globalData.userInfo.nickName;
+    data.phone = $.store.get('phoneNumber');
+    data.openId =$.store.get('openId') ;
+    const {nickName} = $.store.get('userInfo')
+    data.nickname=nickName;
     // data.userName=app.globalData.userInfo.nickName;
     console.log(data);
     let res = await userSave(data);
     if(res.result==="success"){
-      app.globalData.userId=res.id;
-      wx.setStorageSync('userId', res.id);
-      wx.setStorageSync('logined', true);
+      $.store.set('userId',res.id);
+      $.storage.set('userId', res.id);
+      // $.store.set('userId',data.openId);
+      // $.storage.set('userId', data.openId);
+      $.storage.set('logined',true);
     }
   },
-  async getUserLocation() {
-    var that = this;
-    await wx.getLocation({
-      altitude: 'false',
-      type: 'wgs84',
-      complete: (res) => {
-        that.setData({locationFalg:true})
-      },
-      success:async res=> {
-        let data={}
-        data.x=res.longitude;
-        data.y=res.latitude;
-        that.setData({
-          latitude:res.latitude
-        })
-        that.setData({
-          longitude:res.longitude
-        })
-        wx.setStorageSync('latitude', res.latitude)
-        wx.setStorageSync('longitude', res.longitude)    
-      },
-      fail() {
-
-        // Toast.fail('未定位到您所在位置');
-        // that.checkPower();
-        // that.setData({havePower:{result:"fail",message:"未定位到您的位置"}})
-      }
-    })
-  },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.getUserLocation();
-    var wxqcode=wx.getStorageSync('wxqcode');
-    if(wxqcode){
-      this.setData({wxqcode:wxqcode})
-    }
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
 
   },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
+  onshow(){
 
   },
 })

+ 3 - 3
pages/auth/index.wxml

@@ -1,6 +1,6 @@
-<!--pages/auth/index.wxml-->
-<view class="login_box" wx-if="{{locationFalg}}">
-	<van-dialog use-slot show="{{ phonePop }}" show-cancel-button confirm-button-open-type="getPhoneNumber" 
+<view class="login_box">
+
+	<van-dialog use-slot show="{{ phonePop }}" show-cancel-button confirm-button-open-type="getPhoneNumber"
 	bind:close="onClose" bind:getphonenumber="bindGetPhoneNumber">
 		<view class="phonetxt">
 			朵朵环境管家请求获取您的手机号

+ 129 - 0
pages/detail/index.js

@@ -0,0 +1,129 @@
+import $ from './../../utils/Tool';
+import router from './../../utils/router';
+import {
+  getPropertyData
+} from "../../requests/api";
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    envLevel:{
+      temperature:[
+        {name:"偏冷",value:"22-24°C",min:22,active:true},
+        {name:"舒适",value:"24-26°C",min:24},
+        {name:"",value:"26-28°C",min:26,active:true},
+        {name:"偏热",value:"28-30°C",min:28},
+        {name:"",value:"30-32°C",min:30,active:true},
+      ],
+      humidity:[
+        {name:"",value:"0-35%",min:0,active:true},
+        {name:"",value:"35-45%",min:35},
+        {name:"适宜",value:"45-55%",min:45},
+        {name:"",value:"55-65%",min:55,active:true},
+        {name:"",value:"65-95%",min:65,active:true},
+        {name:"",value:"95-100%",min:95,active:true},
+      ],
+      co2:[
+        {name:"",value:"0-450ppm",min:0},
+        {name:"合理范围",value:"450-700ppm",min:450},
+        {name:"",value:"700-1000ppm",min:700,active:true},
+        {name:"",value:"1000-2500ppm",min:1000,active:true},
+        {name:"",value:"2500-5000ppm",min:2500,active:true}
+      ],
+      pm25:[
+        {name:"优",value:"0~35μg/m³",min:0,active:true},
+        {name:"良",value:"35~75μg/m³",min:35,active:true},
+        {name:"轻度污染",value:"75~115μg/m³",min:75,active:true},
+        {name:"中度污染",value:"115~150μg/m³",min:115,active:true},
+        {name:"重度污染",value:"150~250μg/m³",min:150,active:true},
+        {name:"严重污染",value:"大于250μg/m³及以上",min:250,active:true},
+      ],
+      hcho:[
+        {name:"",value:"0-0.05mg/m³",min:0},
+        {name:"合理范围",value:"0.05-0.08mg/m³",min:0.05},
+        {name:"",value:"0.08-0.1mg/m³",min:0.08,active:true},
+        {name:"",value:"0.1-0.15mg/m³",min:0.1,active:true},
+        {name:"",value:"0.15-0.2mg/m³",min:0.15,active:true}
+      ],
+    },
+    paramName:'',
+    envType:'',
+    localName:'',
+    envValue:"",
+    tableHight:null,
+    pointerTop:0,
+    funcid:"",
+    spaceId:"",
+    projectId:"",
+    tragetChart:[]
+  },
+  goBack(){
+    router.pop()
+  },
+  async getChartDate(){
+    let data={
+      projectId:this.data.projectId,
+      spaceId:this.data.spaceId,
+      funcid:this.data.funcid
+    }
+    $.loading();
+    let res = await getPropertyData(data);
+    $.hideLoading();
+    if(!res){
+      throw "网络错误";
+    }
+    let {avg,propertyData,dayTarget}=res;
+    this.initChartdate(propertyData,dayTarget);
+    let levelList=[];
+    this.data.envLevel[this.data.envType].forEach(item=>{
+      levelList.push(item.min)
+    })
+    levelList.push(Number(avg))
+    let valueIndex = levelList.sort((a,b)=>{return a-b}).findIndex(item=>item===avg);
+    valueIndex = valueIndex<0?0:valueIndex;
+    this.setData({pointerTop:38*valueIndex});
+  },
+  initChartdate(propertyData,dayTarget){
+    if(!Array.isArray(propertyData)||!Array.isArray(dayTarget)){
+      return ;
+    }
+    // 目标  { time: "1951",release:0, sales: 38,标准区间: [ 25, 45 ] },
+    let baseArr=propertyData&&propertyData.slice(1) || [];
+    let tragetChart = [];
+    (baseArr.length>1)&&baseArr.forEach(item=>{
+        item[1] = item[1]=="-9999"?null:item[1];
+    });
+    if(baseArr.length===dayTarget.length){
+      dayTarget.forEach((item,index)=>{
+        let time ='';
+        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 initObj={
+          time:time,
+          release:index,
+          sales:baseArr[index][1],
+          标准区间:[minarea,maxarea],
+        }
+        tragetChart.push(initObj);
+      })
+    }
+
+    this.setData({tragetChart})
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    options = JSON.parse(decodeURIComponent(JSON.stringify(options)))
+    let {param,name,localname,spaceid,funcid,projectid} = options
+    this.setData({paramName:name,envType:param,localName:localname,spaceId:spaceid,funcid,projectId:projectid})
+    let that= this;
+    wx.createSelectorQuery().select('.param_list').boundingClientRect(function(rect){
+      that.setData({'tableHight':rect.height})
+    }).exec()
+    this.getChartDate();
+  },
+})

+ 6 - 0
pages/detail/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "envchart":"../../components/envchart/envchart"
+  },
+  "navigationStyle":"custom"
+}

+ 130 - 0
pages/detail/index.less

@@ -0,0 +1,130 @@
+.header-title{
+    justify-content: space-between;
+    padding: 0 32rpx;
+    width: 100%;
+    .goback{
+        width:30px;
+    }
+    .righttext{
+        width: 30px;
+    }
+    .titlename{
+        font-size: 17px;
+    }
+}
+.nodate{
+    height: 360rpx;
+    color:var(--nodateColor);
+    font-size: 13px;
+}
+.chartlenged{
+    margin: 32rpx 32rpx 0;
+    justify-content: flex-end;
+    &>view{
+        margin-left: 24rpx;
+        font-size: 26rpx;
+        color: #8D9399;
+        line-height: 14px;
+        image{
+            width: 13px;
+            height: 5px;
+            margin-right: 8rpx;
+        }
+        &>view{
+            width: 20rpx;
+            height: 20rpx;
+            margin-right: 8rpx;
+            background: #B2E6F2;
+        }
+        .circle{
+            background:#04B49C;
+            border-radius: 50%;
+        }
+    }
+    .tips{
+        width: 40rpx;
+        height: 40rpx;
+        border-radius: 50%;
+        background: #EAFAF8;
+        color:#04B49C;
+    }
+}
+.chart_contant{
+    height: 360rpx;
+    width: 100%;
+}
+.param_mian{
+    margin: 32rpx 32rpx 0;
+    .param_txt{
+        font-size: 15px;
+        color: #2B3036;
+    }
+    .param_list{
+        // overflow: hidden;
+        margin-top: 36rpx;
+        .param_line{
+            width: 12rpx;
+            height: 100%;
+            margin-right: 28rpx;
+            position: relative;
+            background: linear-gradient(180deg, #34C724 0%, #B3D600 25%, #FFC60A 50%, #F54E45 75%, #F01D94 100%);
+            border-radius: 4px;
+            .pointer{
+                position: absolute;
+                top: 0;
+                left: -30rpx;
+                transition: all 0.3s ease;
+                image{
+                    width: 68rpx;
+                    height: 24rpx;
+                }
+            }
+        }
+        .temperature_line{
+            background: linear-gradient(180deg, #1054f4 0%, #34C724 50%, #FFC60A 65%, #F01D94 100%);
+        }
+        .humidity_line{
+            background: linear-gradient(180deg,#F01D94 0%, #FFC60A 20%, #34C724 60%,#1054f4 100%, );
+        }
+        .co2_line{
+            background: linear-gradient(180deg, #34C724 43%, #FFC60A 80%,#F01D94 100%);
+        }
+        .hcho_line{
+            background: linear-gradient(180deg, #34C724 43%, #FFC60A 80%,#F01D94 100%);
+        }
+        .param_table{
+            width: 624rpx;
+            &>view{
+                display: flex;
+                font-size: 13px;
+                .header_title_one{
+                    width: 40%;
+                    padding-left: 10rpx;
+                    border-bottom:1px solid transparent;
+                }
+                .header_title_one_active{
+                    border-bottom:1px solid #EFF0F1;
+                }
+                .header_title_two{
+                    width: 60%;
+                    border-bottom:1px solid #EFF0F1;
+                }
+            }
+            .table_header{
+                height: 64rpx;
+                line-height: 64rpx;
+                font-weight: 500;
+                color: #2B3036;
+                background: #F8F9FA;
+            }
+            .table_body{
+                height: 74rpx;
+                line-height: 74rpx;
+                color: #2B3036;
+                // border-bottom:1px solid #EFF0F1;
+            }
+        }
+    }
+
+
+}

+ 48 - 0
pages/detail/index.wxml

@@ -0,0 +1,48 @@
+<loading id="loading"/>
+<van-sticky>
+    <header>
+        <view slot="content" class="header-title flex_row">
+            <view class='goback' bindtap="goBack">
+                <van-icon name="arrow-left" />
+            </view>
+            <text class="titlename">{{paramName}}</text>
+            <text class="righttext"></text>
+        </view>
+    </header>
+</van-sticky>
+<view class="chartlenged flex_row">
+    <view class="flex_row"><image src="../../static/images/lenged.png"/>{{paramName}}</view>
+    <view class="flex_row"><view></view>合格区间</view>
+</view>
+<!-- <view class="chart_contant flex_row"> -->
+    <view class="nodate flex_row" wx:if="{{tragetChart&&!tragetChart.length}}">暂无数据</view>
+    <envchart tragetChart="{{tragetChart}}" envType="{{envType}}" envName="{{paramName}}" wx:if="{{tragetChart&&tragetChart.length}}"/>
+<!-- </view> -->
+<view class="param_mian">
+    <text class="param_txt">
+        根据{{localName}}检测网的新标准,24小时平均值标准值分布如下:
+    </text>
+    <view class="param_list flex_row">
+        <view class="param_icon">
+            <!-- <image src="" /> -->
+        </view>
+        <view class="param_line {{envType=='hcho'?'hcho_line':''}} {{envType=='co2'?'co2_line':''}} {{envType=='temperature'?'temperature_line':''}} {{envType=='humidity'?'humidity_line':''}}" style="height:{{tableHight}}px">
+            <view class="pointer" style="top:{{pointerTop}}px">
+                <image src="../../static/images/envPointer.png" />
+            </view>
+        </view>
+        <view class="param_table">
+            <view class="table_header">
+                <text class="header_title_one">{{localName}}等级</text>
+                <text class="header_title_two">24小时{{localName}}平均值标准值</text>
+            </view>
+            <block wx:for="{{envLevel[envType]}}" wx:for-index="key">
+                <view class="table_body">
+                    <text class="header_title_one {{item.active?'header_title_one_active':''}}">{{item.name}}</text>
+                    <text class="header_title_two">{{item.value}}</text>
+                </view>
+            </block>
+
+        </view>
+    </view>
+</view>

+ 126 - 0
pages/detail/index.wxss

@@ -0,0 +1,126 @@
+.header-title {
+  justify-content: space-between;
+  padding: 0 32rpx;
+  width: 100%;
+}
+.header-title .goback {
+  width: 30px;
+}
+.header-title .righttext {
+  width: 30px;
+}
+.header-title .titlename {
+  font-size: 17px;
+}
+.nodate {
+  height: 360rpx;
+  color: var(--nodateColor);
+  font-size: 13px;
+}
+.chartlenged {
+  margin: 32rpx 32rpx 0;
+  justify-content: flex-end;
+}
+.chartlenged > view {
+  margin-left: 24rpx;
+  font-size: 26rpx;
+  color: #8D9399;
+  line-height: 14px;
+}
+.chartlenged > view image {
+  width: 13px;
+  height: 5px;
+  margin-right: 8rpx;
+}
+.chartlenged > view > view {
+  width: 20rpx;
+  height: 20rpx;
+  margin-right: 8rpx;
+  background: #B2E6F2;
+}
+.chartlenged > view .circle {
+  background: #04B49C;
+  border-radius: 50%;
+}
+.chartlenged .tips {
+  width: 40rpx;
+  height: 40rpx;
+  border-radius: 50%;
+  background: #EAFAF8;
+  color: #04B49C;
+}
+.chart_contant {
+  height: 360rpx;
+  width: 100%;
+}
+.param_mian {
+  margin: 32rpx 32rpx 0;
+}
+.param_mian .param_txt {
+  font-size: 15px;
+  color: #2B3036;
+}
+.param_mian .param_list {
+  margin-top: 36rpx;
+}
+.param_mian .param_list .param_line {
+  width: 12rpx;
+  height: 100%;
+  margin-right: 28rpx;
+  position: relative;
+  background: linear-gradient(180deg, #34C724 0%, #B3D600 25%, #FFC60A 50%, #F54E45 75%, #F01D94 100%);
+  border-radius: 4px;
+}
+.param_mian .param_list .param_line .pointer {
+  position: absolute;
+  top: 0;
+  left: -30rpx;
+  transition: all 0.3s ease;
+}
+.param_mian .param_list .param_line .pointer image {
+  width: 68rpx;
+  height: 24rpx;
+}
+.param_mian .param_list .temperature_line {
+  background: linear-gradient(180deg, #1054f4 0%, #34C724 50%, #FFC60A 65%, #F01D94 100%);
+}
+.param_mian .param_list .humidity_line {
+  background: linear-gradient(180deg, #F01D94 0%, #FFC60A 20%, #34C724 60%, #1054f4 100%);
+}
+.param_mian .param_list .co2_line {
+  background: linear-gradient(180deg, #34C724 43%, #FFC60A 80%, #F01D94 100%);
+}
+.param_mian .param_list .hcho_line {
+  background: linear-gradient(180deg, #34C724 43%, #FFC60A 80%, #F01D94 100%);
+}
+.param_mian .param_list .param_table {
+  width: 624rpx;
+}
+.param_mian .param_list .param_table > view {
+  display: flex;
+  font-size: 13px;
+}
+.param_mian .param_list .param_table > view .header_title_one {
+  width: 40%;
+  padding-left: 10rpx;
+  border-bottom: 1px solid transparent;
+}
+.param_mian .param_list .param_table > view .header_title_one_active {
+  border-bottom: 1px solid #EFF0F1;
+}
+.param_mian .param_list .param_table > view .header_title_two {
+  width: 60%;
+  border-bottom: 1px solid #EFF0F1;
+}
+.param_mian .param_list .param_table .table_header {
+  height: 64rpx;
+  line-height: 64rpx;
+  font-weight: 500;
+  color: #2B3036;
+  background: #F8F9FA;
+}
+.param_mian .param_list .param_table .table_body {
+  height: 74rpx;
+  line-height: 74rpx;
+  color: #2B3036;
+}

File diff suppressed because it is too large
+ 0 - 253
pages/efficient/index.js


+ 0 - 12
pages/efficient/index.json

@@ -1,12 +0,0 @@
-{
-  "usingComponents": {
-    "van-checkbox": "../../vant-weapp/dist/checkbox/index",
-    "van-checkbox-group": "../../vant-weapp/dist/checkbox-group/index",
-    "spacecard": "../../components/spacecard/index",
-    "time-picker2": "../../components/time-picker2/index",
-    "van-divider": "../../vant-weapp/dist/divider/index",
-    "van-popup": "../../vant-weapp/dist/popup/index",
-    "lottie": "../../miniprogram_npm/lottie-miniapp/component/lottie"
-  },
-  "navigationBarTitleText": "关闭空调"
-}

+ 0 - 54
pages/efficient/index.wxml

@@ -1,54 +0,0 @@
-<!--pages/efficient/index.wxml-->
-<view class="work_off">
-	<view class="allselect">
-		<text>这里仅展示您关注的房间哟</text>
-		<text bindtap="allSelect">全选</text>
-	</view>
-	<!--  {{imgShow?'':'del_box'}} -->
-	<view  class="checkitems">
-		<van-checkbox-group bind:change="checkChange" value="{{ checkedList }}">
-			<!--  disabled="{{true}}" -->
-			<block wx:for="{{listContent}}">
-				<van-checkbox name="{{item.id}}" shape="square" wx:key="{{index}}" disabled="{{item.isClose}}">
-					<spacecard isCheckbox="true" cardDate="{{item}}" canvashidden="{{!poptimeValue&&!secondpopValue}}"></spacecard>
-				</van-checkbox>
-				<van-divider custom-style="padding-left: 8.5%" />
-			</block>
-		</van-checkbox-group>
-		<!-- <time-picker /> -->
-	</view>
-	<view class="checkfooter"></view>
-	<!-- popValue -->
-	<cover-view wx:if="{{ popValue }}" class="lifan"> 
-		<cover-view class="spacedetail">
-			<cover-view class="detailtxt">
-				<cover-view>{{monthDay}} 恢复正常,</cover-view>
-				<cover-view bindtap="changeTime" class="detailtxtclick">点击修改</cover-view>
-			</cover-view>
-			<cover-view bindtap="openClose" class="custom_button">确定关闭空调</cover-view>
-		</cover-view>
-	</cover-view>
-
-	<van-popup show="{{ poptimeValue }}" round closeable bind:close="popClose" position="bottom" custom-style="height:624rpx" wx:if="{{poptimeValue}}">
-		<view class="spacedetail">
-			<view class="space_title">修改时间</view>
-			<view class="space_title space_smalltitle">(系统判断是否会生效)</view>
-			<time-picker2 wx:if="{{poptimeValue}}" InitTime="{{InitTime}}" bind:timeChange="getTimevalue" nextOpenTime="{{monthDaystring}}" />
-			<view class="custom_button" bindtap="commitBtn">确定</view>
-		</view>
-	</van-popup>
-	<!-- 关机二次确认弹窗 -->
-	<van-popup show="{{ secondpopValue }}" round bind:close="commitClose" position="bottom" custom-style="height:400rpx;border-top:1px solid #ededee">
-		<view class="spacedetail seconddetail">
-			<view class="secondtxt secondtxt_title">
-				<view class="lottie" wx:if="{{!popShow}}">
-					<lottie id="lottie" animationData="{{canvasDate}}" width="25" height="25" />
-				</view>
-				空调将关闭
-			</view>
-			<view class="secondtxt">为您的节能意识点赞</view>
-			<view class="secondtxt">今日不会自动开启环境调节,如您需要可手动开启</view>
-			<view class="custom_button" bindtap="commitClose">关闭</view>
-		</view>
-	</van-popup>
-</view>

+ 0 - 97
pages/efficient/index.wxss

@@ -1,97 +0,0 @@
-/* pages/efficient/index.wxss */
-.work_off{
-  /* padding:0 20rpx ; */
-}
-.allselect{
-  display: flex;
-  align-items: center;
-  padding: 16rpx;
-  height:80rpx;
-  background:#F4F4F5;
-  justify-content: space-between;
-  /* flex-direction:row-reverse */
-}
-.allselect text:nth-child(2){
-  color: #5575FF;
-  font-size:16px;
-}
-.allselect text:nth-child(1){
-  color: #191B26;
-  font-size: 14px;
-}
-.van-checkbox__label {
-  width: 90%;
-}
-.checkitems{
-  margin:24rpx 0 0 32rpx;
-}
-.spacedetail {
-  padding: 25rpx 32rpx 0;
-}
-.space_title{
-  text-align: center;
-  margin-bottom: 20rpx;
-}
-.space_smalltitle{
-  font-size: 12px;
-}
-.checkfooter{
-  height: 240rpx;
-}
-.detailtxt{
-  display: flex;
-  justify-content: center;
-  /* align-items: center; */
-  /* text-align: center; */
-  font-size:14px;
-  color: #80838F;
-}
-.detailtxtclick{
-  color: #5575FF;
-}
-.custom_button{
-  box-sizing: content-box;
-  padding: 24rpx 32rpx;
-  height: 40rpx;
-  display: flex;
-  margin-top: 32rpx;
-  justify-content: center;
-  text-align: center;
-  align-items: center;
-  background-color: #5575FF;
-  color: #ffffff;
-  font-size: 16px;
-  border-radius:40rpx;
-}
-.lifan {
-  z-index: 999;
-  width: 100%;
-  background-color: #ffffff;
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  height: 300rpx;
-  height:240rpx;
-  border-top:1px solid #ededee
-}
-.lottie{
-  width: 50rpx;
-  height: 50rpx;
-}
-.seconddetail{
-  color:#333333;
-}
-.secondtxt{
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  font-size: 14px;
-  margin-bottom: 20rpx;
-}
-.secondtxt_title{
-  font-size: 20px;
-  margin-bottom: 18rpx;
-}
-.del_box{
-  display: none;
-}

+ 243 - 0
pages/feedback/index.js

@@ -0,0 +1,243 @@
+import $ from './../../utils/Tool'
+import router from './../../utils/router'
+import {gethouseKeeper,getSpaceAdjustList,submitFeedback} from '../../requests/api';
+let timer=null;
+Page({
+  data: {
+    debunkList:[
+      {
+        label:'1',
+        name:"多次调节无效果"
+      },
+      {
+        label:'2',
+        name:"噪音大"
+      },
+      {
+        label:'3',
+        name:"吹风感强"
+      },
+      {
+        label:'4',
+        name:"有异味"
+      },
+      {
+        label:'5',
+        name:"空调设备故障"
+      }
+    ],
+    debunkValue:0,
+    fileList:[],
+    showUpload:true,
+    photoType:'', // 0照片 1视频
+    houseKeeper:null,
+    spaceId:null,
+    spaceName:'',
+    formSearch:false,
+    imgbaseUrl:$.store.get('imgbaseUrl')
+  },
+  goBack(){
+    router.pop()
+  },
+  goHome(){
+    $.store.set('goHome',true);
+    router.toHome()
+  },
+  chooseSpace(){
+    router.push('search')
+  },
+  makePhoneCall(e){
+    let phone = e.currentTarget.dataset.phone;
+    console.log(e)
+    wx.makePhoneCall({
+      phoneNumber: phone,
+      success:function(){
+        console.log('拨打成功')
+      },
+      fail:function(){
+        console.log('拨打失败')
+      }
+    })
+  },
+  debunkChange(event){
+    if(event.detail!==this.data.debunkValue){
+      this.setData({
+        debunkValue: event.detail,
+      });
+    }else{
+      this.setData({
+        debunkValue: 0,
+      });
+    }
+  },
+  inputChange(e){
+    let {value} = e.detail;
+    if(timer){
+      clearTimeout(timer)
+    }
+    timer = setTimeout(()=>{
+        if(value==null){
+          //这里表示  如果搜索框中没有数据的话,做的一些处理
+        }else{
+          this.setData({suggest:value},()=>{
+            console.log(this.data.suggest)
+          })
+        }
+    },300)
+
+    console.log(e);
+    // event.detail = {value, cursor, keyCode}
+  },
+  uploadVadio(){
+    const that = this;
+    wx.chooseMedia({
+      count: 1,
+      maxDuration: 15,
+      sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
+      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+      success: function(res) {
+
+          let tempFilePaths = res.tempFiles[0].tempFilePath;
+          if(tempFilePaths.split('.').pop()==="mp4"){
+            that.setData({photoType:'1'})
+          }else{
+            that.setData({photoType:'0'})
+          }
+          let fileList = that.data.fileList.concat(tempFilePaths);
+          if (fileList.length==1){
+              that.setData({
+                  showUpload:false
+              })
+          }
+          that.setData({
+            fileList,
+          })
+      }
+  })
+  },
+  uploadFile(){
+    let fileName = new Date().getTime();
+    let fileType = this.data.photoType=='0'?'.png':'.mp4';
+    this.setData({fileName:`${fileName}${fileType}`})
+    return new Promise((resolve,reject)=>{
+      wx.uploadFile({
+        url: `https://duoduoenv.sagacloud.cn/server/common/upload?name=${fileName}${fileType}`,
+        filePath: this.data.fileList[0],
+        name: 'file',
+        success: (resp) => {
+          console.log(resp);
+          resolve(resp)
+        },
+        fail:(res)=>{
+          reject(res)
+        }
+      })
+    })
+
+  },
+  clearImg(){
+    this.setData({fileList:[],showUpload:true,photoType:''})
+  },
+  getKeeper(){
+    let data={
+      // "criteria": {
+          // "projectId": $.store.get('projectId'),
+          "tenantId":$.store.get('tenantId')
+      // }
+    }
+    gethouseKeeper(data).then(res=>{
+        let {data} = res;
+        this.setData({houseKeeper:data})
+    })
+  },
+  getFirstSpace(){
+    const data = {
+      "criteria": {
+        "userId": $.store.get('userId'),
+        "projectId": $.store.get('projectId'),
+        "tenantId":  $.store.get('tenantId')
+      }
+    }
+    getSpaceAdjustList(data).then((res)=>{
+      if(res.count){
+        let item = res.content[0];
+        this.setData({
+          spaceId:item.id,
+          spaceName:item.localName
+        })
+      }
+    })
+  },
+  async submitFeed(){
+    console.log("进入提交函数")
+    if(!this.data.spaceId){
+      wx.showToast({
+        title: '未选择空间',
+        duration: 1500
+      })
+      return
+    }
+    if(!this.data.debunkValue&&!this.data.suggest&&!this.photoType){
+      wx.showToast({
+        title: '请填写内容!',
+        icon:'none',
+        duration: 1500
+      })
+      return
+    }
+    console.log("进入提交函数2")
+    let data={
+      "projectId":$.store.get('projectId'),
+      "spaceId":this.data.spaceId,
+      "userId":$.store.get('userId'),
+      "phone":$.store.get('phone'),//反馈人手机号
+      "type":0,//反馈来源 0 小程序 1 app 2 pc
+      "suggest":this.data.suggest,//反馈建议
+    }
+    this.data.debunkValue&&(data.item=this.data.debunkValue);
+    if(this.data.photoType!==''){
+      let res  = await this.uploadFile();
+      data.photoList=[{"type":this.data.photoType,"photo":this.data.fileName}]
+    }
+    console.log(data,"正在提交")
+    submitFeedback(data).then(res=>{
+      if(res.result=="success"){
+        wx.hideLoading();
+        setTimeout(function () {
+          wx.showToast({
+            title:"提交成功",
+            duration: 2000
+          })
+        }, 300)
+        this.setData({fileList:[],debunkValue:0,suggest:'',showUpload:true})
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    !this.formSearch&&this.getFirstSpace();
+    this.getKeeper();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+})

+ 7 - 0
pages/feedback/index.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "van-radio": "../../vant-weapp/dist/radio/index",
+    "van-radio-group": "../../vant-weapp/dist/radio-group/index"
+  },
+  "navigationStyle":"custom"
+}

+ 179 - 0
pages/feedback/index.less

@@ -0,0 +1,179 @@
+.header-title{
+    background-color: #ffffff;
+    justify-content: space-between;
+    padding: 0 32rpx;
+    width: 100%;
+    .titlename{
+        font-size: 17px;
+    }
+    .righttext{
+        width: 16px;
+    }
+    .gohome{
+        margin-left: 24rpx;
+        image{
+            width: 80rpx;
+            height: 80rpx;
+        }
+    }
+}
+page{
+    background-color: #fafbfb;
+}
+.feedback_content{
+    margin: 0 32rpx;
+    .item_title{
+        font-size: 16px;
+        margin: 32rpx 0 24rpx;
+        overflow: hidden;
+        color: #2B3036;
+        text{
+            color: #8D9399;
+        }
+    }
+    .contact{
+        .contact_card{
+            position: relative;
+            z-index: 2;
+            // background-image:url("../static/images/service.png") no-repeat 0 0;
+            background-color: #ffffff;
+            height: 380rpx;
+            &>image{
+                width: 100%;
+                height: 380rpx;
+                position: absolute;
+                top: 0;
+                left: 0;
+                z-index:-1;
+            }
+            .card_left{
+                &>text{
+                    font-size: 32rpx;
+                    color: #2B3036;
+                }
+                .opentime{
+                    font-size:26rpx;
+                    color: #8D9399;
+                }
+                .phone{
+                    font-size: 48rpx;
+                    font-weight: bold;
+                    color: #04B49C;
+                    margin: 40rpx 0 30rpx;
+                    image{
+                        width: 36rpx;
+                        height: 36rpx;
+                        margin-right: 12rpx;
+                    }
+                }
+
+            }
+            .card_right{
+                &>view{
+                    width: 240rpx;
+                    height: 240rpx;
+                    image{
+                        width: 240rpx;
+                        height: 240rpx;
+                    }
+                }
+            }
+
+        }
+    }
+    .debunk{
+        background-color: #ffffff;
+        box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+        border-radius: 4px;
+        padding: 32rpx 24rpx 64rpx;
+        .selectspace{
+            justify-content: space-between;
+            text{
+                font-size: 17px;
+                color: rgba(0, 0, 0, 0.9);
+            }
+            &>view{
+                font-size: 32rpx;
+                color: #8D9399;
+                line-height: 28px;
+            }
+        }
+        .debunk_card{
+            background: #F8F9FA;
+            padding: 36rpx 24rpx 0;
+            margin-top: 32rpx;
+            .custom-rodio{
+                width:295rpx;
+                margin-bottom: 32rpx;
+                .van-radio__label{
+                    font-size: 15px;
+                    color: #8D9399;
+                }
+            }
+            .rodio_box{
+                flex-wrap: wrap;
+                justify-content: flex-start;
+                .custom-rodio:nth-child(2n){
+                    width:200rpx;
+                }
+            }
+
+
+
+        }
+        .addpicture{
+            &>.item_title{
+                font-size: 17px;
+                color: rgba(0, 0, 0, 0.9);
+            }
+            .uploader_cell{
+                .uploader_item{
+                    position: relative;
+                    display: inline-block;
+                    .prelook{
+                        width: 200rpx;
+                        height: 200rpx;
+                    }
+                    .deleteimg{
+                        position: absolute;
+                        top: 0;
+                        right: 0;
+                        z-index: 10;
+                        width: 34rpx;
+                        height: 34rpx;
+                    }
+                }
+                .uploader{
+                    width: 200rpx;
+                    height: 200rpx;
+                    background: #F8F9FA;
+                    border-radius: 2px;
+                    border: 1px solid #E4E6E7;
+                    image{
+                        width: 32rpx;
+                        height: 32rpx;
+                    }
+                }
+            }
+            .txtarea{
+                width: 100%;
+                height: 240rpx;
+                padding: 24rpx;
+                border-radius: 4px;
+                font-size: 28rpx;
+                box-sizing: border-box;
+                border: 1px solid #EFF0F1;
+            }
+
+        }
+        .submit{
+            height: 80rpx;
+            font-size:32rpx;
+            margin-top: 40rpx;
+            color:#FFFFFF;
+            background: #04B49C;
+            border-radius: 20px;
+        }
+    }
+
+}

+ 78 - 0
pages/feedback/index.wxml

@@ -0,0 +1,78 @@
+<van-sticky>
+    <header class="header_custom">
+        <view slot="content" class="header-title flex_row">
+            <view class="flex_row">
+                <view class='goback' catchtap="goBack">
+                    <van-icon name="arrow-left" />
+                </view>
+                <view class="gohome" bindtap="goHome">
+                    <image src="../../static/images/home.png" />
+                </view>
+            </view>
+            <text class="titlename">问题反馈</text>
+             <text class="righttext"></text>
+        </view>
+    </header>
+</van-sticky>
+<view class="feedback_content">
+    <view class="contact">
+        <view class="item_title">联系我们</view>
+        <view class="contact_card flex_row">
+            <!-- <image src="../../static/images/service.png" wx:if="{{!houseKeeper}}"/> -->
+            <view class="card_left">
+                <text>您的环境管家</text>
+                <view class="phone flex_row"  bindtap="makePhoneCall" data-phone="{{houseKeeper.phone}}">
+                    <image src="../../static/images/phone.png" />
+                    {{houseKeeper.phone}}
+                </view>
+                <text class="opentime">
+                    服务时间:09:00 - 18:30
+                </text>
+            </view>
+            <view class="card_right">
+                <view>
+                    <image src="{{imgbaseUrl}}{{houseKeeper.wechatQrCode}}" show-menu-by-longpress  wx:if="{{houseKeeper}}"/>
+                </view>
+            </view>
+        </view>
+    </view>
+    <view class="item_title">
+        吐槽树洞<text> 选择您要吐槽的内容:</text>
+    </view>
+    <view class="debunk">
+        <view class="selectspace flex_row" catchtap="chooseSpace">
+            <text>选择空间</text>
+            <view class="flex_row" >
+                {{spaceName}} <van-icon name="arrow" color="#aaacb1"/>
+            </view>
+        </view>
+        <view class="debunk_card">
+            <van-radio-group value="{{ debunkValue }}" bind:change="debunkChange"  class="flex_row rodio_box">
+                <block wx:for="{{debunkList}}">
+                    <van-radio name="{{item.label}}" checked-color="#04B49C" custom-class="custom-rodio">{{item.name}}</van-radio>
+                </block>
+            </van-radio-group>
+        </view>
+        <view class="addpicture">
+            <view class="item_title">添加图片或视频</view>
+            <view class='uploader_cell'>
+                <view class='uploader_item' wx:for="{{fileList}}" wx:key="{{index}}">
+                    <image  src="../../static/images/deletepic.png" class="deleteimg"  bindtap='clearImg' data-index="{{index}}"/>
+                    <!-- <icon class='ui_uploader_item_icon' bindtap='clearImg' data-index="{{index}}" type="clear" size="20" color="red"/> -->
+                    <image bindtap='showImg' data-index="{{index}}" src='{{item}}' class="prelook" wx:if="{{photoType=='0'}}"></image>
+                    <video bindtap='showImg' data-index="{{index}}" src='{{item}}' class="prelook" wx:else />
+                </view>
+                <view class='uploader flex_row' bindtap='uploadVadio' wx:if="{{showUpload}}">
+                    <image src="../../static/images/addpic.png" />
+                </view>
+            </view>
+        </view>
+        <view class="addpicture">
+            <view class="item_title">反馈和建议</view>
+            <textarea placeholder="请输入"  value="{{suggest}}" bindinput="inputChange" class="txtarea" maxlength="200" cursor-spacing="10"/>
+        </view>
+        <view class="submit flex_row" bindtap="submitFeed">
+            提交
+        </view>
+    </view>
+</view>

+ 161 - 0
pages/feedback/index.wxss

@@ -0,0 +1,161 @@
+.header-title {
+  background-color: #ffffff;
+  justify-content: space-between;
+  padding: 0 32rpx;
+  width: 100%;
+}
+.header-title .titlename {
+  font-size: 17px;
+}
+.header-title .righttext {
+  width: 16px;
+}
+.header-title .gohome {
+  margin-left: 24rpx;
+}
+.header-title .gohome image {
+  width: 80rpx;
+  height: 80rpx;
+}
+page {
+  background-color: #fafbfb;
+}
+.feedback_content {
+  margin: 0 32rpx;
+}
+.feedback_content .item_title {
+  font-size: 16px;
+  margin: 32rpx 0 24rpx;
+  overflow: hidden;
+  color: #2B3036;
+}
+.feedback_content .item_title text {
+  color: #8D9399;
+}
+.feedback_content .contact .contact_card {
+  position: relative;
+  z-index: 2;
+  background-color: #ffffff;
+  height: 380rpx;
+}
+.feedback_content .contact .contact_card > image {
+  width: 100%;
+  height: 380rpx;
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: -1;
+}
+.feedback_content .contact .contact_card .card_left > text {
+  font-size: 32rpx;
+  color: #2B3036;
+}
+.feedback_content .contact .contact_card .card_left .opentime {
+  font-size: 26rpx;
+  color: #8D9399;
+}
+.feedback_content .contact .contact_card .card_left .phone {
+  font-size: 48rpx;
+  font-weight: bold;
+  color: #04B49C;
+  margin: 40rpx 0 30rpx;
+}
+.feedback_content .contact .contact_card .card_left .phone image {
+  width: 36rpx;
+  height: 36rpx;
+  margin-right: 12rpx;
+}
+.feedback_content .contact .contact_card .card_right > view {
+  width: 240rpx;
+  height: 240rpx;
+}
+.feedback_content .contact .contact_card .card_right > view image {
+  width: 240rpx;
+  height: 240rpx;
+}
+.feedback_content .debunk {
+  background-color: #ffffff;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 4px;
+  padding: 32rpx 24rpx 64rpx;
+}
+.feedback_content .debunk .selectspace {
+  justify-content: space-between;
+}
+.feedback_content .debunk .selectspace text {
+  font-size: 17px;
+  color: rgba(0, 0, 0, 0.9);
+}
+.feedback_content .debunk .selectspace > view {
+  font-size: 32rpx;
+  color: #8D9399;
+  line-height: 28px;
+}
+.feedback_content .debunk .debunk_card {
+  background: #F8F9FA;
+  padding: 36rpx 24rpx 0;
+  margin-top: 32rpx;
+}
+.feedback_content .debunk .debunk_card .custom-rodio {
+  width: 295rpx;
+  margin-bottom: 32rpx;
+}
+.feedback_content .debunk .debunk_card .custom-rodio .van-radio__label {
+  font-size: 15px;
+  color: #8D9399;
+}
+.feedback_content .debunk .debunk_card .rodio_box {
+  flex-wrap: wrap;
+  justify-content: flex-start;
+}
+.feedback_content .debunk .debunk_card .rodio_box .custom-rodio:nth-child(2n) {
+  width: 200rpx;
+}
+.feedback_content .debunk .addpicture > .item_title {
+  font-size: 17px;
+  color: rgba(0, 0, 0, 0.9);
+}
+.feedback_content .debunk .addpicture .uploader_cell .uploader_item {
+  position: relative;
+  display: inline-block;
+}
+.feedback_content .debunk .addpicture .uploader_cell .uploader_item .prelook {
+  width: 200rpx;
+  height: 200rpx;
+}
+.feedback_content .debunk .addpicture .uploader_cell .uploader_item .deleteimg {
+  position: absolute;
+  top: 0;
+  right: 0;
+  z-index: 10;
+  width: 34rpx;
+  height: 34rpx;
+}
+.feedback_content .debunk .addpicture .uploader_cell .uploader {
+  width: 200rpx;
+  height: 200rpx;
+  background: #F8F9FA;
+  border-radius: 2px;
+  border: 1px solid #E4E6E7;
+}
+.feedback_content .debunk .addpicture .uploader_cell .uploader image {
+  width: 32rpx;
+  height: 32rpx;
+}
+.feedback_content .debunk .addpicture .txtarea {
+  width: 100%;
+  height: 240rpx;
+  padding: 24rpx;
+  border-radius: 4px;
+  font-size: 28rpx;
+  box-sizing: border-box;
+  border: 1px solid #EFF0F1;
+}
+.feedback_content .debunk .submit {
+  height: 80rpx;
+  font-size: 32rpx;
+  margin-top: 40rpx;
+  color: #FFFFFF;
+  background: #04B49C;
+  border-radius: 20px;
+}

File diff suppressed because it is too large
+ 358 - 866
pages/index/index.js


+ 3 - 15
pages/index/index.json

@@ -1,20 +1,8 @@
 {
   "usingComponents": {
-    "van-transition": "../../vant-weapp/dist/transition/index",
-    "van-button": "../../vant-weapp/dist/button/index",
-    "van-icon": "../../vant-weapp/dist/icon/index",
-    "van-popup": "../../vant-weapp/dist/popup/index",
-    "van-toast": "../../vant-weapp/dist/toast/index",
-    "navbar":"../../components/navbar/navbar",
-    "van-divider": "../../vant-weapp/dist/divider/index",
-    "swiper-dots": "../../components/swiper-dots/index",
-    "van-radio": "../../vant-weapp/dist/radio/index",
-    "van-radio-group": "../../vant-weapp/dist/radio-group/index",
-    "van-notice-bar": "../../vant-weapp/dist/notice-bar/index",
-    "van-sticky": "../../vant-weapp/dist/sticky/index",
-    "lottie": "../../miniprogram_npm/lottie-miniapp/component/lottie"
-   
+    "van-swipe-cell": "../../vant-weapp/dist/swipe-cell/index",
+    "van-toast": "../../vant-weapp/dist/toast/index"
   },
   "navigationStyle":"custom",
-  "navigationBarTitleText": "扫码调节"
+  "enablePullDownRefresh": true
 }

+ 288 - 0
pages/index/index.less

@@ -0,0 +1,288 @@
+.header-title{
+    padding: 0 32rpx;
+    width: 100%;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    background: rgba(255, 255, 255, 0.6);
+}
+.user-img{
+    width: 64rpx;
+    height: 64rpx;
+    margin-right: 24rpx;
+    border-radius: 50%;
+    overflow: hidden;
+    justify-content: center;
+
+}
+.delete_icon{
+    height: 339px;
+    display: flex;
+    align-items: center;
+    padding-left: 16px;
+    .delete_box{
+        width: 44px;
+        height: 44px;
+        background: #FEF2F1;
+        border-radius: 50%;
+        image{
+            width: 32rpx;
+            height: 32rpx;
+        }
+    }
+}
+.home-icon{
+    .projectname{
+        font-size: 16px;
+        color: #1F2329;
+        image{
+            width: 20rpx;
+            height: 10rpx;
+            margin-left: 16rpx;
+        }
+    }
+    .daytmp{
+        justify-content: start;
+        font-size: 13px;
+        color: #646A73;
+        image{
+            height: 32rpx;
+            width: 32rpx;
+        }
+    }
+}
+
+.contant_box{
+     background: #f9fafa;
+    .spacelist_box{
+        margin:20rpx 32rpx 0;
+        .space_item{
+            width: 100%;
+            height: 840rpx;
+            background: #FFFFFF;
+            box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+            border-radius: 8px;
+            margin-bottom: 40rpx;
+            .space_bg{
+                width: 100%;
+                height: 398rpx;
+                border-radius: 8px 8px 0 0;
+                overflow: hidden;
+                image{
+                    width: 100%;
+                    height: 100%;
+                }
+            }
+            .space_msg{
+               height: 154rpx;
+               padding: 0 32rpx;
+               display: flex;
+               flex-direction: row;
+               justify-content: space-between;
+               align-items: center;
+               .msg_left{
+                   .spacename{
+                        height: 56rpx;
+                        font-size: 40rpx;
+                        font-weight: 400;
+                        color: #2B3036;
+                        line-height: 56rpx;
+                   }
+                   .spacestate{
+                        font-size: 30rpx;
+                        color: #8D9399;
+                        line-height: 42rpx;
+                        margin-top: 8rpx;
+                        justify-content:flex-start;
+                        &>view{
+                            margin-left: 18rpx;
+                            width: 34rpx;
+                            height: 34rpx;
+                        }
+                   }
+               }
+               .msg_right{
+                   text{
+                        font-size: 46rpx;
+                        color: #2B3036;
+                   }
+               }
+            }
+            .space_paramelist{
+                margin: 0 24rpx;
+                height: 140rpx;
+                background: #F8F9FA;
+                border-radius: 4px;
+                .parame_item{
+                    width: 25%;
+                    .icon_name{
+                        image{
+                            width: 32rpx;
+                            height: 32rpx;
+                            margin-right: 8rpx;
+                        }
+                        color: #8D9399;
+                        font-size: 24rpx;
+                    }
+                    .parame_num{
+                        color: #646A73;
+                        font-size: 24rpx;
+                        text{
+                            font-size: 32rpx;
+                        }
+                    }
+                }
+            }
+            .space_btns{
+                display: flex;
+                align-items: center;
+                justify-content: space-around;
+                margin-top: 32rpx;
+                button{
+                    margin: 0;
+                    width: auto;
+                    display: inline-block;
+                    font-size: 26rpx;
+                    height: 76rpx;
+                    display: flex;
+                    padding-left: 0;
+                    padding-right: 0;
+                    text-align: center;
+                    flex-direction: row;
+                    align-items: center;
+                    justify-content: center;
+                    border-radius: 38rpx;
+                }
+                .btns_top{
+                    width: 162rpx;
+                    color: #8D9399;
+                    border: 1px solid #EFF0F1;
+                }
+                .btns_top_active{
+                    background: #EAFAF8;
+                    color: #04B49C;
+                    border: 0px solid #EFF0F1;
+                }
+                .btns_adjust{
+                    width: 460rpx;
+                    color: #ffffff;
+                    background-color: #04B49C;
+                    border-radius: 38rpx;
+                }
+            }
+        }
+    }
+    .nospace{
+        width: 100%;
+        max-width: 343px;
+        height: 339px;
+        border-radius: 8px;
+        border: 1px dashed #DDDDDD;
+        justify-content: space-between;
+        .nospace_center{
+            margin-top: 216rpx;
+            .nospace_img{
+                width: 120rpx;
+                height: 116rpx;
+            }
+            text{
+                font-size: 30rpx;
+                color: #000000;
+                line-height: 48rpx;
+            }
+        }
+        .nospace_msg{
+            .nospace_down{
+                width: 32rpx;
+                height: 28rpx;
+                margin: 16rpx 0 24rpx;
+            }
+            text{
+                font-size: 24rpx;
+                color: #C3C6CB;
+                line-height: 40rpx;
+            }
+        }
+
+    }
+    .scannospace{
+        width: 100%;
+        max-width: 343px;
+        height: 254px;
+        margin-top: 40rpx;
+        background: #FFFFFF;
+        box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+        border-radius: 4px;
+        .scan_box{
+            width: 198rpx;
+            height: 198rpx;
+            background: #F0F8FF;
+            border-radius: 4px;
+            image{
+                width: 78rpx;
+                height: 78rpx;
+            }
+        }
+        .scan_name{
+            margin-top: 24rpx;
+            font-size: 36rpx;
+            color: #2B3036;
+            line-height: 56rpx;
+        }
+        .scan_scr{
+            font-size: 24rpx;
+            color: #8D9399;
+            line-height: 36rpx;
+        }
+    }
+    .placeholder-view{
+        width: 100%;
+        height: 156rpx;
+    }
+}
+.faillogin{
+    background: #ffffff;
+}
+.footer_box{
+    position:fixed;
+    bottom: 0;
+    width: 100%;
+    padding: 0 32rpx;
+    box-sizing: border-box;
+    height: 78px;
+    background: #ffffff;
+    display: flex;
+    justify-content: space-around;
+    flex-direction: row;
+    box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+    border-radius: 0px 0px 4px 4px;
+}
+.spacedetail{
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+.footer_box{
+    .item_title{
+        font-size: 18px;
+        line-height: 28px;
+    }
+    .item_des{
+        color: #8D9399;
+        font-size: 12px;
+    }
+    .item_img{
+        width: 106rpx;
+        height: 106rpx;
+        background: #F0F8FF;
+        border-radius: 4px;
+        margin-right: 24rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        cover-image{
+            width: 48rpx;
+            height: 48rpx;
+        }
+    }
+}

+ 94 - 209
pages/index/index.wxml

@@ -1,212 +1,97 @@
-<wxs src="../../utils/filter.wxs" module="filter" />
-<!--index.wxml-->
-<view class="container">
+<loading id="loading"/>
 <van-sticky>
-  <!-- <van-button type="primary">基础用法</van-button> -->
-	<navbar titleText='环境调节' projectName='{{tenantName}}' homeIcon="{{tenants.length>1?true:false}}" bind:home="goProject"></navbar>
+    <header>
+        <view slot="content" class="header-title">
+            <view class='user-img' bindtap="gotoUser">
+                <open-data type="userAvatarUrl"></open-data>
+            </view>
+            <view class='home-icon'>
+                <view class="projectname flex_row" bindtap="chooseTenant">{{tenantName}}<image src="../../static/images/downarrow2.png" wx:if="{{tenants.length>1?true:false}}"/></view>
+                <view class="daytmp flex_row">
+                    <image src="../../static/images/sun.png" />
+                    {{temperatureNum}}°C
+                </view>
+            </view>
+        </view>
+    </header>
 </van-sticky>
-	<!-- 轮播图部分 -->
-	<view class="header_container">
-		<view class="header_box">
-		<!--  indicator-dots="true"  -->
-		<swiper duration="1000" circular="true" indicatorDots="{{swiperDate&&swiperDate.length>1}}" bindchange="swiperChange" current="{{swiperCurrent}}" indicator-color="#e2e2eb" indicator-active-color="#5575ff">
-			<block wx:for="{{swiperDate}}" wx:key="index">
-				<swiper-item  bindtap="changePop" data-index="{{index}}">
-					<image src="{{item.initPic}}" wx:if="{{!item.imgShow||!item.pic}}"></image>
-					<!--   -->
-					<image wx:key="index" src="{{imgbaseUrl+item.pic}}&width=2154&height=1464" wx-if="{{!item.isInit&&item.pic}}" class='{{item.imgShow ? "" : "before-load"}}' bindload="imageLoad"  data-index="{{index}}"></image>
-					<!-- <image src="{{item.pic}}" wx-if="{{item.isInit}}" mode="scaleToFill"></image> -->
-					<view class="img_footer">
-						<!-- 环境参数信息 -->
-						<view>
-							<image src="../../static/images/Temp.png" mode="aspectFill"></image>
-							温度: <view class="envitem">{{filter.mathFormat(item.temperature) || '--'}} <text>°C</text></view>
-						</view>
-						<view>
-							<image src="../../static/images/CO2.png"></image>
-							CO2: <view class="envitem">{{filter.mathFormat(item.co2) || '--'}} <text>ppm</text> </view>
-						</view>
-						<view>
-							<image src="../../static/images/RH.png"></image>
-							湿度: <view class="envitem">{{filter.mathFormat(item.humidity) || '--'}} <text>%</text></view>
-						</view>
-						<view>
-							<image src="../../static/images/PM2.5.png"></image>PM2.5: <view class="envitem">{{filter.mathFormat(item.pm25) || '--'}} <text>μg/m³</text></view>
-						</view>
-					</view>
-					<view class="fixed_box" wx:if="{{!item.isInit}}">
-						<!-- 房间及定位 -->
-						<view class="roombg"><text>{{item.localName}}</text></view>
-						<!-- bindtap="changePop" data-index="{{index}}" -->
-						<view class="envshow">
-							<view>
-							<view  class="lottie" wx:if="{{!popShow}}"><lottie id="lottie" animationData="{{statusList[item.stateId].canvasDate}}" width="25" height="25"/></view>
-								<!-- <image src="{{statusList[item.stateId].imgSrc}}"></image> -->
-								<text>{{item.state}}</text>
-							</view>
-							<view class="fixed_dec">调节
-								<van-icon name="arrow" color="#c3c6cb" />
-							</view>
-						</view>
-					</view>
-				</swiper-item>
-			</block>
-		</swiper>
-	</view>
-	</view>
-	
-	<!-- 轮播图小点 -->
-	<!-- <swiper-dots swiperCurrent="{{swiperCurrent}}" swiperNum="{{swiperDate.length}}"></swiper-dots> -->
-	<!-- 按钮部分 -->
-	<view class="btn_list">
-		<view id="{{item.id}}" catchtap="itemClick" class="btn_item" wx:for='{{meauList}}' wx:key="index">
-			<view class="item_img">
-				<!-- <van-icon name="qr" size="1em" /> -->
-				<image src="{{item.imgSrc}}" mode="aspectFill"></image>
-			</view>
-			<view>
-				<text class="item_title">{{item.title}}</text>
-				<text  class="item_des">{{item.des}}</text>
-			</view>
-			<view class="item_">
-				<van-icon name="arrow" color="#C3C6CB" />
-			</view>
-		</view>
-	</view>
-	<!-- 弹窗部分  custom-style="height:1200rpx"-->
-	<van-popup show="{{ popShow }}" round closeable="{{(popswiperDate.isClose||!feedBack)?flase:true}}" position="bottom" bind:close="popClose">
-		<view class="spacedetail" catchtouchmove="preventTouchMove" >
-			<!-- 房间名称 -->
-			<view class="space_title">{{popswiperDate.localName}}</view>
-			<!-- 数据列表 -->
-			<swiper current="{{popswiperCurrent}}" bindchange="popswiperChange" circular="true">
-				<swiper-item>
-					<view class="item_list">
-						<block wx:for="{{envList}}" wx:key="index">
-							<view class="list_item">
-								<view>{{filter.mathFormat(item.value) + item.unit|| '--'}}</view>
-								<view>{{item.name}}</view>
-							</view>
-						</block>
-					</view>
-				</swiper-item>
-				<swiper-item wx:if="{{feedBack&&!popswiperDate.isClose}}">
-				<!--  catchtouchmove='preventTouchMove'  bindtouchstart="touchHandler" wx:if="{{chartShow}}"-->
-				<!-- {{!feedBack?'123':'456'}} -->
-					<view class="canvas {{(!popShow||!chartShow)?'canvashidden':''}}}}" wx:key="{{feedBack}}" >
-						<canvas canvas-id="areaCanvas" ></canvas>
-					</view>
-					<view wx:if="{{!chartShow}}" class="canvascenter">
-						<view>小主辛苦了</view>
-						<view>还未开始显示哦</view>
-					</view>
-				</swiper-item>
-			</swiper>
-			<!-- 轮播图小点 -->
-			<swiper-dots swiperCurrent="{{popswiperCurrent}}" swiperNum="{{(feedBack&&!popswiperDate.isClose)?2:1}}"></swiper-dots>
-			<view class="envstate" wx:if="{{feedBack&&!popswiperDate.isClose}}">
-			<view class="lottie" wx:if="{{popShow}}">
-				<lottie id="lottie" animationData="{{statusList[popswiperDate.stateId].canvasDate}}" width="25" height="25" wx:key="{{statusList[popswiperDate.stateId]}}"/>
-			</view>
-				<!-- <image src="{{statusList[popswiperDate.stateId].imgSrc}}"></image> -->
-				{{popswiperDate.state}}
-			</view>
-			<van-divider wx:if="{{feedBack&&!popswiperDate.isClose}}" />
-			<!-- 反馈列表 -->
-			<view class="feedback_list" wx:if="{{feedBack&&!popswiperDate.isClose}}">
-				<view class="feedback_title">您当前的感觉是</view>
-				<view class="type_title">温度</view>
-				<view class="typelist">
-					<block wx:for="{{tempType}}" wx:key="index">
-						<view bindtap="changeType" class="{{tempTypeValue===item.id?'typelistactive':''}}" data-index="{{item.id}}" data-type="temp">
-							<image src="{{item.imgSrc}}"></image>{{item.value}}
-						</view>
-					</block>
-				</view>
-				<view class="type_title">环境</view>
-				<view class="typelist typelistlast">
-					<block wx:for="{{envType}}" wx:key="index">
-						<view bindtap="changeType" class="{{envTypeValue===item.id?'typelistactive':''}}" data-index="{{item.id}}" data-type="env">
-							<image src="{{item.imgSrc}}"></image>{{item.value}}
-						</view>
-					</block>
-				</view>
-				<view class='submitbtn {{(tempTypeValue!=-1||envTypeValue!=-1) ? "submitbtnactive" : ""}}' bindtap="submitFeedback">确定</view>
+<van-toast id="van-toast" />
+<view class="contant_box {{logined?'':'faillogin'}}">
+    <view class="spacelist_box">
+        <view class="nospace flex_column" wx:if="{{cardList&&!cardList.length}}">
+            <view class="nospace_center flex_column">
+                <image class="nospace_img" src="../../static/images/nospace.png"/>
+                <text>此处还没有空间</text>
+            </view>
+            <view class="nospace_msg flex_column">
+                <text>请选择下方途径进行调节</text>
+                <text>调节后方可添加空间</text>
+                <image class="nospace_down" src="../../static/images/downarrow.png"/>
+            </view>
+        </view>
+        <view class="scannospace flex_column" bindtap="getScancode" wx:if="{{!logined}}">
+            <view class="scan_box flex_column">
+                <image src="../../static/images/qrcode.png" />
+            </view>
+            <text class="scan_name">扫码调节</text>
+            <text class="scan_scr">扫描空间二维码</text>
+        </view>
+        <block wx:for="{{cardList}}">
+            <van-swipe-cell right-width="{{60}}" key="{{index}}">
+                <view class="space_item">
+                    <view class="space_bg">
+                        <image src="{{imgbaseUrl}}{{item.pic}}&width=1029&height=597" lazy-load="{{true}}" wx:if="{{item.pic}}"/>
+                        <image src="{{picInitUrl}}" lazy-load="{{true}}" wx:if="{{!item.pic}}"/>
+                    </view>
+                    <view class="space_msg">
+                        <view class="msg_left">
+                            <text class="spacename">{{item.localName}}</text>
+                            <view class="spacestate flex_row">
+                                <text>{{item.state}}</text>
+                                <view><lottie id="lottie{{item.id}}" animationData="{{statusList[item.stateId].canvasDate}}" width="20" height="20"/></view>
+                            </view>
+                        </view>
+                        <view class="msg_right">
+                            <text>{{item.temperature}}</text>°C
+                        </view>
+                    </view>
+                    <view class="space_paramelist flex_row">
+                        <block wx:for="{{envNamelist}}" wx:for-index="key" wx:for-item="value">
+                            <view class="parame_item flex_column one-line-text" bindtap="toDetail" :key="index">
+                                <view class="icon_name flex_row">
+                                <image src="{{value.imgSrc}}" /> {{value.name}}
+                                </view>
+                                <view class="parame_num"><text>{{(item[key]||item[key]==0)?item[key]:'--'}}</text>{{value.unit}}</view>
+                            </view>
+                        </block>
+                    </view>
+                    <view class="space_btns">
+                        <button class="btns_top {{item.top?'btns_top_active':''}}" catchtap="tapItem" data-index="{{index}}" data-spaceid="{{item}}">
+                            {{item.top?'已':''}}置顶
+                        </button>
+                        <button class="btns_adjust" catchtap="goToadjust" data-index="{{index}}">立即调节</button>
+                    </view>
+                </view>
 
-			</view>
-			<!-- 反馈后页面显示 -->
-			<view wx:if="{{!feedBack&&!popswiperDate.isClose}}">
-				<!-- 文字 -->
-				<view class="feedtext">
-					<view class="feedimgbox">
-					<!-- {{spaceStatusId}} -->
-						<view  class="lottie"><lottie id="lottie2" animationData="{{spacestatusList[spaceStatusId].canvasDate}}" width="25" height="25"/></view>
-						<!-- <image src="{{spacestatusList[spaceStatusId].imgSrc}}"></image> -->
-						<text class="feedtext_title">{{spaceStatus}}</text>
-					</view>
-					<block wx:for="{{notice}}" wx:key="{{index}}">
-						<text class="feedtext_desc">{{item}}</text>
-					</block>
-					
-					<!-- 滚动列表 -->
-					<view class="noticbox">
-						<!-- <view class="noticcontent" >
-							<block wx:for="{{equipmentStatustext}}">
-								<view class="noticbox_text">{{item.name}}</view>
-								<view class="noticbox_text">{{item.actions}}</view>
-							</block>
-							<view></view>
-						</view> -->
-						<swiper vertical autoplay duration="300" circular interval="1500">
-							<block wx:for="{{equipmentStatustext}}" >
-								<swiper-item>
-									<view class="noticbox_text">{{item.name}}</view>
-									<!-- <view class="noticbox_text">{{item.actions}}</view> -->
-								</swiper-item>
-								<swiper-item>
-									<!-- <view class="noticbox_text">{{item.name}}</view> -->
-									<view class="noticbox_text">{{item.actions}}</view>
-								</swiper-item>
-							</block>
-						</swiper>
-						<!-- <van-notice-bar color="#80838F" backgroundColor="#ffffff" text="{{ equipmentStatustext }}" speed="{{speedValue}}" ></van-notice-bar> -->
-					<!-- {{equipmentStatus}} -->
-					</view>
-					<view class="radiobox">
-					<van-radio-group value="{{addFollow}}" bind:change="addonChange" wx:if="{{!popswiperDate.subscribe}}">
-						<van-radio  name="1" shape="square">是否加入收藏</van-radio>
-					</van-radio-group>
-						<view wx:if="{{popswiperDate.subscribe}}">已加入收藏</view>
-					</view>
-				</view>
-				<!-- <view>是否加入关注列表</view> -->
-				<view class='submitbtn opencontent_openbtn ' bindtap="colseFeedback">关闭</view>
-			</view>
-			<view class="opencontent" wx:if="{{popswiperDate.isClose}}">
-				<view class="envstate" wx:if="{{statusList}}">
-					<view  class="lottie"><lottie id="lottie1" animationData="{{statusList[popswiperDate.stateId].canvasDate}}" width="25" height="25"/></view>
-					<!-- <image src="{{statusList[popswiperDate.stateId].imgSrc}}"></image> -->
-					{{popswiperDate.state}}
-				</view>
-				<!-- {{filter.formatTimeall(popswiperDate.nextOpenTime)}} -->
-				<view class="opencontent_text">预计在{{monthDay}}  重新开启环境调节</view>
-				<view class='submitbtn opencontent_openbtn' bindtap="openEnv">立即开启环境调节</view>
-			</view>
-		</view>
-	</van-popup>
-	<!-- 弹出提示框 -->
-	<van-toast id="van-toast" />
-	<!-- 关机二次确认弹窗 secondpopValue-->
-	<van-popup show="{{ secondpopValue }}" round bind:close="commitClose" position="bottom" custom-style="height:380rpx;border-top:1px solid #ededee">
-		<view class="spacedetail seconddetail">
-			<view class="secondtxt secondtxt_title">
-				<view class="lottie">
-					<lottie id="lottie" animationData="{{spacestatusList[secondIcon-1].canvasDate}}" width="25" height="25" />
-				</view>
-				{{secondSpaceStatus}}
-			</view>
-			<view class="secondtxt">{{secondNotice}}</view>
-			<view class="custom_button" bindtap="commitClose">关闭</view>
-		</view>
-	</van-popup>
-</view>
+                <view slot="right" class="delete_icon">
+                    <view class="delete_box flex_column"><image src="../../static/images/delete.png" data-spaceid="{{item.id}}" bindtap="swipeClick"/></view>
+                </view>
+            </van-swipe-cell>
+        </block>
+
+    </view>
+    <!-- 垫板 -->
+    <view class='placeholder-view' hidden="{{cardList&&cardList.length<=1}}"></view>
+</view>
+
+<cover-view class="footer_box" wx:if="{{logined}}">
+    <cover-view class="spacedetail" wx:for="{{meauList}}" wx:key="{{index}}" bindtap="meauClick" data-index="{{item.id}}">
+        <cover-view class="item_img">
+            <cover-image src="{{item.imgSrc}}" mode="aspectFill"></cover-image>
+        </cover-view>
+        <cover-view>
+            <cover-view class="item_title">{{item.title}}</cover-view>
+            <cover-view  class="item_des">{{item.des}}</cover-view>
+        </cover-view>
+    </cover-view>
+</cover-view>

+ 211 - 392
pages/index/index.wxss

@@ -1,456 +1,275 @@
-/* 轮播图样式 */
-.header_box {
-  /* width: 100%; */
-  /* padding:16rpx; */
-  box-sizing: border-box;
-  position: relative;
-  z-index: 2;
-  margin: 16rpx;
-  border-radius: 16rpx;
-  overflow: hidden;
-  position: relative;
-  background-color: #ffffff;
-  box-shadow: 0px 2px 12px 0px rgba(25, 27, 38, 0.1);
-}
-.header_container{
-  position: relative;
-  overflow: hidden;
-  z-index: 1;
-}
-.header_container::after{
-  content: '';
-  width: 100%;
-  position: absolute;
-  z-index: -1111;
-  background-color: #000000;
-  height: 400rpx;
-  border-radius: 0px 0px 18rpx 18rpx;
-  top: 0;
-  left: 0;
-}
-
-.header_box swiper {
-  position: relative;
-  height: 754rpx;
-}
-
-.header_box image {
-  height: 488rpx;
+.header-title {
+  padding: 0 32rpx;
   width: 100%;
-  overflow: hidden;
-}
-
-.img_footer {
-  height: 212rpx;
   display: flex;
+  flex-direction: row;
   align-items: center;
-  padding: 0 10rpx 0 36rpx;
-  justify-content: space-around;
-  flex-wrap: wrap;
+  background: rgba(255, 255, 255, 0.6);
 }
-
-.img_footer>view {
-  width: 50%;
-  display: flex;
-  align-items: center;
-  font-size: 32rpx;
-  color: #80838F;
+.user-img {
+  width: 64rpx;
+  height: 64rpx;
+  margin-right: 24rpx;
+  border-radius: 50%;
   overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.img_footer view>image {
-  width: 44rpx;
-  height: 44rpx;
-  margin-right: 18rpx;
-}
-
-.img_footer .envitem text {
-  font-size: 28rpx;
-  margin-left: 4rpx;
-}
-
-.img_footer .envitem {
-  color: #191B26;
-  margin-left: 16rpx;
+  justify-content: center;
 }
-
-.fixed_box {
-  top: 0;
-  left: 0;
+.delete_icon {
+  height: 339px;
   display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 488rpx;
-  padding: 32rpx 48rpx 32rpx;
-  width: 100%;
-  position: absolute;
-  color: #ffffff;
+  align-items: center;
+  padding-left: 16px;
 }
-.fixed_box>.roombg text{
-  display: inline-block;
-  background-color: rgba(6, 9, 25, 0.5);
-  padding: 10rpx 30rpx;
-  font-size: 32rpx;
-border-radius: 48rpx;
-
+.delete_icon .delete_box {
+  width: 44px;
+  height: 44px;
+  background: #FEF2F1;
+  border-radius: 50%;
 }
-.fixed_dec {
-  display: flex;
-  color: #FFFFFF;
-  font-size: 28rpx;
-  align-items: center;
+.delete_icon .delete_box image {
+  width: 32rpx;
+  height: 32rpx;
 }
-
-.envshow {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-  padding: 20rpx 48rpx;
-  border-radius: 48rpx;
-  background-color: rgba(6, 9, 25, 0.5);
+.home-icon .projectname {
+  font-size: 16px;
+  color: #1F2329;
 }
-
-.envshow>view:nth-child(1) {
-  display: flex;
-  align-items: center;
+.home-icon .projectname image {
+  width: 20rpx;
+  height: 10rpx;
+  margin-left: 16rpx;
 }
-
-.envshow image {
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 8rpx;
+.home-icon .daytmp {
+  justify-content: start;
+  font-size: 13px;
+  color: #646A73;
 }
-
-/* 三个按钮盒子 */
-.btn_list {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  padding: 0 8px;
-  box-sizing: border-box;
+.home-icon .daytmp image {
+  height: 32rpx;
+  width: 32rpx;
+}
+.contant_box {
+  background: #f9fafa;
+}
+.contant_box .spacelist_box {
+  margin: 20rpx 32rpx 0;
 }
-
-/* 单个按钮样式 */
-.btn_item {
+.contant_box .spacelist_box .space_item {
   width: 100%;
-  height: 176rpx;
-  margin-bottom: 24rpx;
-  display: flex;
-  align-items: center;
-  justify-content: space-around;
-  border-radius: 16rpx;
-  box-shadow: 0px 2px 12px 0px rgba(25, 27, 38, 0.1);
+  height: 840rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 8px;
+  margin-bottom: 40rpx;
 }
-
-.btn_item:nth-child(1) {
-  margin-top: 24rpx;
+.contant_box .spacelist_box .space_item .space_bg {
+  width: 100%;
+  height: 398rpx;
+  border-radius: 8px 8px 0 0;
+  overflow: hidden;
 }
-
-.btn_item>view:nth-child(2) {
-  width: 336rpx;
+.contant_box .spacelist_box .space_item .space_bg image {
+  width: 100%;
+  height: 100%;
 }
-
-.item_img {
-  height: 100rpx;
-  width: 100rpx;
+.contant_box .spacelist_box .space_item .space_msg {
+  height: 154rpx;
+  padding: 0 32rpx;
   display: flex;
+  flex-direction: row;
+  justify-content: space-between;
   align-items: center;
-  justify-content: center;
-  border-radius: 50%;
-  border: 2px solid #e8e8e9;
 }
-
-.item_img image {
-  width: 60rpx;
-  height: 60rpx;
-}
-
-.item_img image:nth-child(1) {
-  width: 44rpx;
-  height: 44rpx;
-}
-
-.item_img image:nth-child(2) {
-  width: 56rpx;
+.contant_box .spacelist_box .space_item .space_msg .msg_left .spacename {
   height: 56rpx;
+  font-size: 40rpx;
+  font-weight: 400;
+  color: #2B3036;
+  line-height: 56rpx;
+}
+.contant_box .spacelist_box .space_item .space_msg .msg_left .spacestate {
+  font-size: 30rpx;
+  color: #8D9399;
+  line-height: 42rpx;
+  margin-top: 8rpx;
+  justify-content: flex-start;
 }
-
-.item_title {
-  display: block;
-  font-size: 36rpx;
-  line-height: 50rpx;
-  color: #191B26;
-}
-
-.item_des {
-  color: #80838F;
-  font-size: 28rpx;
+.contant_box .spacelist_box .space_item .space_msg .msg_left .spacestate > view {
+  margin-left: 18rpx;
+  width: 34rpx;
+  height: 34rpx;
 }
-
-/* 弹框样式 */
-.spacedetail {
-  padding: 25rpx 32rpx 0;
+.contant_box .spacelist_box .space_item .space_msg .msg_right text {
+  font-size: 46rpx;
+  color: #2B3036;
 }
-
-.spacedetail swiper {
-  height: 210rpx;
+.contant_box .spacelist_box .space_item .space_paramelist {
+  margin: 0 24rpx;
+  height: 140rpx;
+  background: #F8F9FA;
+  border-radius: 4px;
 }
-
-.space_title {
-  text-align: center;
-  font-weight: 500;
-  font-size: 20px;
+.contant_box .spacelist_box .space_item .space_paramelist .parame_item {
+  width: 25%;
 }
-
-.item_list {
-  display: flex;
-  height: 210rpx;
-  flex-direction: row;
-  justify-content: space-around;
-  align-items: center;
+.contant_box .spacelist_box .space_item .space_paramelist .parame_item .icon_name {
+  color: #8D9399;
+  font-size: 24rpx;
 }
-
-.list_item {
-  font-size: 35rpx;
-  text-align: center;
+.contant_box .spacelist_box .space_item .space_paramelist .parame_item .icon_name image {
+  width: 32rpx;
+  height: 32rpx;
+  margin-right: 8rpx;
 }
-
-.list_item view:nth-child(2) {
-  color: rgba(128, 131, 143, 1);
-  font-size: 28rpx;
-  margin-top: 8rpx;
+.contant_box .spacelist_box .space_item .space_paramelist .parame_item .parame_num {
+  color: #646A73;
+  font-size: 24rpx;
 }
-
-.noticbox_text{
-  text-align: center;
+.contant_box .spacelist_box .space_item .space_paramelist .parame_item .parame_num text {
+  font-size: 32rpx;
 }
-.envstate {
+.contant_box .spacelist_box .space_item .space_btns {
   display: flex;
-  justify-content: center;
   align-items: center;
-  height: 64rpx;
-  margin-top: 16rpx;
-  font-size: 20px;
-  color: #191B26;
-}
-
-.envstate image {
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 20rpx;
-}
-
-/* 反馈列表 */
-.feedback_list {
-  overflow: hidden;
-}
-
-.feedback_title {
-  font-size: 32rpx;
-  color: rgba(25, 27, 38, 1);
-  line-height: 38rpx;
-  margin-bottom: 38rpx;
-}
-
-.type_title {
-  font-size: 32rpx;
-  color: rgba(128, 131, 143, 1);
-  line-height: 38rpx;
-  margin-bottom: 16rpx;
+  justify-content: space-around;
+  margin-top: 32rpx;
 }
-
-.typelist {
+.contant_box .spacelist_box .space_item .space_btns button {
+  margin: 0;
+  width: auto;
+  display: inline-block;
+  font-size: 26rpx;
+  height: 76rpx;
   display: flex;
+  padding-left: 0;
+  padding-right: 0;
+  text-align: center;
   flex-direction: row;
-  /* justify-content: space-between; */
-  flex-wrap: wrap;
-  margin-bottom: 40rpx;
-  overflow: hidden;
-}
-
-.typelistlast {
-  margin-bottom: 0;
-}
-
-.typelist>view {
-  width: 220rpx;
-  height: 84rpx;
-  display: flex;
-  font-size: 28rpx;
   align-items: center;
   justify-content: center;
-  background-color: #f4f4f5;
-  border-radius: 16rpx;
-  margin-bottom: 12rpx;
-}
-
-.typelist>view image {
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 12rpx;
-}
-
-.typelistlast>view {
-  margin-bottom: 0;
-}
-
-.typelist>view:nth-child(3n-1) {
-  margin: 0 12rpx;
-}
-
-.typelist>.typelistactive {
-  background-color: #5575FF;
-  color: white;
-}
-
-
-.submitbtn {
-  height: 80rpx;
-  background: rgba(85, 117, 255, 1);
-  border-radius: 20px;
-  text-align: center;
-  color: white;
-  line-height: 80rpx;
-  margin: 60rpx 0 64rpx;
-  opacity: 0.5;
-  overflow: hidden;
-  box-sizing: border-box;
+  border-radius: 38rpx;
 }
-
-.submitbtnactive {
-  opacity: 1;
+.contant_box .spacelist_box .space_item .space_btns .btns_top {
+  width: 162rpx;
+  color: #8D9399;
+  border: 1px solid #EFF0F1;
 }
-
-.colsebtn {
-  margin: 40rpx 0 64rpx;
-  border: 1px solid rgba(218, 218, 218, 1);
-  background: #ffffff;
-  color: #191B26;
-  opacity: 1;
+.contant_box .spacelist_box .space_item .space_btns .btns_top_active {
+  background: #EAFAF8;
+  color: #04B49C;
+  border: 0px solid #EFF0F1;
 }
-
-.canvas {
-  /* width: 100%; */
-  display: flex;
-  justify-content: center;
-  align-items: center;
+.contant_box .spacelist_box .space_item .space_btns .btns_adjust {
+  width: 460rpx;
+  color: #ffffff;
+  background-color: #04B49C;
+  border-radius: 38rpx;
 }
-.canvashidden canvas{
-  height: 0;
+.contant_box .nospace {
+  width: 100%;
+  max-width: 343px;
+  height: 339px;
+  border-radius: 8px;
+  border: 1px dashed #DDDDDD;
+  justify-content: space-between;
 }
-.canvas canvas{
-  width: 340px;
+.contant_box .nospace .nospace_center {
+  margin-top: 216rpx;
 }
-.canvascenter {
-  width: 90%;
-  height: 90%;
-  display: flex;
-  font-size: 14px;
-  color: #cccc;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  border-left: 1px solid #ccc;
-  border-bottom: 1px solid #ccc;
-  margin: 10rpx auto;
+.contant_box .nospace .nospace_center .nospace_img {
+  width: 120rpx;
+  height: 116rpx;
 }
-
-.feedtext {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
+.contant_box .nospace .nospace_center text {
+  font-size: 30rpx;
+  color: #000000;
+  line-height: 48rpx;
 }
-
-.feedimgbox {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  flex-direction: row;
-
-  margin-bottom: 24rpx;
+.contant_box .nospace .nospace_msg .nospace_down {
+  width: 32rpx;
+  height: 28rpx;
+  margin: 16rpx 0 24rpx;
 }
-
-.feedimgbox image {
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 8rpx;
+.contant_box .nospace .nospace_msg text {
+  font-size: 24rpx;
+  color: #C3C6CB;
+  line-height: 40rpx;
 }
-
-.feedtext_title {
-  font-size: 40rpx;
-  color: #191B26;
+.contant_box .scannospace {
+  width: 100%;
+  max-width: 343px;
+  height: 254px;
+  margin-top: 40rpx;
+  background: #FFFFFF;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 4px;
+}
+.contant_box .scannospace .scan_box {
+  width: 198rpx;
+  height: 198rpx;
+  background: #F0F8FF;
+  border-radius: 4px;
+}
+.contant_box .scannospace .scan_box image {
+  width: 78rpx;
+  height: 78rpx;
+}
+.contant_box .scannospace .scan_name {
+  margin-top: 24rpx;
+  font-size: 36rpx;
+  color: #2B3036;
+  line-height: 56rpx;
 }
-
-.feedtext_desc {
-  font-size: 28rpx;
+.contant_box .scannospace .scan_scr {
+  font-size: 24rpx;
+  color: #8D9399;
+  line-height: 36rpx;
 }
-
-.noticbox {
+.contant_box .placeholder-view {
   width: 100%;
-  height:65rpx;
-  font-size: 28rpx;
-  margin-top: 38rpx;
+  height: 156rpx;
 }
-.noticbox swiper{
-  height: 45rpx;
+.faillogin {
+  background: #ffffff;
 }
-
-.radiobox {
-  margin-top: 56rpx;
+.footer_box {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  padding: 0 32rpx;
+  box-sizing: border-box;
+  height: 78px;
+  background: #ffffff;
+  display: flex;
+  justify-content: space-around;
+  flex-direction: row;
+  box-shadow: 0px 6px 20px 0px rgba(43, 48, 54, 0.1);
+  border-radius: 0px 0px 4px 4px;
 }
-
-/* .opencontent{
+.spacedetail {
   display: flex;
-  justify-content: center;
+  flex-direction: row;
   align-items: center;
-  flex-direction: column;
-}  */
-.opencontent_text {
-  color: #80838F;
-  margin-top: 84rpx;
-  text-align: center;
 }
-
-.opencontent_openbtn {
-  background: rgba(85, 117, 255, 1);
-  margin: 32rpx 0 64rpx;
-  opacity: 1;
+.footer_box .item_title {
+  font-size: 18px;
+  line-height: 28px;
 }
-.lottie{
-  width: 50rpx;
-  height: 50rpx;
+.footer_box .item_des {
+  color: #8D9399;
+  font-size: 12px;
 }
-.secondtxt{
+.footer_box .item_img {
+  width: 106rpx;
+  height: 106rpx;
+  background: #F0F8FF;
+  border-radius: 4px;
+  margin-right: 24rpx;
   display: flex;
   justify-content: center;
   align-items: center;
-  font-size: 14px;
-  margin-bottom: 16rpx;
 }
-.secondtxt_title{
-  font-size: 20px;
-  margin-bottom: 22rpx;
-}
-.custom_button{
-  box-sizing: content-box;
-  padding: 24rpx 32rpx;
-  height: 40rpx;
-  display: flex;
-  margin-top: 54rpx;
-  justify-content: center;
-  text-align: center;
-  align-items: center;
-  background-color: #5575FF;
-  color: #ffffff;
-  font-size: 16px;
-  border-radius:40rpx;
+.footer_box .item_img cover-image {
+  width: 48rpx;
+  height: 48rpx;
 }
-.header_box .before-load {
-  width: 0;
-  height: 0;
-  opacity: 0;
-}

+ 15 - 73
pages/projectlist/index.js

@@ -1,4 +1,4 @@
-// pages/projectlist/index.js
+import $ from './../../utils/Tool'
 import utils from "../../utils/util"
 const app = getApp();
 
@@ -8,7 +8,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    projectList:[],
+    projectList:$.store.get('tenants'),
     tenantId:'',
   },
 
@@ -17,7 +17,7 @@ Page({
    */
   onLoad: function (options) {
     this.setData({tenantId:app.globalData.tenantId})
-    let dataCope=JSON.parse(JSON.stringify(app.globalData.tenants));
+    let dataCope=JSON.parse(JSON.stringify($.store.get('tenants')));
     dataCope= utils.buildTree(dataCope);
     this.setData({projectList:dataCope});
   },
@@ -27,83 +27,25 @@ Page({
     if(this.data.tenantId&&this.data.tenantId==value.tenantId){
       return
     }
-    wx.setStorage({
-      data: value.projectId,
-      key: 'projectId',
-    })
-    wx.setStorage({
-      data: value.tenantId,
-      key: 'tenantId',
-    })
-    wx.setStorage({
-      data: value.tenantName,
-      key: 'tenantName',
-    })
+    $.storage.set('projectId',value.projectId)
+    $.storage.set('tenantId',value.tenantId)
+    $.storage.set('tenantName',value.tenantName)
     this.setData({tenantId:value.tenantId});
-    app.globalData.projectId = value.projectId;
-    app.globalData.tenantId =value.tenantId;
-    app.globalData.tenantName = value.tenantName;
-    let pages = getCurrentPages(); 
+
+    $.store.set('projectId',value.projectId)
+    $.store.set('tenantId',value.tenantId)
+    $.store.set('tenantName',value.tenantName)
+    // app.globalData.projectId = value.projectId;
+    // app.globalData.tenantId =value.tenantId;
+    // app.globalData.tenantName = value.tenantName;
+    let pages = getCurrentPages();
     let prevPage = pages[ pages.length - 2 ];
     prevPage.setData({  // 将我们想要传递的参数在这里直接setData。上个页面就会执行这里的操作。
       formList:true,
-      swiperCurrent:0
     })
-    
+
     wx.navigateBack({
       delta: 1  // 返回上一级页面。
     })
-    // wx.redirectTo({
-    //   url: '../index/index',
-    // })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
   },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
 })

+ 74 - 142
pages/search/index.js

@@ -1,79 +1,62 @@
-// pages/search/index.js
-import utils from "../../utils/util";
-import {queryFollowspace,queryAllspace,followRoom,unfollowRoom} from "../../requests/api";
-import Toast from '../../vant-weapp/dist/toast/toast';
-const app = getApp();
+import $ from './../../utils/Tool'
+import router from './../../utils/router'
+import {queryAllspace} from '../../requests/api'
+let timer = 0;
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
     spaceName:'',
-    listContent:[],
+    spaceId:'',
+    seachValue:'',
     alllistContent:[],
-    activeTab:0,
-    projectId:"",
-    tenantId:"",
-    userId:"",
-    currtPage:1,
+    currentList:[],
     allListnum:0,
-    seachValue:'',
-    seachTimes:1,
-    imgShow:false,
-    noSpace:false,
+    userId:$.store.get('userId'),
+    tenantId:$.store.get('tenantId'),
+    projectId:$.store.get('projectId'),
+    currtPage:0,
   },
-
   /**
-   * 生命周期函数--监听页面加载
+   * 搜索
    */
-  onLoad: function (options) {
-    if(wx.getStorageSync('logined')){
-      this.setData({currtPage:1});
-      this.setData({projectId:app.globalData.projectId});
-      this.setData({tenantId:app.globalData.tenantId});
-      this.setData({userId:app.globalData.userId});
-      this.getFollowlist();
+  spaceSearch(e){
+    let value = e.detail
+    if(timer){
+      clearTimeout(timer)
     }
+    timer = setTimeout(()=>{
+        if(value){
+          this.updateList(value);
+          // this.setData({seachValue:value,currtPage:0,alllistContent:[]},()=>{
+          //   this.getallList(value);
+          // });
+        }else{
+          this.setData({currentList:alllistContent})
+        }
+    },500)
+
   },
-  onShow(){
-    this.setData({currtPage:1});
-  },
-  // 查询关注空间
-  async getFollowlist(){
-    const data={
-      "criteria": {
-          "userId":this.data.userId,
-          "projectId": this.data.projectId,
-          "tenantId": this.data.tenantId
+  updateList(value){
+    let allList =JSON.parse(JSON.stringify(this.data.alllistContent));
+    let currentList=[];
+    allList.forEach(item=>{
+      if(item.localName.includes(value)){
+        currentList.push(item)
       }
-    }
-    this.setData({listContent:[]});
-    // this.setData({imgShow:false})
-    let res = await queryFollowspace(data);
-    // setTimer = setTimeout(()=>{this.setData({imgShow:true})},800);
-    if(res.count){
-      res.content.map(item=>{
-        item.picInit=utils.picInit(item.roomFuncType);
-      })
-      this.setData({noSpace:false});
-      this.setData({listContent:res.content});
-    }else{
-      this.setData({noSpace:true});
-    }
+    })
+    this.setData({currentList:currentList})
   },
-  async getallList(value){
-    if(!wx.getStorageSync('logined')){
-      return 
-    }
+  goBack(){
+    router.pop();
+  },
+  async getallList(){
     const data={
       "criteria": {
-          "userId":this.data.userId,
-          "projectId": this.data.projectId,
-          "tenantId": this.data.tenantId
+          "userId":$.store.get('userId'),
+          "projectId": $.store.get('projectId'),
+          "tenantId": $.store.get('tenantId')
       },
-      page:this.data.currtPage,
-      size:15,
+      // page:this.data.currtPage + 1,
+      // size:20,
       orders:[
         {
           column:"localName",
@@ -81,101 +64,50 @@ Page({
         }
       ]
     }
-    if(value&&this.data.seachTimes==1){
-      this.setData({currtPage:1});  
-      this.setData({seachTimes:2});
-      data.page=1;
-      data.criteria.localName={$like: `%${value}%`}
-    }
-    if(this.data.seachValue&&!value){
-      data.criteria.localName={$like: `%${this.data.seachValue}%`}
-    }
-    let res;
-    if(data.page!==1){
-       res =await queryAllspace(data);
-    }else{
-      res =await queryAllspace(data);
-    }
-   
+    // if(this.data.seachValue){
+    //   data.criteria.localName={$like: `%${this.data.seachValue}%`}
+    // }
+    wx.showLoading()
+    let res =await queryAllspace(data);
+    wx.hideLoading()
     this.setData({allListnum:res.count});
     if(res.count&&res.content){
-      res.content.map(item=>{
-        item.picInit=utils.picInit(item.roomFuncType);
-      })
-      this.setData({alllistContent:this.data.alllistContent.concat(res.content)});
-    }else{
-      Toast('暂无更多')
+      this.setData({alllistContent:this.data.alllistContent.concat(res.content)},()=>{
+        // res.count>30?this.setData({currentList:this.getPage(1)}):this.setData({currentList:this.data.alllistContent});
+        this.setData({currentList:this.data.alllistContent})
+      });
     }
   },
-  tabChange(e){
-    if(e.detail.index==1&&this.data.activeTab==0){
-      // if(){
-        this.setData({currtPage:1});
-        this.setData({alllistContent:[]});
-        this.getallList();
-      // }
-    }else if(e.detail.index==0){
-      this.getFollowlist();
-    }
-    this.setData({activeTab:e.detail.index})
+  // 前端分页
+  getPage(page){
+    let start = (page-1)*30;
+    let end = ((page-1)*30 + 30)>this.data.allListnum?this.data.allListnum:((page-1)*30 + 30)
+    return this.data.alllistContent.slice(start,end)
   },
-  // 搜索
-  spaceSearch(e){
-    this.setData({seachValue:e.detail});
-    this.setData({seachTimes:1})
-    this.setData({activeTab:1});
-    this.setData({alllistContent:[]});
-    this.getallList(e.detail);
-  },
-  listClick(e){
-    let pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
-      let prevPage = pages[ pages.length - 2 ];
-      prevPage.setData({  // 将我们想要传递的参数在这里直接setData。上个页面就会执行这里的操作。
-        popswiperDate:e.detail.cardDate,
-        fromFollowpage:true,
-    })
-    wx.navigateBack({
-      delta: 1  // 返回上一级页面。
+  spaceClick(e){
+    console.log(e.currentTarget.dataset.spaceitem)
+    let {id,localName} = e.currentTarget.dataset.spaceitem;
+    let pages = getCurrentPages();
+    let prevPage = pages[ pages.length - 2 ];
+    prevPage.setData({  // 将我们想要传递的参数在这里直接setData。上个页面就会执行这里的操作。
+      spaceId:id,
+      spaceName:localName,
+      formSearch:true,
+    },()=>{
+      router.pop()
     })
   },
-  starClick(e){
-    let checked=e.detail.checked;
-    let spaceId=e.detail.spaceId;
-    const data = {
-      "userId":this.data.userId,//用户id
-      "projectId":this.data.projectId,//项目id
-      "spaceId":spaceId//空间id
-    }
-    
-    if(checked){
-      followRoom(data)
-    }else{
-      unfollowRoom(data)
-    }
-  },
   /**
-   * 页面相关事件处理函数--监听用户下拉动作
+   * 生命周期函数--监听页面加载
    */
-  onPullDownRefresh: function () {
-
+  onLoad: function (options) {
+    this.getallList();
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
   onReachBottom: function () {
-    if(this.data.activeTab==1&&this.data.allListnum!=this.data.alllistContent.length){
-      this.setData({currtPage:this.data.currtPage+1})
-      this.getallList();
-    }else{
-      Toast('暂无更多')
-    }
+    // this.getallList();
   },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
 })

+ 2 - 7
pages/search/index.json

@@ -1,11 +1,6 @@
 {
   "usingComponents": {
-    "van-search": "../../vant-weapp/dist/search/index",
-    "spacecard": "../../components/spacecard/index",
-    "van-divider": "../../vant-weapp/dist/divider/index",
-    "van-tab": "../../vant-weapp/dist/tab/index",
-    "van-tabs": "../../vant-weapp/dist/tabs/index",
-    "van-toast": "../../vant-weapp/dist/toast/index"
+    "van-search": "../../vant-weapp/dist/search/index"
   },
-  "navigationBarTitleText": "收藏的空间"
+  "navigationStyle":"custom"
 }

+ 26 - 0
pages/search/index.less

@@ -0,0 +1,26 @@
+.header-title{
+    justify-content: space-between;
+    padding: 0 32rpx;
+    width: 100%;
+    .goback{
+        width:30px;
+    }
+    .righttext{
+        width: 30px;
+    }
+    .titlename{
+        font-size: 17px;
+    }
+}
+.space_box{
+    margin: 0 0 0 30rpx;
+    .space_item{
+        height: 48px;
+        line-height: 48px;
+        padding-left: 24rpx;
+        // background: #F8F9FA;
+        border-bottom:1px solid #EFF0F1;
+        font-size: 28rpx;
+        color: #2B3036;
+    }
+}

+ 17 - 32
pages/search/index.wxml

@@ -1,35 +1,20 @@
-<!--pages/search/index.wxml-->
+<van-sticky>
+    <header>
+        <view slot="content" class="header-title flex_row">
+            <view class='goback' bindtap="goBack">
+                <van-icon name="arrow-left" />
+            </view>
+            <text class="titlename">空间选择</text>
+            <text class="righttext"></text>
+        </view>
+    </header>
+</van-sticky>
 <view>
-	<van-search shape="round" value="{{ spaceName }}" bind:search="spaceSearch" placeholder="请输入搜索关键词" />
-	<van-tabs type="card"  color="#5575ff" active="{{ activeTab }}" bind:change="tabChange">
-		<van-tab title="我的收藏">
-		<!--  {{imgShow?'':'del_box'}} -->
-			<view class="cardlist">
-			<block wx:for="{{listContent}}" wx:key="index">
-				<spacecard bind:listClick="listClick" cardDate="{{item}}" bind:starClick="starClick" canvashidden="{{activeTab==0}}"></spacecard>
-				<van-divider/>
-			</block>
-			</view>
-		</van-tab>
-		<van-tab title="空间列表">
-			<view class="cardlist" >
-				<block wx:for="{{alllistContent}}" wx:key="index">
-				<spacecard bind:listClick="listClick" cardDate="{{item}}" bind:starClick="starClick" canvashidden="{{activeTab==1}}"></spacecard>
-				<van-divider/>
-				<!--   class="{{imgShow?'':'del_box'}}" -->
-			</block>
-			</view>
-		</van-tab>
-	</van-tabs>
-	<view class="nolist" wx:if="{{activeTab===0&&noSpace}}">
-		<image src="../../static/images/nofollow.png"></image>
-		<text>暂无关注</text>
-		<text>从空间列表选择关注吧!</text>
-	</view>
-	<view style="text-align: center;margin: 10px;">
-      <view wx:if="{{loading}}">加载中...</view>
-      <view wx:if="{{noMore}}">没有更多了</view>
-      <view wx:if="{{loadingFailed}}">数据加载失败,请重试</view>
+    <van-search shape="round" value="{{ spaceName }}" bind:change="spaceSearch" placeholder="请输入房间名字关键词" />
+    <view class="space_box">
+        <block wx:for="{{currentList}}">
+            <view class="space_item" bindtap="spaceClick" data-spaceitem="{{item}}">{{item.localName}}</view>
+        </block>
+
     </view>
-	<van-toast id="van-toast" />
 </view>

+ 18 - 36
pages/search/index.wxss

@@ -1,43 +1,25 @@
-.cardlist{
+.header-title {
+  justify-content: space-between;
   padding: 0 32rpx;
+  width: 100%;
 }
-/* 修改标签页样式 */
-.van-tabs__wrap{
-  margin-bottom: 24rpx;
-  height: 72rpx!important;
+.header-title .goback {
+  width: 30px;
 }
-.van-tabs__nav--card{
-  height: 72rpx!important;
-  overflow: hidden;
-  border-radius: 8rpx!important;
-  /* border:1px solid rgba(25,27,38,0.1)!important; */
+.header-title .righttext {
+  width: 30px;
 }
-.van-ellipsis{
-  line-height: 72rpx!important;
+.header-title .titlename {
+  font-size: 17px;
 }
-.van-tab{
-  height: 72rpx!important;
-  color: #000000!important;
+.space_box {
+  margin: 0 0 0 30rpx;
 }
-.van-tab--active{
-  color: #ffffff!important;
-  /* border:1px solid #5575FF!important; */
+.space_box .space_item {
+  height: 48px;
+  line-height: 48px;
+  padding-left: 24rpx;
+  border-bottom: 1px solid #EFF0F1;
+  font-size: 28rpx;
+  color: #2B3036;
 }
-.nolist{
-  display: flex;
-  margin-top: 240rpx;
-  justify-content: center;
-  align-items: center;
-  flex-direction: column;
-  color: #80838F;
-}
-.nolist image{
-  width: 160rpx;
-  height: 160rpx;
-}
-.nolist>text:nth-child(3){
-  margin-top: 18rpx;
-}
-.del_box{
-  display: none;
-}

+ 98 - 0
pages/spacelist/index.js

@@ -0,0 +1,98 @@
+// pages/search/index.js
+import utils from "../../utils/util";
+import {queryAllspace} from "../../requests/api";
+import Toast from '../../vant-weapp/dist/toast/toast';
+import $ from './../../utils/Tool'
+import router from './../../utils/router'
+const app = getApp();
+Page({
+  data: {
+    alllistContent:[],
+    projectId:"",
+    tenantId:"",
+    userId:"",
+    currtPage:0,
+    allListnum:0,
+    seachValue:'',
+    imgShow:false,
+    noSpace:false,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.setData({
+      currtPage:0,
+      projectId:$.store.get('projectId'),
+      tenantId:$.store.get('tenantId'),
+      userId:$.store.get('userId'),
+    })
+    this.getallList();
+  },
+  onShow(){
+    // this.setData({currtPage:1});
+  },
+  getallList(value){
+    this.setData({currtPage:this.data.currtPage + 1},async ()=>{
+      let data={
+        "criteria": {
+            "userId":this.data.userId,
+            "projectId": this.data.projectId,
+            "tenantId": this.data.tenantId
+        },
+        page:this.data.currtPage,
+        size:15,
+        orders:[
+          {
+            column:"localName",
+            asc:"true"
+          }
+        ]
+      }
+      if(this.data.seachValue){
+        data.criteria.localName={$like: `%${this.data.seachValue}%`}
+      }
+      wx.showLoading({
+        title:"加载中",
+        mask:true
+      })
+      // $.loading();
+      let res =await queryAllspace(data);
+      // $.hideLoading();
+      wx.hideLoading();
+      this.setData({allListnum:res.count});
+      if(res.count&&res.content){
+        res.content.map(item=>{
+          item.picInit=utils.picInit(item.roomFuncType);
+        })
+        this.setData({alllistContent:this.data.alllistContent.concat(res.content)});
+      }else{
+        Toast('暂无更多')
+      }
+    })
+
+  },
+  // 搜索
+  spaceSearch(e){
+    this.setData({seachValue:e.detail,currtPage:0,alllistContent:[]},()=>{
+      this.getallList(e.detail);
+    });
+  },
+  listClick(e){
+    let data = e.detail.cardDate;
+    data.outLine&&(data.outLine="");
+    router.push("adjust",data);
+  },
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    if(this.data.allListnum!=this.data.alllistContent.length){
+      // this.setData({currtPage:this.data.currtPage+1})
+      this.getallList();
+    }else{
+      Toast('暂无更多')
+    }
+  },
+})

+ 11 - 0
pages/spacelist/index.json

@@ -0,0 +1,11 @@
+{
+  "usingComponents": {
+    "van-search": "../../vant-weapp/dist/search/index",
+    "spacecard": "../../components/spacecard/index",
+    "van-divider": "../../vant-weapp/dist/divider/index",
+    "van-tab": "../../vant-weapp/dist/tab/index",
+    "van-tabs": "../../vant-weapp/dist/tabs/index",
+    "van-toast": "../../vant-weapp/dist/toast/index"
+  },
+  "navigationBarTitleText": "空间列表"
+}

+ 0 - 0
pages/spacelist/index.wxml


Some files were not shown because too many files changed in this diff