Commit fd9a88a0cae799ef5dd6ad254ce14a59a177804f

Authored by 王强
1 parent 2e4a4690

搜索页面处理~

Showing 1 changed file with 22 additions and 9 deletions
src/pages/search/search.vue
1 1 <template>
2 2 <div class="search-box">
3   -
  3 +
4 4 <!-- nav -->
5 5 <div class="nav" :style="'padding-top: ' + ($parent.top.value) + 'px'">
6 6  
... ... @@ -420,6 +420,17 @@
420 420 // 加载中提示
421 421 Indicator.open("搜索中...");
422 422  
  423 +
  424 + // window.alert('keyword:' + keyword);
  425 + // window.alert('uid:' + this.getStore("uid"));
  426 + // window.alert('longitude:' + this.coordinate.longitude);
  427 + // window.alert('latitude:' + this.coordinate.latitude);
  428 + // window.alert('page:' + this.paging.page);
  429 +
  430 +
  431 +
  432 +
  433 +
423 434 // 获取证书请求接口
424 435 this.http("/Api/" + this.getApiVersion().index + "/foodsSearch", {
425 436 keyword: keyword,
... ... @@ -452,6 +463,11 @@
452 463  
453 464 /* 获取搜索数据 开始 */
454 465  
  466 + // 不显示更多按钮
  467 + this.$set(this.titles.goods, "more", false);
  468 + this.$set(this.titles.daren, "more", false);
  469 + this.$set(this.titles.food, "more", false);
  470 +
455 471 // 判断搜索类型
456 472 switch (this.displayPage.value) {
457 473 case this.displayPage.status.GOODS: // 商品搜素
... ... @@ -467,7 +483,6 @@
467 483 this.$set(this.goodsLists, "list", [...this.goodsLists.list, ...datas.goods]);
468 484 } else { // 初始化数据
469 485 this.$set(this.goodsLists, "list", datas.goods);
470   - this.$set(this.titles.goods, "more", false);
471 486 }
472 487  
473 488 // 设置还有需要加载的内容
... ... @@ -491,7 +506,6 @@
491 506 this.$set(this.darenLists, "list", [...this.darenLists.list, ...datas.shop]);
492 507 } else {
493 508 this.$set(this.darenLists, "list", datas.shop);
494   - this.$set(this.titles.daren, "more", false);
495 509 }
496 510  
497 511 // 设置还有需要加载的内容
... ... @@ -515,10 +529,9 @@
515 529 this.$set(this.foodLists, "list", [...this.foodLists.list, ...datas.foodsShop]);
516 530 } else {
517 531 this.$set(this.foodLists, "list", datas.foodsShop);
518   - this.$set(this.titles.food, "more", false);
519 532 this.$set(this.foodLists, "coordinate", ext.coordinate);
520 533 }
521   -
  534 +
522 535 // 设置还有需要加载的内容
523 536 this.$set(this.paging, "loading", false);
524 537 } else {
... ... @@ -886,11 +899,11 @@
886 899 mounted() {
887 900  
888 901 // 获取用户定位坐标
889   - if (typeof this.$parent.helper === "object" && typeof this.$parent.helper.getLocation === "function") {
  902 + // if (typeof this.$parent.helper === "object" && typeof this.$parent.helper.getLocation === "function") {
890 903  
891   - // 获取用户定位坐标
892   - this.$parent.helper.getLocation(this.positionCallback, this.positionErrorCallback, this.initPage);
893   - }
  904 + // // 获取用户定位坐标
  905 + // this.$parent.helper.getLocation(this.positionCallback, this.positionErrorCallback, this.initPage);
  906 + // }
894 907 }
895 908 }
896 909 </script>
... ...