index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="memberManage">
  3. <view class="membere-title">会员列表</view>
  4. <view class="membere-list">
  5. <view
  6. class="member-item"
  7. v-for="(item, index) in accountList"
  8. :key="index"
  9. >
  10. <view class="item-top">
  11. <view class="img-box">
  12. <image
  13. :src="item.headImage"
  14. mode="aspectFit|aspectFill|widthFix"
  15. lazy-load="true"
  16. />
  17. </view>
  18. <view class="text-box">
  19. <view class="name">
  20. <view>{{ item.nickName }}</view>
  21. <template v-if="item.level == '团长'">
  22. <view class="tuan">{{ item.level }}</view>
  23. </template>
  24. <template v-else-if="item.level == '合伙人'">
  25. <view class="hehuo">{{ item.level }}</view>
  26. </template>
  27. <template v-else>
  28. <view>{{ item.level }}</view>
  29. </template>
  30. </view>
  31. <view class="phone">{{ item.phone }}</view>
  32. </view>
  33. </view>
  34. <view class="item-bottom">
  35. <view class="bottom-contact">
  36. <image
  37. src="@/static/image/user/business_user.png"
  38. mode="aspectFit|aspectFill|widthFix"
  39. lazy-load="true"
  40. />
  41. <text>查看邀请人</text>
  42. </view>
  43. <view class="bottom-contact">
  44. <image
  45. src="@/static/image/user/business_phone.png"
  46. mode="aspectFit|aspectFill|widthFix"
  47. lazy-load="true"
  48. />
  49. <text>电话联系</text>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import { getBuyerList } from "@/config/index";
  58. export default {
  59. created() {
  60. // this.accountInfo = uni.getStorageSync("storage_info");
  61. // this.queryData.phone = this.accountInfo.phone
  62. this.getList();
  63. },
  64. data() {
  65. return {
  66. accountInfo: {},
  67. queryData: {
  68. page: "1",
  69. pageSize: "10",
  70. phone: "",
  71. },
  72. accountList: [],
  73. total: 0,
  74. };
  75. },
  76. methods: {
  77. // 获取会员列表
  78. async getList() {
  79. this.$loading.show("获取中...");
  80. try {
  81. let { data, total } = await getBuyerList(this.queryData);
  82. this.accountList = [...this.accountList, ...data.list];
  83. this.total = total;
  84. } finally {
  85. this.$loading.hide();
  86. }
  87. },
  88. },
  89. // 触底加载
  90. onReachBottom() {
  91. if (this.accountList.length >= this.total) return;
  92. this.queryData.page++;
  93. this.getList();
  94. },
  95. };
  96. </script>
  97. <style lang="scss" scoped>
  98. @import "./index.scss";
  99. </style>