chenzhen2 1 год назад
Родитель
Сommit
6aa5655c4a

+ 2 - 0
.eslintrc.js

@@ -21,6 +21,8 @@ module.exports = {
   'rules': {
     // allow paren-less arrow functions
     'arrow-parens': 0,
+    'vue/require-v-for-key': 'off',
+    'vue/eslint-plugin-vue': 'off',
     // allow async-await
     'generator-star-spacing': 0,
     // allow debugger during development

+ 0 - 20
settings.json

@@ -1,20 +0,0 @@
-{
-    // 修改编辑器默认格式化方案,也就是右键format Document width里面的默认
-    "editor.defaultFormatter": "hu2ren.vetur-wepy",
-    "vetur.validation.script": false,
-    "vetur.validation.interpolation": false,
-    "vetur.validation.template": false,
-    "vetur.format.defaultFormatter.js": "none",
-    "vetur.format.defaultFormatter.html": "js-beautify-html",
-    "editor.formatOnSave": true,
-    "eslint.run": "onSave",
-    "eslint.validate": [
-      "vue"
-    ],
-    // #每次保存的时候将代码按eslint格式进行修复,要在保存时运行的代码操作类型。保存时按照哪个规则进行格式化
-    "editor.codeActionsOnSave": {
-      "source.fixAll": true,
-      "source.fixAll.stylelint": true
-    }
-  }
-  

+ 1 - 1
src/packagesEnv/pages/intelligentControl/components/floor/floor.wpy

@@ -52,7 +52,7 @@
       <div
         class="floor-item"
         :class="{'selected' :selectedFloor == item.floorId}"
-        v-for="(item,index) in floors"
+        v-for="(item) in floors"
         v-on:click.stop="changeFloor(item.floorId)"
         v-if="status=='expand' || (status=='fold' && selectedFloor == item.floorId)"
       >{{item.text}}</div>

+ 4 - 3
src/packagesEnv/pages/intelligentControl/home2.wpy

@@ -316,7 +316,7 @@ import config from '@/config';
 import { mapState } from '@wepy/x';
 import { saveCompanyConfig } from '@/service/companyConfig';
 import { getCompanyMapData } from '@/api/home';
-import {getFloorList} from '@/packagesEnv/api/mapApi.js'
+import { getFloorList } from '@/packagesEnv/api/mapApi.js';
 
 let h5StaticPath = config.h5StaticPath + '/page-intelligent-control/';
 const tarBarHeight = 96;
@@ -481,7 +481,6 @@ wepy.component({
     //       this.autoSelectArea(selectarea);
     //     }
     //   });
-    
   },
   watch: {
     // 父亲传过来的空间id 搜索返回才会有这个传递
@@ -504,7 +503,9 @@ wepy.component({
           projectId: this.projectId
         }
       };
-      getFloorList(params).then(res => {});
+      getFloorList(params).then(res => {
+        this.floors = res.content || [];
+      });
     },
     /**
      * 获取地图信息

+ 29 - 33
src/pages/index.wpy

@@ -1,13 +1,13 @@
 <style lang="less">
 .overflow-wrap {
-width: 100%                 ;
-height: 100%                ;
-scroll-view {
-position: relative          ;
-width: 100%                 ;
-height: 100%                ;
-z-index: 2                  ;
-}
+  width: 100%;
+  height: 100%;
+  scroll-view {
+    position: relative;
+    width: 100%;
+    height: 100%;
+    z-index: 2;
+  }
 }
 </style>
 </wxs>
@@ -23,37 +23,33 @@ z-index: 2                  ;
 </template>
 
 <script>
-import wepy from '@wepy/core'
+import wepy from '@wepy/core';
 import eventHub from '../common/eventHub';
 import { mapState } from '@wepy/x';
 import store from '../store';
-import testMixin from '../mixins/test'
+import testMixin from '../mixins/test';
 
 wepy.page({
-store,
-config: {
-navigationBarTitleText: 'test'
-},
-
-data: {
+  store,
+  config: {
+    navigationBarTitleText: 'test'
+  },
 
-},
-methods: {
-goEnv(){
-    wx.navigateTo({
-    url: '/packagesEnv/pages/officehome/index'
-    })                            
-},
-goPortrait(){
-    wx.navigateTo({
-    url: '/packagesEnv/pages/portrait/home'
-    })                            
-}
-},
-created () {
-
-}
-})                                ;
+  data: {},
+  methods: {
+    goEnv() {
+      wx.navigateTo({
+        url: '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68'
+      });
+    },
+    goPortrait() {
+      wx.navigateTo({
+        url: '/packagesEnv/pages/portrait/home'
+      });
+    }
+  },
+  created() {}
+});
 </script>
 <config>
 {

+ 1 - 1
wepy.config.js

@@ -6,7 +6,7 @@ let env = process.env.NODE_ENV.toString();
 var prod = env.split('-')[0] === 'prod';
 module.exports = {
   wpyExt: '.wpy',
-  eslint: true,
+  eslint: false,
   cliLogs: !prod,
   static: ['static'],
   build: {