merchants.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div>
  3. <van-tabs
  4. class="merchants"
  5. :active="active"
  6. @change="onChange"
  7. title-active-color="#1D18BC"
  8. >
  9. <van-tab title="房源查询" class="housemange">
  10. <house-manger ref="houseManger" />
  11. </van-tab>
  12. <van-tab title="我的招商">
  13. <my-mechants ref="mymechants" />
  14. </van-tab>
  15. </van-tabs>
  16. </div>
  17. </template>
  18. <script>
  19. import houseManger from "./components/housemanger.vue";
  20. import myMechants from "./components/mymechants.vue";
  21. import { findYuanQuList } from "@/js_sdk/http.js";
  22. const form = {
  23. status: [],
  24. chaoxiang: [],
  25. };
  26. export default {
  27. components: {
  28. houseManger,
  29. myMechants,
  30. },
  31. data() {
  32. return {
  33. active: 0,
  34. };
  35. },
  36. onShow() {
  37. this.$refs.mymechants.firstfindCompanyInfoList();
  38. },
  39. methods: {
  40. onLoadMore() {},
  41. getChaoxiang() {},
  42. getStatus() {},
  43. onChange(e) {
  44. this.active = e.detail.name;
  45. this.$refs.mymechants.resize();
  46. },
  47. },
  48. onPullDownRefresh: function () {
  49. // 加载数据
  50. },
  51. onReachBottom() {
  52. console.log(this.active);
  53. if (this.active == 0) {
  54. this.$refs.houseManger.getMoreList();
  55. }
  56. if (this.active == 1) {
  57. console.log(this.$refs.mymechants);
  58. this.$refs.mymechants.getMoreList();
  59. }
  60. console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
  61. }, //下拉执行的时候触发 (下拉刷新)
  62. };
  63. </script>