Commit fd9a88a0cae799ef5dd6ad254ce14a59a177804f

Authored by 王强
1 parent 2e4a4690

搜索页面处理~

Showing 1 changed file with 22 additions and 9 deletions
src/pages/search/search.vue
1 <template> 1 <template>
2 <div class="search-box"> 2 <div class="search-box">
3 - 3 +
4 <!-- nav --> 4 <!-- nav -->
5 <div class="nav" :style="'padding-top: ' + ($parent.top.value) + 'px'"> 5 <div class="nav" :style="'padding-top: ' + ($parent.top.value) + 'px'">
6 6
@@ -420,6 +420,17 @@ @@ -420,6 +420,17 @@
420 // 加载中提示 420 // 加载中提示
421 Indicator.open("搜索中..."); 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 this.http("/Api/" + this.getApiVersion().index + "/foodsSearch", { 435 this.http("/Api/" + this.getApiVersion().index + "/foodsSearch", {
425 keyword: keyword, 436 keyword: keyword,
@@ -452,6 +463,11 @@ @@ -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 switch (this.displayPage.value) { 472 switch (this.displayPage.value) {
457 case this.displayPage.status.GOODS: // 商品搜素 473 case this.displayPage.status.GOODS: // 商品搜素
@@ -467,7 +483,6 @@ @@ -467,7 +483,6 @@
467 this.$set(this.goodsLists, "list", [...this.goodsLists.list, ...datas.goods]); 483 this.$set(this.goodsLists, "list", [...this.goodsLists.list, ...datas.goods]);
468 } else { // 初始化数据 484 } else { // 初始化数据
469 this.$set(this.goodsLists, "list", datas.goods); 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,7 +506,6 @@
491 this.$set(this.darenLists, "list", [...this.darenLists.list, ...datas.shop]); 506 this.$set(this.darenLists, "list", [...this.darenLists.list, ...datas.shop]);
492 } else { 507 } else {
493 this.$set(this.darenLists, "list", datas.shop); 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,10 +529,9 @@
515 this.$set(this.foodLists, "list", [...this.foodLists.list, ...datas.foodsShop]); 529 this.$set(this.foodLists, "list", [...this.foodLists.list, ...datas.foodsShop]);
516 } else { 530 } else {
517 this.$set(this.foodLists, "list", datas.foodsShop); 531 this.$set(this.foodLists, "list", datas.foodsShop);
518 - this.$set(this.titles.food, "more", false);  
519 this.$set(this.foodLists, "coordinate", ext.coordinate); 532 this.$set(this.foodLists, "coordinate", ext.coordinate);
520 } 533 }
521 - 534 +
522 // 设置还有需要加载的内容 535 // 设置还有需要加载的内容
523 this.$set(this.paging, "loading", false); 536 this.$set(this.paging, "loading", false);
524 } else { 537 } else {
@@ -886,11 +899,11 @@ @@ -886,11 +899,11 @@
886 mounted() { 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 </script> 909 </script>