seimin %!s(int64=3) %!d(string=hai) anos
pai
achega
cd82a817d2

+ 454 - 0
src/views/checkNumber copy.vue

@@ -0,0 +1,454 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="scroll-list-wrap">
6
+          <cube-scroll
7
+            ref="scroll"
8
+            :data="items"
9
+            :options="options"
10
+            @pulling-down="onPullingDown"
11
+            @pulling-up="onPullingUp"
12
+          >
13
+            <div class="search">
14
+              <input
15
+                type="text"
16
+                placeholder="搜索"
17
+                v-model="search"
18
+                @input="searchFnDebounce()"
19
+              />
20
+            </div>
21
+            <ul class="foods-wrapper">
22
+              <li
23
+                v-for="data in items"
24
+                class="food-item border-1px"
25
+                :key="data.id"
26
+              >
27
+                <div class="food-content">
28
+                  <div class="title">
29
+                    <div>
30
+                      <i class="iconfont icon-changjianwenti1"></i>
31
+                    </div>
32
+                    <div class="title_t">
33
+                      <span>{{ data.dept }}</span>
34
+                      <span v-if="data.phone"
35
+                        ><a :href="'tel:' + data.phone"
36
+                          ><i class="iconfont icon-shouji"></i
37
+                          >{{ data.phone }}</a
38
+                        ></span
39
+                      >
40
+                    </div>
41
+                  </div>
42
+                  <div class="content">
43
+                    <span
44
+                      >单位名称:{{
45
+                        data.unit ? data.unit.unit : "无"
46
+                      }}</span
47
+                    >
48
+                  </div>
49
+                  <div class="content">
50
+                    <span>办公地址:{{data.address}}</span>
51
+                    <span></span>
52
+                  </div>
53
+                </div>
54
+              </li>
55
+              <div class="wushuju" v-show="wushuju">
56
+                <img src="./../../static/images/wushuju.svg" alt="" />
57
+                <div class="noDataFont">暂无数据</div>
58
+              </div>
59
+            </ul>
60
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
61
+              <div
62
+                v-if="props.pullDownRefresh"
63
+                class="cube-pulldown-wrapper"
64
+                :style="props.pullDownStyle"
65
+              >
66
+                <div
67
+                  v-show="props.beforePullDown"
68
+                  class="before-trigger"
69
+                  :style="{ paddingTop: props.bubbleY + 'px' }"
70
+                >
71
+                  <span
72
+                    :class="{
73
+                      rotate: props.bubbleY > pullDownRefreshThreshold - 40
74
+                    }"
75
+                    >↓</span
76
+                  >
77
+                </div>
78
+                <div class="after-trigger" v-show="!props.beforePullDown">
79
+                  <div v-show="props.isPullingDown" class="loading">
80
+                    <cube-loading></cube-loading>
81
+                  </div>
82
+                  <div v-show="!props.isPullingDown" class="text">
83
+                    <span class="refresh-text">更新成功</span>
84
+                  </div>
85
+                </div>
86
+              </div>
87
+            </template>
88
+          </cube-scroll>
89
+        </div>
90
+      </div>
91
+    </div>
92
+    <load-ing v-show="loadShow"></load-ing>
93
+  </div>
94
+</template>
95
+<script>
96
+import Vue from "vue";
97
+import debounce from "lodash/debounce";
98
+import CubePage from "../components/cube-page.vue";
99
+import SwitchOption from "../components/switch-option";
100
+import InputOption from "../components/input-option";
101
+import SelectOption from "../components/select-option";
102
+import LoadIng from "./../views/loading.vue";
103
+export default {
104
+  data() {
105
+    return {
106
+      items: [],
107
+      pullDownRefresh: true,
108
+      pullDownRefreshThreshold: 60,
109
+      pullDownRefreshStop: 40,
110
+      pullDownRefreshTxt: "Refresh success",
111
+      pullUpLoad: true,
112
+      pullUpLoadThreshold: 0,
113
+      pullUpLoadMoreTxt: "Load more",
114
+      pullUpLoadNoMoreTxt: "没有更多数据",
115
+      wushuju: false,
116
+      customPullDown: true,
117
+      search: "",
118
+      sum: 10,
119
+      idx: 0,
120
+      loadShow: true,
121
+      lastSearchKey: "",
122
+      searchFnDebounce: null
123
+    };
124
+  },
125
+  components: {
126
+    CubePage,
127
+    SwitchOption,
128
+    InputOption,
129
+    SelectOption,
130
+    LoadIng
131
+  },
132
+  computed: {
133
+    options() {
134
+      return {
135
+        pullDownRefresh: this.pullDownRefreshObj,
136
+        pullUpLoad: this.pullUpLoadObj,
137
+        scrollbar: true
138
+      };
139
+    },
140
+    pullDownRefreshObj: function() {
141
+      return this.pullDownRefresh
142
+        ? {
143
+            threshold: parseInt(this.pullDownRefreshThreshold),
144
+            txt: this.pullDownRefreshTxt
145
+          }
146
+        : false;
147
+    },
148
+    pullUpLoadObj: function() {
149
+      return this.pullUpLoad
150
+        ? {
151
+            threshold: parseInt(this.pullUpLoadThreshold),
152
+            txt: {
153
+              more: this.pullUpLoadMoreTxt,
154
+              noMore: this.pullUpLoadNoMoreTxt
155
+            }
156
+          }
157
+        : false;
158
+    }
159
+  },
160
+  methods: {
161
+    getParams() {
162
+      if (this.$route.params.keword) {
163
+        this.search = this.$route.params.keword;
164
+      }
165
+    },
166
+    searchFn() {
167
+      var that = this;
168
+      that.loadShow = true;
169
+      this.idx = 0;
170
+      this.lastSearchKey = that.search;
171
+      this.$http
172
+        .post("service/user/data/fetchDataList/department", {
173
+          idx: 0,
174
+          sum: 10,
175
+          department: {
176
+            selectType: "pinyin_qs",
177
+            dept: that.search
178
+          }
179
+        })
180
+        .then(function(res) {
181
+          if (that.lastSearchKey == that.search) {
182
+            if (res.data.list.length > 0) {
183
+              that.items = res.data.list;
184
+              that.wushuju = false;
185
+            } else {
186
+              that.wushuju = true;
187
+              that.items = [];
188
+            }
189
+            that.loadShow = false;
190
+          }
191
+        });
192
+    },
193
+    toKnowDetails(data) {
194
+      // this.$router.push({path:'/knowDetails'})
195
+      this.$router.push({
196
+        name: "KnowDetails",
197
+        params: {
198
+          data: JSON.stringify(data)
199
+        }
200
+      });
201
+    },
202
+    onPullingDown() {
203
+      // 模拟更新数据
204
+      this.idx = 0;
205
+      setTimeout(() => {
206
+        var that = this;
207
+        this.$http
208
+          .post("service/user/data/fetchDataList/department", {
209
+            idx: 0,
210
+            sum: 10,
211
+            department: {
212
+              selectType: "pinyin_qs",
213
+              dept: that.search
214
+            }
215
+          })
216
+          .then(function(res) {
217
+            if (res.data.list.length > 0) {
218
+              that.items = res.data.list;
219
+              that.wushuju = false;
220
+            } else {
221
+              that.$refs.scroll.forceUpdate();
222
+              that.wushuju = true;
223
+            }
224
+          });
225
+      }, 1000);
226
+    },
227
+    getData(idx, sum) {
228
+      var that = this;
229
+      this.$http
230
+        .post("service/user/data/fetchDataList/phoneDirectory", {
231
+          idx: idx,
232
+          sum: sum,
233
+          user: {
234
+            // selectType: "pinyin_qs",
235
+            // dept: that.search
236
+          }
237
+        })
238
+        .then(function(res) {
239
+          if (res.data.list.length > 0) {
240
+            that.items = res.data.list;
241
+            that.wushuju = false;
242
+          } else {
243
+            that.wushuju = true;
244
+          }
245
+          that.loadShow = false;
246
+        });
247
+    },
248
+    onPullingUp() {
249
+      var that = this;
250
+      that.idx = that.idx + 1;
251
+      this.$http
252
+        .post("service/user/data/fetchDataList/department", {
253
+          idx: that.idx,
254
+          sum: that.sum,
255
+          department: {
256
+            selectType: "pinyin_qs",
257
+            dept: that.search
258
+          }
259
+        })
260
+        .then(function(res) {
261
+          setTimeout(() => {
262
+            if (res.data.list.length > 0) {
263
+              that.items = that.items.concat(res.data.list);
264
+            } else {
265
+              that.$refs.scroll.forceUpdate();
266
+            }
267
+          }, 1000);
268
+        });
269
+    },
270
+    updatePullDownRefresh(val) {
271
+      this.pullDownRefresh = val;
272
+    },
273
+    updatePullDownRefreshThreshold(val) {
274
+      this.pullDownRefreshThreshold = val;
275
+    },
276
+    updatePullDownRefreshTxt(val) {
277
+      this.pullDownRefreshTxt = val;
278
+    },
279
+    updatePullUpLoad(val) {
280
+      this.pullUpLoad = val;
281
+    },
282
+    updatePullUpLoadThreshold(val) {
283
+      this.pullUpLoadThreshold = val;
284
+    },
285
+    updatePullUpLoadMoreTxt(val) {
286
+      this.pullUpLoadMoreTxt = val;
287
+    },
288
+    updatePullUpLoadNoMoreTxt(val) {
289
+      this.pullUpLoadNoMoreTxt = val;
290
+    },
291
+    updateCustomPullDown(val) {
292
+      this.customPullDown = val;
293
+    },
294
+    rebuildScroll() {
295
+      Vue.nextTick(() => {
296
+        this.$refs.scroll.destroy();
297
+        this.$refs.scroll.initScroll();
298
+      });
299
+    }
300
+  },
301
+  created() {
302
+    this.searchFnDebounce = debounce(this.searchFn, 500);
303
+    this.getParams();
304
+    this.getData(this.idx, this.sum);
305
+  },
306
+  beforeDestroy() {
307
+    this.searchFnDebounce.cancel();
308
+  }
309
+};
310
+</script>
311
+<style lang="stylus" rel="stylesheet/stylus" scoped>
312
+.scroll-list-wrap
313
+  /* height: 350px */
314
+  height:100vh
315
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
316
+  border-radius: 5px
317
+  transform: rotate(0deg) // fix 子元素超出边框圆角部分不隐藏的问题
318
+  overflow: hidden
319
+
320
+.foods-wrapper
321
+  .food-item
322
+    display: flex
323
+    /* min-width: 0 */
324
+    /* padding: 18px
325
+    border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
326
+
327
+    &:last-child
328
+      border-none()
329
+      margin-bottom: 0
330
+
331
+    .food-content
332
+      flex: 1
333
+      min-width: 0;
334
+      .cartcontrol-wrapper
335
+        position: absolute
336
+        right: 0
337
+        bottom: 12px
338
+        .scroll-wrapper{
339
+  .cube-pulldown-wrapper{
340
+    .before-trigger{
341
+      font-size: 30px;
342
+      line-height: 30px;
343
+      align-self: flex-end;
344
+      span{
345
+        display: inline-block;
346
+        transition: all 0.3s;
347
+        color: #666;
348
+        &.rotate{
349
+            transform: rotate(180deg)
350
+          }
351
+      }
352
+    }
353
+    .after-trigger{
354
+      .refresh-text{
355
+        color: grey
356
+      }
357
+    }
358
+ }
359
+}
360
+</style>
361
+<style scoped>
362
+.bgColor {
363
+  background-color: white;
364
+}
365
+.search {
366
+  padding: 0.16rem 0.24rem;
367
+  height: 0.6rem;
368
+  background-color: #eeeeee;
369
+  border-bottom: 0.01rem #999999 solid;
370
+}
371
+.search input {
372
+  width: 100%;
373
+  height: 0.56rem;
374
+  border-radius: 4px;
375
+  text-align: center;
376
+  font-size: 0.28rem;
377
+}
378
+.search:focus {
379
+  outline: none;
380
+}
381
+.food-item {
382
+  border-top: 0.16rem rgb(238, 238, 238) solid;
383
+}
384
+.food-content {
385
+  border-top: 0.01rem rgb(223, 222, 222) solid;
386
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
387
+}
388
+.title {
389
+  display: flex;
390
+  min-width: 0;
391
+  padding: 0.2rem 0.24rem;
392
+  line-height: 0.45rem;
393
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
394
+}
395
+.title .title_t {
396
+  display: flex;
397
+  justify-content: space-between;
398
+}
399
+.title div:nth-child(1) {
400
+  width: 6%;
401
+}
402
+.title div:nth-child(1) i {
403
+  font-size: 0.32rem;
404
+  color: #005395;
405
+  line-height: 0.49rem;
406
+}
407
+.title div:nth-child(2) {
408
+  width: 94%;
409
+  font-size: 0.32rem;
410
+  overflow: hidden;
411
+  white-space: nowrap;
412
+  text-overflow: ellipsis;
413
+}
414
+.content {
415
+  font-size: 0.28rem;
416
+  /* margin-top: .3rem; */
417
+  line-height: 0.39rem;
418
+  overflow: hidden;
419
+  display: -webkit-box;
420
+  -webkit-line-clamp: 2;
421
+  -webkit-box-orient: vertical;
422
+  word-break: break-all;
423
+  padding: 0 0.64rem;
424
+  margin: 0.24rem 0;
425
+  max-height: 0.78rem;
426
+}
427
+.timeBox {
428
+  display: flex;
429
+  justify-content: space-between;
430
+  /* margin-top: .3rem; */
431
+  border-top: 0.01rem rgb(223, 222, 222) solid;
432
+  padding: 0.2rem 0.64rem;
433
+}
434
+.timeBox .time {
435
+  color: #999999;
436
+  font-size: 0.24rem;
437
+}
438
+.timeBox .good i {
439
+  font-size: 0.3rem;
440
+  color: #a37200;
441
+}
442
+.timeBox .good span {
443
+  color: #a37200;
444
+  font-size: 0.24rem;
445
+}
446
+.wushuju {
447
+  margin-top: 2.4rem;
448
+  text-align: center;
449
+}
450
+.wushuju img {
451
+  width: 5.12rem;
452
+  height: 2.84rem;
453
+}
454
+</style>

+ 199 - 115
src/views/checkNumber.vue

@@ -3,22 +3,45 @@
3 3
     <div slot="content" class="scroll-wrapper">
4 4
       <div class="demo">
5 5
         <div class="scroll-list-wrap">
6
-          <cube-scroll
6
+          <!-- <cube-scroll
7 7
             ref="scroll"
8 8
             :data="items"
9 9
             :options="options"
10 10
             @pulling-down="onPullingDown"
11 11
             @pulling-up="onPullingUp"
12
+          > -->
13
+          <cube-scroll
14
+            ref="scroll"
15
+            :data="items"
16
+            :options="options"
12 17
           >
13 18
             <div class="search">
14 19
               <input
15 20
                 type="text"
16
-                placeholder="搜索"
21
+                placeholder="可简拼、名称搜索"
17 22
                 v-model="search"
18 23
                 @input="searchFnDebounce()"
24
+                @click="clickSearch()"
19 25
               />
26
+              <span v-if="isShow" @click="cancel()" class="cancel">取消</span>
20 27
             </div>
21
-            <ul class="foods-wrapper">
28
+            <ul class="searchList" v-show="isShow">
29
+              <li v-for="item in searchList" :key="item.id" @click="clickSearchItem(item)">
30
+                <i class="dash dash-fangdajing"></i>
31
+                <div class="s_c">
32
+                  <template v-if="item.unit.id">
33
+                    <div class="searchListItem" v-if="item.unit"><strong>单位:</strong><em>{{item.unit.unit}}</em></div>
34
+                    <div class="searchListItem"><strong>部门:</strong><em>{{item.dept}}</em></div>
35
+                  </template>
36
+                  <template v-else><div class="searchListItem"><strong>单位:</strong><em>{{item.unit}}</em></div></template>
37
+                </div>
38
+              </li>
39
+              <li class="wushuju" v-show="wushuju1">
40
+                <img src="./../../static/images/wushuju.svg" alt="" />
41
+                <div class="noDataFont">暂无数据</div>
42
+              </li>
43
+            </ul>
44
+            <ul class="foods-wrapper" :style="{paddingTop:wushuju?'2.4rem':'0'}">
22 45
               <li
23 46
                 v-for="data in items"
24 47
                 class="food-item border-1px"
@@ -40,28 +63,18 @@
40 63
                     </div>
41 64
                   </div>
42 65
                   <div class="content">
43
-                    <span
44
-                      >单位名称:{{
45
-                        data.parent ? data.parent.dept : "无"
46
-                      }}</span
47
-                    >
66
+                    <span>单位名称:{{data.unit.unit}}</span>
48 67
                   </div>
49 68
                   <div class="content">
50
-                    <span
51
-                      >办公地址:{{
52
-                        data.place
53
-                          ? data.place.area.area + " " + data.place.place
54
-                          : "无"
55
-                      }}</span
56
-                    >
69
+                    <span>办公地址:{{data.address}}</span>
57 70
                     <span></span>
58 71
                   </div>
59 72
                 </div>
60 73
               </li>
61
-              <div class="wushuju" v-show="wushuju">
74
+              <li class="wushuju" v-show="wushuju">
62 75
                 <img src="./../../static/images/wushuju.svg" alt="" />
63 76
                 <div class="noDataFont">暂无数据</div>
64
-              </div>
77
+              </li>
65 78
             </ul>
66 79
             <template v-if="customPullDown" slot="pulldown" slot-scope="props">
67 80
               <div
@@ -118,14 +131,17 @@ export default {
118 131
       pullUpLoadThreshold: 0,
119 132
       pullUpLoadMoreTxt: "Load more",
120 133
       pullUpLoadNoMoreTxt: "没有更多数据",
121
-      wushuju: false,
134
+      wushuju: true,
135
+      wushuju1: true,
122 136
       customPullDown: true,
123 137
       search: "",
124 138
       sum: 10,
125 139
       idx: 0,
126
-      loadShow: true,
140
+      loadShow: false,
127 141
       lastSearchKey: "",
128
-      searchFnDebounce: null
142
+      searchFnDebounce: null,
143
+      isShow:false,//是否显示下拉框
144
+      searchList:[],//下拉框内容
129 145
     };
130 146
   },
131 147
   components: {
@@ -138,9 +154,9 @@ export default {
138 154
   computed: {
139 155
     options() {
140 156
       return {
141
-        pullDownRefresh: this.pullDownRefreshObj,
142
-        pullUpLoad: this.pullUpLoadObj,
143
-        scrollbar: true
157
+        // pullDownRefresh: this.pullDownRefreshObj,
158
+        // pullUpLoad: this.pullUpLoadObj,
159
+        // scrollbar: true
144 160
       };
145 161
     },
146 162
     pullDownRefreshObj: function() {
@@ -164,40 +180,66 @@ export default {
164 180
     }
165 181
   },
166 182
   methods: {
167
-    getParams() {
168
-      if (this.$route.params.keword) {
169
-        this.search = this.$route.params.keword;
183
+    // getParams() {
184
+    //   if (this.$route.params.keword) {
185
+    //     this.search = this.$route.params.keword;
186
+    //   }
187
+    // },
188
+    clickSearch(){
189
+      this.isShow = true;
190
+      this.items = [];
191
+    },
192
+    //点击搜索出来的项
193
+    clickSearchItem(item){
194
+      this.isShow = false;
195
+      this.wushuju = false;
196
+      this.items = [];
197
+      if(item.unit.id){
198
+        //部门
199
+        this.items = [item];
200
+      }else{
201
+        //单位
202
+        this.loadShow = true;
203
+        this.$http
204
+        .post("service/user/queryPhone", {unitId:item.id})
205
+        .then((res) => {
206
+            this.items = res.data.data;
207
+            this.loadShow = false;
208
+        });
170 209
       }
171 210
     },
211
+    // 取消
212
+    cancel(){
213
+      this.isShow = false;
214
+      this.search = '';
215
+      this.searchList = [];
216
+    },
172 217
     searchFn() {
173 218
       var that = this;
219
+      this.isShow = true;
174 220
       that.loadShow = true;
175 221
       this.idx = 0;
176 222
       this.lastSearchKey = that.search;
223
+      let postData = {};
224
+      if(that.search){
225
+        postData.keyword = that.search;
226
+      }
177 227
       this.$http
178
-        .post("service/user/data/fetchDataList/department", {
179
-          idx: 0,
180
-          sum: 10,
181
-          department: {
182
-            selectType: "pinyin_qs",
183
-            dept: that.search
184
-          }
185
-        })
228
+        .post("service/user/queryPhone", postData)
186 229
         .then(function(res) {
187 230
           if (that.lastSearchKey == that.search) {
188
-            if (res.data.list.length > 0) {
189
-              that.items = res.data.list;
190
-              that.wushuju = false;
231
+            if (res.data.data.length > 0) {
232
+              that.searchList = res.data.data;
233
+              that.wushuju1 = false;
191 234
             } else {
192
-              that.wushuju = true;
193
-              that.items = [];
235
+              that.wushuju1 = true;
236
+              that.searchList = [];
194 237
             }
195 238
             that.loadShow = false;
196 239
           }
197 240
         });
198 241
     },
199 242
     toKnowDetails(data) {
200
-      // this.$router.push({path:'/knowDetails'})
201 243
       this.$router.push({
202 244
         name: "KnowDetails",
203 245
         params: {
@@ -205,74 +247,71 @@ export default {
205 247
         }
206 248
       });
207 249
     },
208
-    onPullingDown() {
209
-      // 模拟更新数据
210
-      this.idx = 0;
211
-      setTimeout(() => {
212
-        var that = this;
213
-        this.$http
214
-          .post("service/user/data/fetchDataList/department", {
215
-            idx: 0,
216
-            sum: 10,
217
-            department: {
218
-              selectType: "pinyin_qs",
219
-              dept: that.search
220
-            }
221
-          })
222
-          .then(function(res) {
223
-            if (res.data.list.length > 0) {
224
-              that.items = res.data.list;
225
-              that.wushuju = false;
226
-            } else {
227
-              that.$refs.scroll.forceUpdate();
228
-              that.wushuju = true;
229
-            }
230
-          });
231
-      }, 1000);
232
-    },
233
-    getData(idx, sum) {
234
-      var that = this;
235
-      this.$http
236
-        .post("service/user/data/fetchDataList/department", {
237
-          idx: idx,
238
-          sum: sum,
239
-          department: {
240
-            selectType: "pinyin_qs",
241
-            dept: that.search
242
-          }
243
-        })
244
-        .then(function(res) {
245
-          if (res.data.list.length > 0) {
246
-            that.items = res.data.list;
247
-            that.wushuju = false;
248
-          } else {
249
-            that.wushuju = true;
250
-          }
251
-          that.loadShow = false;
252
-        });
253
-    },
254
-    onPullingUp() {
255
-      var that = this;
256
-      that.idx = that.idx + 1;
257
-      this.$http
258
-        .post("service/user/data/fetchDataList/department", {
259
-          idx: that.idx,
260
-          sum: that.sum,
261
-          department: {
262
-            selectType: "pinyin_qs",
263
-            dept: that.search
264
-          }
265
-        })
266
-        .then(function(res) {
267
-          setTimeout(() => {
268
-            if (res.data.list.length > 0) {
269
-              that.items = that.items.concat(res.data.list);
270
-            } else {
271
-              that.$refs.scroll.forceUpdate();
272
-            }
273
-          }, 1000);
274
-        });
275
-    },
250
+    // onPullingDown() {
251
+    //   // 模拟更新数据
252
+    //   this.idx = 0;
253
+    //   setTimeout(() => {
254
+    //     var that = this;
255
+    //     this.$http
256
+    //       .post("service/user/data/fetchDataList/phoneDirectory", {
257
+    //         idx: 0,
258
+    //         sum: 10,
259
+    //         phoneDirectory: {
260
+    //           keyword: that.search
261
+    //         }
262
+    //       })
263
+    //       .then(function(res) {
264
+    //         if (res.data.list.length > 0) {
265
+    //           that.items = res.data.list;
266
+    //           that.wushuju = false;
267
+    //         } else {
268
+    //           that.$refs.scroll.forceUpdate();
269
+    //           that.wushuju = true;
270
+    //         }
271
+    //       });
272
+    //   }, 1000);
273
+    // },
274
+    // getData(idx, sum) {
275
+    //   var that = this;
276
+    //   this.$http
277
+    //     .post("service/user/data/fetchDataList/phoneDirectory", {
278
+    //       idx: idx,
279
+    //       sum: sum,
280
+    //       phoneDirectory: {
281
+    //         keyword: that.search
282
+    //       }
283
+    //     })
284
+    //     .then(function(res) {
285
+    //       if (res.data.list.length > 0) {
286
+    //         that.items = res.data.list;
287
+    //         that.wushuju = false;
288
+    //       } else {
289
+    //         that.wushuju = true;
290
+    //       }
291
+    //       that.loadShow = false;
292
+    //     });
293
+    // },
294
+    // onPullingUp() {
295
+    //   var that = this;
296
+    //   that.idx = that.idx + 1;
297
+    //   this.$http
298
+    //     .post("service/user/data/fetchDataList/phoneDirectory", {
299
+    //       idx: that.idx,
300
+    //       sum: that.sum,
301
+    //       phoneDirectory: {
302
+    //         keyword: that.search
303
+    //       }
304
+    //     })
305
+    //     .then(function(res) {
306
+    //       setTimeout(() => {
307
+    //         if (res.data.list.length > 0) {
308
+    //           that.items = that.items.concat(res.data.list);
309
+    //         } else {
310
+    //           that.$refs.scroll.forceUpdate();
311
+    //         }
312
+    //       }, 1000);
313
+    //     });
314
+    // },
276 315
     updatePullDownRefresh(val) {
277 316
       this.pullDownRefresh = val;
278 317
     },
@@ -306,8 +345,8 @@ export default {
306 345
   },
307 346
   created() {
308 347
     this.searchFnDebounce = debounce(this.searchFn, 500);
309
-    this.getParams();
310
-    this.getData(this.idx, this.sum);
348
+    // this.getParams();
349
+    // this.getData(this.idx, this.sum);
311 350
   },
312 351
   beforeDestroy() {
313 352
     this.searchFnDebounce.cancel();
@@ -373,14 +412,20 @@ export default {
373 412
   height: 0.6rem;
374 413
   background-color: #eeeeee;
375 414
   border-bottom: 0.01rem #999999 solid;
415
+  display: flex;
376 416
 }
377 417
 .search input {
378
-  width: 100%;
418
+  flex: 1;
379 419
   height: 0.56rem;
380 420
   border-radius: 4px;
381 421
   text-align: center;
382 422
   font-size: 0.28rem;
383 423
 }
424
+.search .cancel{
425
+  line-height: 0.56rem;
426
+  text-align: center;
427
+  margin-left: 0.1rem;
428
+}
384 429
 .search:focus {
385 430
   outline: none;
386 431
 }
@@ -414,8 +459,8 @@ export default {
414 459
   width: 94%;
415 460
   font-size: 0.32rem;
416 461
   overflow: hidden;
417
-  white-space: nowrap;
418
-  text-overflow: ellipsis;
462
+  /* white-space: nowrap; */
463
+  /* text-overflow: ellipsis; */
419 464
 }
420 465
 .content {
421 466
   font-size: 0.28rem;
@@ -450,11 +495,50 @@ export default {
450 495
   font-size: 0.24rem;
451 496
 }
452 497
 .wushuju {
453
-  margin-top: 2.4rem;
454
-  text-align: center;
498
+  box-sizing: border-box;
499
+  width: 100%;
500
+  height: 100%;
501
+  display: flex;
502
+  flex-direction: column;
503
+  justify-content: center;
504
+  align-items: center;
455 505
 }
456 506
 .wushuju img {
457 507
   width: 5.12rem;
458 508
   height: 2.84rem;
459 509
 }
510
+.searchList{
511
+  position: absolute;
512
+  top: 0.92rem;
513
+  width: 100%;
514
+  height: calc(100vh - 0.92rem);
515
+  font-size: 0.3rem;
516
+  background-color: #eee;
517
+  box-shadow: 0 0.05rem 0.05rem #ccc;
518
+  overflow: hidden;
519
+}
520
+.searchList li {
521
+  padding: 0.2rem;
522
+  border-bottom: 0.02rem solid #fff;
523
+  line-height: 1.5;
524
+  display: flex;
525
+  align-items: center;
526
+}
527
+.searchList li .s_c{
528
+  flex: 1;
529
+}
530
+.searchList li .dash-fangdajing{
531
+  margin-right: 0.2rem;
532
+}
533
+.searchList .searchListItem{
534
+  display: flex;
535
+}
536
+.searchList .searchListItem strong{
537
+  width: 3em;
538
+}
539
+.searchList .searchListItem em{
540
+  flex: 1;
541
+  font-style: normal;
542
+  word-break: break-all;
543
+}
460 544
 </style>

+ 2 - 2
src/views/indes.vue

@@ -6,10 +6,10 @@
6 6
         <i class="iconfont icon-xinjian"></i>
7 7
         <span>快速报修</span>
8 8
       </div>
9
-      <!-- <div @click="toCheckNumber()">
9
+      <div @click="toCheckNumber()">
10 10
         <i class="dash dash-chahao"></i>
11 11
         <span>电话查号</span>
12
-      </div> -->
12
+      </div>
13 13
       <div @click="toChangePassword()">
14 14
         <i class="dash dash-xiugaimima"></i>
15 15
         <span>修改密码</span>

+ 26 - 3
static/font/seimin/demo_index.html

@@ -55,6 +55,12 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon dash">&#xe609;</span>
59
+                <div class="name">fangdajing</div>
60
+                <div class="code-name">&amp;#xe609;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
58 64
               <span class="icon dash">&#xe7b7;</span>
59 65
                 <div class="name">查号</div>
60 66
                 <div class="code-name">&amp;#xe7b7;</div>
@@ -84,9 +90,9 @@
84 90
 <pre><code class="language-css"
85 91
 >@font-face {
86 92
   font-family: 'dash';
87
-  src: url('iconfont.woff2?t=1634696226264') format('woff2'),
88
-       url('iconfont.woff?t=1634696226264') format('woff'),
89
-       url('iconfont.ttf?t=1634696226264') format('truetype');
93
+  src: url('iconfont.woff2?t=1638846521111') format('woff2'),
94
+       url('iconfont.woff?t=1638846521111') format('woff'),
95
+       url('iconfont.ttf?t=1638846521111') format('truetype');
90 96
 }
91 97
 </code></pre>
92 98
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -113,6 +119,15 @@
113 119
         <ul class="icon_lists dib-box">
114 120
           
115 121
           <li class="dib">
122
+            <span class="icon dash dash-fangdajing"></span>
123
+            <div class="name">
124
+              fangdajing
125
+            </div>
126
+            <div class="code-name">.dash-fangdajing
127
+            </div>
128
+          </li>
129
+          
130
+          <li class="dib">
116 131
             <span class="icon dash dash-chahao"></span>
117 132
             <div class="name">
118 133
               查号
@@ -159,6 +174,14 @@
159 174
           
160 175
             <li class="dib">
161 176
                 <svg class="icon svg-icon" aria-hidden="true">
177
+                  <use xlink:href="#dash-fangdajing"></use>
178
+                </svg>
179
+                <div class="name">fangdajing</div>
180
+                <div class="code-name">#dash-fangdajing</div>
181
+            </li>
182
+          
183
+            <li class="dib">
184
+                <svg class="icon svg-icon" aria-hidden="true">
162 185
                   <use xlink:href="#dash-chahao"></use>
163 186
                 </svg>
164 187
                 <div class="name">查号</div>

+ 7 - 3
static/font/seimin/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "dash"; /* Project id 2879659 */
3
-  src: url('iconfont.woff2?t=1634696226264') format('woff2'),
4
-       url('iconfont.woff?t=1634696226264') format('woff'),
5
-       url('iconfont.ttf?t=1634696226264') format('truetype');
3
+  src: url('iconfont.woff2?t=1638846521111') format('woff2'),
4
+       url('iconfont.woff?t=1638846521111') format('woff'),
5
+       url('iconfont.ttf?t=1638846521111') format('truetype');
6 6
 }
7 7
 
8 8
 .dash {
@@ -13,6 +13,10 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.dash-fangdajing:before {
17
+  content: "\e609";
18
+}
19
+
16 20
 .dash-chahao:before {
17 21
   content: "\e7b7";
18 22
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
static/font/seimin/iconfont.js


+ 7 - 0
static/font/seimin/iconfont.json

@@ -6,6 +6,13 @@
6 6
   "description": "引入一个新的字体图标",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "463375",
10
+      "name": "fangdajing",
11
+      "font_class": "fangdajing",
12
+      "unicode": "e609",
13
+      "unicode_decimal": 58889
14
+    },
15
+    {
9 16
       "icon_id": "1788495",
10 17
       "name": "查号",
11 18
       "font_class": "chahao",

BIN=BIN
static/font/seimin/iconfont.ttf


BIN=BIN
static/font/seimin/iconfont.woff


BIN=BIN
static/font/seimin/iconfont.woff2