merchants.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. <housemanger 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. console.log(this.$refs.housemanger);
  55. this.$refs.housemanger.getMoreList();
  56. }
  57. if (this.active == 1) {
  58. console.log(this.$refs.mymechants);
  59. this.$refs.mymechants.getMoreList();
  60. }
  61. console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
  62. }, //下拉执行的时候触发 (下拉刷新)
  63. };
  64. </script>