소스 검색

页面优化

seimin 1 년 전
부모
커밋
43eef7c885

+ 2 - 0
index.html

@@ -17,6 +17,8 @@
17
       html {
17
       html {
18
         background-color: white;
18
         background-color: white;
19
         height: 100vh;
19
         height: 100vh;
20
+
21
+        margin: 0 auto!important;
20
       }
22
       }
21
 
23
 
22
       body {
24
       body {

+ 7 - 0
src/App.vue

@@ -20,8 +20,15 @@ export default {
20
 .cube-picker-wheel-item{
20
 .cube-picker-wheel-item{
21
   font-size: 12px!important;
21
   font-size: 12px!important;
22
 }
22
 }
23
+.cube-popup_mask{
24
+  margin: 0 auto;
25
+}
26
+.overflowHidden{
27
+  overflow: hidden!important;
28
+}
23
 * {
29
 * {
24
   font-family: "微软雅黑";
30
   font-family: "微软雅黑";
31
+  max-width: 750px;
25
 }
32
 }
26
 .fl {
33
 .fl {
27
   float: left;
34
   float: left;

+ 1 - 0
src/components/showModel/showModel.vue

@@ -466,6 +466,7 @@ export default {
466
   bottom: 0;
466
   bottom: 0;
467
   background-color: rgba(0, 0, 0, 0.2);
467
   background-color: rgba(0, 0, 0, 0.2);
468
   z-index: 99;
468
   z-index: 99;
469
+  margin: 0 auto;
469
   .red{
470
   .red{
470
     color: red;
471
     color: red;
471
   }
472
   }

+ 1 - 0
src/components/showModel2/showModel2.vue

@@ -451,6 +451,7 @@ export default {
451
   bottom: 0;
451
   bottom: 0;
452
   background-color: rgba(0, 0, 0, 0.2);
452
   background-color: rgba(0, 0, 0, 0.2);
453
   z-index: 99;
453
   z-index: 99;
454
+  margin: 0 auto;
454
   .red{
455
   .red{
455
     color: red;
456
     color: red;
456
   }
457
   }

+ 1 - 0
src/components/showModelPicture/showModelPicture.vue

@@ -107,6 +107,7 @@ export default {
107
   bottom: 0;
107
   bottom: 0;
108
   background-color: rgba(0, 0, 0, 0.2);
108
   background-color: rgba(0, 0, 0, 0.2);
109
   z-index: 99;
109
   z-index: 99;
110
+  margin: 0 auto;
110
   .red{
111
   .red{
111
     color: red;
112
     color: red;
112
   }
113
   }

+ 46 - 90
src/views/ConsumableList.vue

@@ -1,7 +1,7 @@
1
 <template>
1
 <template>
2
   <div class="bgColor">
2
   <div class="bgColor">
3
-    <div slot="content" class="scroll-wrapper">
4
-      <div class="demo">
3
+    <div slot="content" class="scroll-wrapper" style="height:100%;">
4
+      <div class="demo" style="height:100%;">
5
         <div class="header">耗材列表</div>
5
         <div class="header">耗材列表</div>
6
         <div class="seatchHeader">
6
         <div class="seatchHeader">
7
           <div class="search fl">
7
           <div class="search fl">
@@ -13,7 +13,6 @@
13
               @input="searchData()"
13
               @input="searchData()"
14
             />
14
             />
15
           </div>
15
           </div>
16
-          <!-- <button class="selectBtn fr" @click="showPicker">筛选</button> -->
17
         </div>
16
         </div>
18
         <div class="scroll-list-wrap">
17
         <div class="scroll-list-wrap">
19
           <cube-scroll
18
           <cube-scroll
@@ -21,14 +20,14 @@
21
             :data="items"
20
             :data="items"
22
             :options="options"
21
             :options="options"
23
             @pulling-down="onPullingDown"
22
             @pulling-down="onPullingDown"
24
-            @pulling-up="onPullingUp"
23
+            @pulling-up="onPullingUp" style="height:100%;"
25
           >
24
           >
26
             <div class="conentBox">
25
             <div class="conentBox">
27
               <div
26
               <div
28
                 class="conent"
27
                 class="conent"
29
-                v-for="(item, index) in items"
28
+                v-for="item in items"
30
                 @click="showModal(item)"
29
                 @click="showModal(item)"
31
-                :key="index"
30
+                :key="item.id"
32
               >
31
               >
33
                 <div class="head">
32
                 <div class="head">
34
                   <p>
33
                   <p>
@@ -43,10 +42,6 @@
43
                   </p>
42
                   </p>
44
                 </div>
43
                 </div>
45
               </div>
44
               </div>
46
-              <div class="wushuju" v-show="wushuju">
47
-                <img src="./../../static/images/wushuju.svg" alt />
48
-                <p>暂无数据</p>
49
-              </div>
50
             </div>
45
             </div>
51
             <template v-if="customPullDown" slot="pulldown" slot-scope="props">
46
             <template v-if="customPullDown" slot="pulldown" slot-scope="props">
52
               <div
47
               <div
@@ -76,11 +71,15 @@
76
                 </div>
71
                 </div>
77
               </div>
72
               </div>
78
             </template>
73
             </template>
74
+            <div class="wushuju" v-show="!loadShow && !items.length">
75
+              <img src="./../../static/images/wushuju.svg" alt />
76
+              <p>暂无数据</p>
77
+            </div>
79
           </cube-scroll>
78
           </cube-scroll>
80
         </div>
79
         </div>
81
       </div>
80
       </div>
82
     </div>
81
     </div>
83
-    <load-ing v-if="!items.length && !wushuju"></load-ing>
82
+    <load-ing v-show="loadShow"></load-ing>
84
     <!-- 弹窗 -->
83
     <!-- 弹窗 -->
85
     <showModel
84
     <showModel
86
       v-if="models.disjunctor"
85
       v-if="models.disjunctor"
@@ -96,7 +95,7 @@
96
   </div>
95
   </div>
97
 </template>
96
 </template>
98
 <script>
97
 <script>
99
-import Vue from "vue";
98
+import { debounce } from 'lodash';
100
 import showModel from "../components/showModel/showModel.vue";
99
 import showModel from "../components/showModel/showModel.vue";
101
 import CubePage from "../components/cube-page.vue";
100
 import CubePage from "../components/cube-page.vue";
102
 import SwitchOption from "../components/switch-option";
101
 import SwitchOption from "../components/switch-option";
@@ -123,7 +122,6 @@ export default {
123
       pullUpLoadMoreTxt: "加载更多",
122
       pullUpLoadMoreTxt: "加载更多",
124
       pullUpLoadNoMoreTxt: "没有更多数据",
123
       pullUpLoadNoMoreTxt: "没有更多数据",
125
       customPullDown: true,
124
       customPullDown: true,
126
-      wushuju: false,
127
       title: "", //搜索内容
125
       title: "", //搜索内容
128
       // stateData: [
126
       // stateData: [
129
       //   {
127
       //   {
@@ -140,11 +138,10 @@ export default {
140
       //   }
138
       //   }
141
       // ],
139
       // ],
142
       // stateValue: "todo",
140
       // stateValue: "todo",
143
-      sum: 20,
141
+      sum: 10,
144
       idx: 0,
142
       idx: 0,
145
       stateClass: "",
143
       stateClass: "",
146
       loadShow: true,
144
       loadShow: true,
147
-      searching: false
148
     };
145
     };
149
   },
146
   },
150
   components: {
147
   components: {
@@ -294,19 +291,16 @@ export default {
294
       this.getData();
291
       this.getData();
295
     },
292
     },
296
     cancelHandle() {},
293
     cancelHandle() {},
297
-    // 搜索
298
-    searchData() {
299
-      this.items = [];
300
-      this.searching = true;
301
-      this.getData();
302
-    },
294
+    searchData:debounce(function () {
295
+      // 处理输入变化事件的逻辑
296
+      this.loadShow = true;
297
+      this.items=[]
298
+      this.getData()
299
+    }, 300),
303
     // 获取列表
300
     // 获取列表
304
     getData() {
301
     getData() {
305
       console.log(this.$route, 777)
302
       console.log(this.$route, 777)
306
       console.log(this.stateValue);
303
       console.log(this.stateValue);
307
-      if (this.searching) {
308
-        this.idx = 0;
309
-      }
310
       let title = this.title;
304
       let title = this.title;
311
       let postData = {
305
       let postData = {
312
         idx: this.idx,
306
         idx: this.idx,
@@ -323,23 +317,18 @@ export default {
323
           postData
317
           postData
324
         )
318
         )
325
         .then((res) => {
319
         .then((res) => {
326
-          console.log(this.searching, 'res')
327
           if(res.status == 200){
320
           if(res.status == 200){
328
             if(title == this.title){
321
             if(title == this.title){
329
               if (res.data.list.length > 0) {
322
               if (res.data.list.length > 0) {
330
-                this.wushuju = false;
331
-                if (this.searching) {
332
-                  this.items = res.data.list;
333
-                } else {
323
+                if (this.idx) {
334
                   this.items = this.items.concat(res.data.list);
324
                   this.items = this.items.concat(res.data.list);
325
+                } else {
326
+                  this.items = res.data.list;
335
                 }
327
                 }
336
               } else {
328
               } else {
337
-                if(this.items.length){
338
-                  this.wushuju = this.searching;
339
-                }else{
340
-                  this.wushuju = true;
341
-                }
329
+                this.$refs.scroll.forceUpdate();
342
               }
330
               }
331
+              this.loadShow = false;
343
             }
332
             }
344
           }else{
333
           }else{
345
             this.$createDialog({
334
             this.$createDialog({
@@ -349,72 +338,34 @@ export default {
349
               icon: "cubeic-wrong"
338
               icon: "cubeic-wrong"
350
             }).show();
339
             }).show();
351
           }
340
           }
352
-          this.loadShow = false;
353
         });
341
         });
354
     },
342
     },
355
     onPullingDown() {
343
     onPullingDown() {
356
       // 模拟更新数据
344
       // 模拟更新数据
357
-      var that = this;
358
-      that.items = [];
359
-      that.idx = 0;
360
-      that.searching = false;
361
-      setTimeout(() => {
362
-        that.getData();
363
-      }, 1000);
345
+      this.idx = 0;
346
+      this.sum = 10;
347
+      this.getData();
364
     },
348
     },
365
     onPullingUp() {
349
     onPullingUp() {
366
-      var that = this;
367
-      that.idx = that.idx + 1;
368
-      that.searching = false;
369
-      that.getData();
370
-    },
371
-    updatePullDownRefresh(val) {
372
-      this.pullDownRefresh = val;
373
-    },
374
-    updatePullDownRefreshThreshold(val) {
375
-      this.pullDownRefreshThreshold = val;
376
-    },
377
-    updatePullDownRefreshTxt(val) {
378
-      this.pullDownRefreshTxt = val;
379
-    },
380
-    updatePullUpLoad(val) {
381
-      this.pullUpLoad = val;
382
-    },
383
-    updatePullUpLoadThreshold(val) {
384
-      this.pullUpLoadThreshold = val;
385
-    },
386
-    updatePullUpLoadMoreTxt(val) {
387
-      this.pullUpLoadMoreTxt = val;
388
-    },
389
-    updatePullUpLoadNoMoreTxt(val) {
390
-      this.pullUpLoadNoMoreTxt = val;
391
-    },
392
-    updateCustomPullDown(val) {
393
-      this.customPullDown = val;
350
+      this.idx = this.idx + 1;
351
+      this.getData();
394
     },
352
     },
395
-    rebuildScroll() {
396
-      Vue.nextTick(() => {
397
-        this.$refs.scroll.destroy();
398
-        this.$refs.scroll.initScroll();
399
-      });
400
-    }
401
   },
353
   },
402
-  created() {
354
+  mounted() {
403
     // this.$route.params.data
355
     // this.$route.params.data
404
     // this.getParamsState();
356
     // this.getParamsState();
405
-    this.getData(this.idx, this.sum);
406
-  }
357
+    setTimeout(()=>{
358
+      this.getData();
359
+    },0)
360
+  },
407
 };
361
 };
408
 </script>
362
 </script>
409
 <style lang="stylus" rel="stylesheet/stylus" scoped>
363
 <style lang="stylus" rel="stylesheet/stylus" scoped>
410
 .scroll-list-wrap {
364
 .scroll-list-wrap {
411
-  /* height: 350px */
412
   height: 90vh;
365
   height: 90vh;
413
-  /* border: 1px solid rgba(0, 0, 0, 0.1) */
414
   border-radius: 5px;
366
   border-radius: 5px;
415
   transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
367
   transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
416
-  // overflow: hidden;
417
-  padding-top: 1.76rem;
368
+  overflow: hidden;
418
 }
369
 }
419
 
370
 
420
 .foods-wrapper {
371
 .foods-wrapper {
@@ -518,6 +469,10 @@ export default {
518
 .bgColor {
469
 .bgColor {
519
   background-color: white;
470
   background-color: white;
520
 }
471
 }
472
+.demo{
473
+  display:flex;
474
+  flex-direction:column;
475
+}
521
 .food-item {
476
 .food-item {
522
   border-top: 0.16rem rgb(238, 238, 238) solid;
477
   border-top: 0.16rem rgb(238, 238, 238) solid;
523
 }
478
 }
@@ -613,18 +568,18 @@ export default {
613
     color: #fff;
568
     color: #fff;
614
     font-size: 0.37rem;
569
     font-size: 0.37rem;
615
     background: linear-gradient(#2e2f32, #414246);
570
     background: linear-gradient(#2e2f32, #414246);
616
-    position: fixed;
617
-    top: 0;
618
-    z-index: 6;
571
+    // position: fixed;
572
+    // top: 0;
573
+    // z-index: 6;
619
   }
574
   }
620
   .seatchHeader {
575
   .seatchHeader {
621
     width: 100%;
576
     width: 100%;
622
     background-color: #eee;
577
     background-color: #eee;
623
     padding: 0.16rem;
578
     padding: 0.16rem;
624
-    overflow: hidden;
625
-    position: fixed;
626
-    top: 0.88rem;
627
-    z-index: 6;
579
+    // overflow: hidden;
580
+    // position: fixed;
581
+    // top: 0.88rem;
582
+    // z-index: 6;
628
     box-sizing: border-box;
583
     box-sizing: border-box;
629
     .search {
584
     .search {
630
       width: 100%;
585
       width: 100%;
@@ -659,6 +614,7 @@ export default {
659
   }
614
   }
660
 }
615
 }
661
 .conentBox {
616
 .conentBox {
617
+  height: 100%;
662
   width: 100%;
618
   width: 100%;
663
   .conent {
619
   .conent {
664
     font-size: 0.32rem;
620
     font-size: 0.32rem;

+ 16 - 10
src/views/IncidentNewList.vue

@@ -1,7 +1,7 @@
1
 <template>
1
 <template>
2
   <div class="bgColor">
2
   <div class="bgColor">
3
-    <div slot="content" class="scroll-wrapper">
4
-      <div class="demo">
3
+    <div slot="content" class="scroll-wrapper" style="height:100%;">
4
+      <div class="demo" style="height:100%;">
5
         <div class="header">
5
         <div class="header">
6
           <div class="header_left">
6
           <div class="header_left">
7
             <div class="tab" :class="{active: tab.id == tabTypeIdActive}" v-for="tab in tabTypes" :key="tab.id" @click="typeChange(tab)">{{tab.text}}({{ tab.num }})</div>
7
             <div class="tab" :class="{active: tab.id == tabTypeIdActive}" v-for="tab in tabTypes" :key="tab.id" @click="typeChange(tab)">{{tab.text}}({{ tab.num }})</div>
@@ -20,7 +20,7 @@
20
             :data="items"
20
             :data="items"
21
             :options="options"
21
             :options="options"
22
             @pulling-down="onPullingDown"
22
             @pulling-down="onPullingDown"
23
-            @pulling-up="onPullingUp"
23
+            @pulling-up="onPullingUp" style="height:100%;"
24
           >
24
           >
25
             <div class="conentBox" v-if="!loadShow && items.length">
25
             <div class="conentBox" v-if="!loadShow && items.length">
26
               <div
26
               <div
@@ -162,15 +162,16 @@
162
                 </div>
162
                 </div>
163
               </div>
163
               </div>
164
             </template>
164
             </template>
165
-            <!-- <div class="wushuju" v-if="!loadShow && items.length === 0">
165
+            <div class="wushuju" v-show="!loadShow && !items.length">
166
               <img src="./../../static/images/wushuju.svg" alt />
166
               <img src="./../../static/images/wushuju.svg" alt />
167
-              <p>暂无事件</p>
168
-            </div> -->
167
+              <p>暂无数据</p>
168
+            </div>
169
           </cube-scroll>
169
           </cube-scroll>
170
         </div>
170
         </div>
171
       </div>
171
       </div>
172
     </div>
172
     </div>
173
     <load-ing v-show="loadShow"></load-ing>
173
     <load-ing v-show="loadShow"></load-ing>
174
+
174
     <!-- 图片弹窗 -->
175
     <!-- 图片弹窗 -->
175
     <showModelPicture
176
     <showModelPicture
176
       v-if="models3.disjunctor"
177
       v-if="models3.disjunctor"
@@ -1072,7 +1073,7 @@ export default {
1072
         });
1073
         });
1073
     }
1074
     }
1074
   },
1075
   },
1075
-  created() {
1076
+  mounted() {
1076
     var that = this;
1077
     var that = this;
1077
     let menu = JSON.parse(localStorage.getItem("menu"));
1078
     let menu = JSON.parse(localStorage.getItem("menu"));
1078
     if (menu) {
1079
     if (menu) {
@@ -1095,14 +1096,16 @@ export default {
1095
     );
1096
     );
1096
     this.getParamsState();
1097
     this.getParamsState();
1097
     this.loadShow = true;
1098
     this.loadShow = true;
1098
-    this.getData();
1099
+    setTimeout(()=>{
1100
+      this.getData();
1101
+    },0)
1099
     this.getStateList();
1102
     this.getStateList();
1100
 
1103
 
1101
     localStorage.removeItem("modelData");
1104
     localStorage.removeItem("modelData");
1102
     localStorage.removeItem("referenceInfo");
1105
     localStorage.removeItem("referenceInfo");
1103
     localStorage.removeItem("order");
1106
     localStorage.removeItem("order");
1104
     localStorage.removeItem("model");
1107
     localStorage.removeItem("model");
1105
-  }
1108
+  },
1106
 };
1109
 };
1107
 </script>
1110
 </script>
1108
 <style lang="stylus" rel="stylesheet/stylus" scoped>
1111
 <style lang="stylus" rel="stylesheet/stylus" scoped>
@@ -1334,6 +1337,10 @@ export default {
1334
 .bgColor {
1337
 .bgColor {
1335
   background-color: white;
1338
   background-color: white;
1336
 }
1339
 }
1340
+.demo{
1341
+  display:flex;
1342
+  flex-direction:column;
1343
+}
1337
 .food-item {
1344
 .food-item {
1338
   border-top: 0.16rem rgb(238, 238, 238) solid;
1345
   border-top: 0.16rem rgb(238, 238, 238) solid;
1339
 }
1346
 }
@@ -1470,7 +1477,6 @@ export default {
1470
           max-height: 0.88rem;
1477
           max-height: 0.88rem;
1471
         }
1478
         }
1472
         .grayFont {
1479
         .grayFont {
1473
-          overflow-x: scroll;
1474
           color: #666;
1480
           color: #666;
1475
         }
1481
         }
1476
       }
1482
       }

+ 35 - 79
src/views/Inspection.vue

@@ -1,7 +1,7 @@
1
 <template>
1
 <template>
2
   <div class="bgColor">
2
   <div class="bgColor">
3
-    <div slot="content" class="scroll-wrapper">
4
-      <div class="demo">
3
+    <div slot="content" class="scroll-wrapper" style="height:100%;">
4
+      <div class="demo" style="height:100%;">
5
         <div class="header">巡检列表</div>
5
         <div class="header">巡检列表</div>
6
         <div class="seatchHeader">
6
         <div class="seatchHeader">
7
           <div class="search fl">
7
           <div class="search fl">
@@ -21,7 +21,7 @@
21
             :data="items"
21
             :data="items"
22
             :options="options"
22
             :options="options"
23
             @pulling-down="onPullingDown"
23
             @pulling-down="onPullingDown"
24
-            @pulling-up="onPullingUp"
24
+            @pulling-up="onPullingUp" style="height:100%;"
25
           >
25
           >
26
             <!-- <cube-select
26
             <!-- <cube-select
27
               class="fr"
27
               class="fr"
@@ -71,10 +71,6 @@
71
                   <span>逾期时间:{{ item.overdueTime }}</span>
71
                   <span>逾期时间:{{ item.overdueTime }}</span>
72
                 </div>
72
                 </div>
73
               </div>
73
               </div>
74
-              <div class="wushuju" v-show="wushuju">
75
-                <img src="./../../static/images/wushuju.svg" alt />
76
-                <p>暂无巡检</p>
77
-              </div>
78
             </div>
74
             </div>
79
             <template v-if="customPullDown" slot="pulldown" slot-scope="props">
75
             <template v-if="customPullDown" slot="pulldown" slot-scope="props">
80
               <div
76
               <div
@@ -104,15 +100,19 @@
104
                 </div>
100
                 </div>
105
               </div>
101
               </div>
106
             </template>
102
             </template>
103
+            <div class="wushuju" v-show="!loadShow && !items.length">
104
+              <img src="./../../static/images/wushuju.svg" alt />
105
+              <p>暂无数据</p>
106
+            </div>
107
           </cube-scroll>
107
           </cube-scroll>
108
         </div>
108
         </div>
109
       </div>
109
       </div>
110
     </div>
110
     </div>
111
-    <load-ing v-if="!items.length && !wushuju"></load-ing>
111
+    <load-ing v-show="loadShow"></load-ing>
112
   </div>
112
   </div>
113
 </template>
113
 </template>
114
 <script>
114
 <script>
115
-import Vue from "vue";
115
+import { debounce } from 'lodash';
116
 import CubePage from "../components/cube-page.vue";
116
 import CubePage from "../components/cube-page.vue";
117
 import SwitchOption from "../components/switch-option";
117
 import SwitchOption from "../components/switch-option";
118
 import InputOption from "../components/input-option";
118
 import InputOption from "../components/input-option";
@@ -136,7 +136,6 @@ export default {
136
       pullUpLoadMoreTxt: "加载更多",
136
       pullUpLoadMoreTxt: "加载更多",
137
       pullUpLoadNoMoreTxt: "没有更多数据",
137
       pullUpLoadNoMoreTxt: "没有更多数据",
138
       customPullDown: true,
138
       customPullDown: true,
139
-      wushuju: false,
140
       title: "", //搜索内容
139
       title: "", //搜索内容
141
       stateData: [
140
       stateData: [
142
         {
141
         {
@@ -157,7 +156,6 @@ export default {
157
       idx: 0,
156
       idx: 0,
158
       stateClass: "",
157
       stateClass: "",
159
       loadShow: true,
158
       loadShow: true,
160
-      searching: false
161
     };
159
     };
162
   },
160
   },
163
   components: {
161
   components: {
@@ -305,24 +303,23 @@ export default {
305
       console.log(selectedVal, selectedIndex, selectedText);
303
       console.log(selectedVal, selectedIndex, selectedText);
306
 
304
 
307
       this.stateValue = selectedVal[0];
305
       this.stateValue = selectedVal[0];
306
+      this.loadShow = true;
308
       this.items = [];
307
       this.items = [];
309
       this.getData();
308
       this.getData();
310
     },
309
     },
311
     cancelHandle() {},
310
     cancelHandle() {},
312
     // 搜索
311
     // 搜索
313
-    searchData() {
314
-      this.items = [];
315
-      this.searching = true;
316
-      this.getData();
317
-    },
312
+    searchData:debounce(function () {
313
+      // 处理输入变化事件的逻辑
314
+      this.loadShow = true;
315
+      this.items=[]
316
+      this.getData()
317
+    }, 300),
318
     // 获取列表
318
     // 获取列表
319
     getData() {
319
     getData() {
320
       console.log(this.stateValue);
320
       console.log(this.stateValue);
321
       var that = this;
321
       var that = this;
322
       // that.items.length=0;
322
       // that.items.length=0;
323
-      if (that.searching) {
324
-        that.idx = 0;
325
-      }
326
       let postData = {
323
       let postData = {
327
         assignee: that.loginUser.id,
324
         assignee: that.loginUser.id,
328
         idx: that.idx,
325
         idx: that.idx,
@@ -353,9 +350,8 @@ export default {
353
           "service/bpm/InspectionProcessActual/fetchServiceTasks/ALL",
350
           "service/bpm/InspectionProcessActual/fetchServiceTasks/ALL",
354
           postData
351
           postData
355
         )
352
         )
356
-        .then(function(res) {
353
+        .then((res) => {
357
           if (res.data.data.length > 0) {
354
           if (res.data.data.length > 0) {
358
-            that.wushuju = false;
359
             for (var i = 0; i < res.data.data.length; i++) {
355
             for (var i = 0; i < res.data.data.length; i++) {
360
               if (res.data.data[i].createTime) {
356
               if (res.data.data[i].createTime) {
361
                 res.data.data[i].createTime = formatDate(
357
                 res.data.data[i].createTime = formatDate(
@@ -364,79 +360,42 @@ export default {
364
                 );
360
                 );
365
               }
361
               }
366
             }
362
             }
367
-            if (that.searching) {
368
-              that.items = res.data.data;
363
+            if (this.idx) {
364
+              this.items = this.items.concat(res.data.data);
369
             } else {
365
             } else {
370
-              that.items = that.items.concat(res.data.data);
366
+              this.items = res.data.data;
371
             }
367
             }
372
           } else {
368
           } else {
373
-            that.wushuju = true;
369
+            this.$refs.scroll.forceUpdate();
374
           }
370
           }
375
           that.loadShow = false;
371
           that.loadShow = false;
376
         });
372
         });
377
     },
373
     },
378
     onPullingDown() {
374
     onPullingDown() {
379
       // 模拟更新数据
375
       // 模拟更新数据
380
-      var that = this;
381
-      that.items = [];
382
-      that.idx = 0;
383
-      that.searching = false;
384
-      setTimeout(() => {
385
-        that.getData();
386
-      }, 1000);
376
+      this.idx = 0;
377
+      this.sum = 10;
378
+      this.getData();
387
     },
379
     },
388
     onPullingUp() {
380
     onPullingUp() {
389
-      var that = this;
390
-      that.idx = that.idx + 1;
391
-      that.searching = false;
392
-      that.getData();
393
-    },
394
-    updatePullDownRefresh(val) {
395
-      this.pullDownRefresh = val;
396
-    },
397
-    updatePullDownRefreshThreshold(val) {
398
-      this.pullDownRefreshThreshold = val;
399
-    },
400
-    updatePullDownRefreshTxt(val) {
401
-      this.pullDownRefreshTxt = val;
402
-    },
403
-    updatePullUpLoad(val) {
404
-      this.pullUpLoad = val;
405
-    },
406
-    updatePullUpLoadThreshold(val) {
407
-      this.pullUpLoadThreshold = val;
408
-    },
409
-    updatePullUpLoadMoreTxt(val) {
410
-      this.pullUpLoadMoreTxt = val;
411
-    },
412
-    updatePullUpLoadNoMoreTxt(val) {
413
-      this.pullUpLoadNoMoreTxt = val;
414
-    },
415
-    updateCustomPullDown(val) {
416
-      this.customPullDown = val;
381
+      this.idx = this.idx + 1;
382
+      this.getData();
417
     },
383
     },
418
-    rebuildScroll() {
419
-      Vue.nextTick(() => {
420
-        this.$refs.scroll.destroy();
421
-        this.$refs.scroll.initScroll();
422
-      });
423
-    }
424
   },
384
   },
425
-  created() {
385
+  mounted() {
426
     this.getParamsState();
386
     this.getParamsState();
427
-    this.getData(this.idx, this.sum);
387
+    setTimeout(()=>{
388
+      this.getData();
389
+    },0)
428
   }
390
   }
429
 };
391
 };
430
 </script>
392
 </script>
431
 <style lang="stylus" rel="stylesheet/stylus" scoped>
393
 <style lang="stylus" rel="stylesheet/stylus" scoped>
432
 .scroll-list-wrap {
394
 .scroll-list-wrap {
433
-  /* height: 350px */
434
   height: 90vh;
395
   height: 90vh;
435
-  /* border: 1px solid rgba(0, 0, 0, 0.1) */
436
   border-radius: 5px;
396
   border-radius: 5px;
437
   transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
397
   transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
438
-  // overflow: hidden;
439
-  padding-top: 1.76rem;
398
+  overflow: hidden;
440
 }
399
 }
441
 
400
 
442
 .foods-wrapper {
401
 .foods-wrapper {
@@ -537,6 +496,10 @@ export default {
537
 }
496
 }
538
 </style>
497
 </style>
539
 <style lang="less" scoped>
498
 <style lang="less" scoped>
499
+.demo{
500
+  display:flex;
501
+  flex-direction:column;
502
+}
540
 .bgColor {
503
 .bgColor {
541
   background-color: white;
504
   background-color: white;
542
 }
505
 }
@@ -635,18 +598,11 @@ export default {
635
     color: #fff;
598
     color: #fff;
636
     font-size: 0.37rem;
599
     font-size: 0.37rem;
637
     background: linear-gradient(#2e2f32, #414246);
600
     background: linear-gradient(#2e2f32, #414246);
638
-    position: fixed;
639
-    top: 0;
640
-    z-index: 6;
641
   }
601
   }
642
   .seatchHeader {
602
   .seatchHeader {
643
     width: 100%;
603
     width: 100%;
644
     background-color: #eee;
604
     background-color: #eee;
645
     padding: 0.16rem;
605
     padding: 0.16rem;
646
-    overflow: hidden;
647
-    position: fixed;
648
-    top: 0.88rem;
649
-    z-index: 6;
650
     box-sizing: border-box;
606
     box-sizing: border-box;
651
     .search {
607
     .search {
652
       width: 5.74rem;
608
       width: 5.74rem;

+ 0 - 1
src/views/indes.vue

@@ -638,7 +638,6 @@ export default {
638
             max-height: 0.88rem;
638
             max-height: 0.88rem;
639
           }
639
           }
640
           .grayFont {
640
           .grayFont {
641
-            overflow-x: scroll;
642
             color: #666;
641
             color: #666;
643
           }
642
           }
644
         }
643
         }

+ 2 - 1
src/views/loading.vue

@@ -23,8 +23,9 @@ export default {
23
 }
23
 }
24
 .load{
24
 .load{
25
     position: fixed;
25
     position: fixed;
26
-    left: 0;
26
+    left: 50%;
27
     top: 0;
27
     top: 0;
28
+    transform: translateX(-50%);
28
     width: 100%;
29
     width: 100%;
29
     height: 100%;
30
     height: 100%;
30
     background-color: rgba(0,0,0,0.5)!important;
31
     background-color: rgba(0,0,0,0.5)!important;

+ 13 - 9
src/views/my.vue

@@ -320,16 +320,20 @@ export default {
320
         })
320
         })
321
         .then((res) => {
321
         .then((res) => {
322
           if (res.status == 200) {
322
           if (res.status == 200) {
323
-            let userList = res.data.list[0].userList.map((v) => v.id); //用户id列表
324
-            this.isWorkOnline = userList.includes(this.loginUser.id);
325
-            if (this.isWorkOnline) {
326
-              this.$http.post("service/auth/showOnlineBtn", {}).then((res) => {
323
+            if(res.data.list.length){
324
+              let userList = res.data.list[0].userList.map((v) => v.id); //用户id列表
325
+              this.isWorkOnline = userList.includes(this.loginUser.id);
326
+              if (this.isWorkOnline) {
327
+                this.$http.post("service/auth/showOnlineBtn", {}).then((res) => {
328
+                  this.isWorkLoading = false;
329
+                  if (res.data.status == 200) {
330
+                    this.online = res.data.online;
331
+                  }
332
+                });
333
+              } else {
327
                 this.isWorkLoading = false;
334
                 this.isWorkLoading = false;
328
-                if (res.data.status == 200) {
329
-                  this.online = res.data.online;
330
-                }
331
-              });
332
-            } else {
335
+              }
336
+            }else{
333
               this.isWorkLoading = false;
337
               this.isWorkLoading = false;
334
             }
338
             }
335
           }
339
           }

+ 4 - 2
src/views/prompting.vue

@@ -35,13 +35,15 @@ export default {
35
 .success{
35
 .success{
36
     position: fixed;
36
     position: fixed;
37
     top: 0;
37
     top: 0;
38
-    left: 0;
38
+    left: 50%;
39
+    transform: translateX(-50%);
39
     width: 100%;
40
     width: 100%;
40
     height: .64rem;
41
     height: .64rem;
41
     line-height: .64rem;
42
     line-height: .64rem;
42
     padding: 0 .24rem;
43
     padding: 0 .24rem;
43
     background-color: #bae6b8;
44
     background-color: #bae6b8;
44
-    z-index: 99999 
45
+    z-index: 99999;
46
+    box-sizing: border-box;
45
 }
47
 }
46
 .success i{
48
 .success i{
47
     font-size: .35rem;
49
     font-size: .35rem;

+ 2 - 2
src/views/summaryOrder.vue

@@ -1292,12 +1292,12 @@ export default {
1292
   background: #ececec;
1292
   background: #ececec;
1293
   position: fixed;
1293
   position: fixed;
1294
   bottom: 0;
1294
   bottom: 0;
1295
-  left: 0;
1295
+  left: 50%;
1296
+  transform: translateX(-50%);
1296
   width: 100%;
1297
   width: 100%;
1297
   padding-bottom: 0.12rem;
1298
   padding-bottom: 0.12rem;
1298
   padding-top: 0.12rem;
1299
   padding-top: 0.12rem;
1299
   display: flex;
1300
   display: flex;
1300
-
1301
 }
1301
 }
1302
 .sub .cube-btn {
1302
 .sub .cube-btn {
1303
   flex: 1;
1303
   flex: 1;

+ 1 - 1
static/css/fontnew/iconfont.css

@@ -7,7 +7,7 @@
7
 
7
 
8
 .dash {
8
 .dash {
9
   font-family: "dash" !important;
9
   font-family: "dash" !important;
10
-  font-size: 16px;
10
+  font-size: inherit;
11
   font-style: normal;
11
   font-style: normal;
12
   -webkit-font-smoothing: antialiased;
12
   -webkit-font-smoothing: antialiased;
13
   -moz-osx-font-smoothing: grayscale;
13
   -moz-osx-font-smoothing: grayscale;

+ 1 - 1
static/css/iconfont.css

@@ -9,7 +9,7 @@
9
 
9
 
10
 .iconfont {
10
 .iconfont {
11
   font-family: "iconfont" !important;
11
   font-family: "iconfont" !important;
12
-  font-size: 16px;
12
+  font-size: inherit;
13
   font-style: normal;
13
   font-style: normal;
14
   -webkit-font-smoothing: antialiased;
14
   -webkit-font-smoothing: antialiased;
15
   -moz-osx-font-smoothing: grayscale;
15
   -moz-osx-font-smoothing: grayscale;

+ 1 - 1
static/css/newicon/iconfont.css

@@ -7,7 +7,7 @@
7
 
7
 
8
 .newicon {
8
 .newicon {
9
   font-family: "newicon" !important;
9
   font-family: "newicon" !important;
10
-  font-size: 16px;
10
+  font-size: inherit;
11
   font-style: normal;
11
   font-style: normal;
12
   -webkit-font-smoothing: antialiased;
12
   -webkit-font-smoothing: antialiased;
13
   -moz-osx-font-smoothing: grayscale;
13
   -moz-osx-font-smoothing: grayscale;

+ 1 - 1
static/js/public.js

@@ -1,6 +1,6 @@
1
 // 屏幕自适应
1
 // 屏幕自适应
2
 setInterval(function(){
2
 setInterval(function(){
3
-    var width=screen.width;
3
+    var width=Math.min(screen.width, 750);
4
     var size=100*width/750+'px';
4
     var size=100*width/750+'px';
5
     $('html').css({"font-size":size});
5
     $('html').css({"font-size":size});
6
 },100)
6
 },100)