index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="distribution-module-container">
  3. <JHeader title="分销中心" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  4. <view v-if="storeDataList.length > 0" class="inStoreBackImg flex-items-plus">
  5. <label>选择进入的店铺</label>
  6. </view>
  7. <view>
  8. <view v-if="storeDataList && storeDataList.length" class="listBox">
  9. <view
  10. v-for="(item, index) in storeDataList" :key="index" class="flex-items-plus flex-column"
  11. @click="go(`/another-tf/another-serve/distributionModule/salesIndex?distributeInfo=${JSON.stringify(item)}`)"
  12. >
  13. <view class="store-box flex-items-plus flex-sp-between mar-top-30 bor-line-E5E5E5 pad-bot-30">
  14. <view class="flex-items-plus">
  15. <image class="storeLogoImg" :src="common.seamingImgUrl(item.shopLogo)"></image>
  16. <view class="font-color-656 fs24 mar-left-20">
  17. <label class="fs30 font-color-333">{{ item.shopName }}</label>
  18. <view class="flex-row-plus mar-top-20">
  19. <label>等级:{{ item.levelName }} </label>
  20. </view>
  21. <view class="mar-top-10">关系:<label>{{ item.state == 1 ? '有效' : '被清退' }}</label></view>
  22. </view>
  23. </view>
  24. <view class="income">
  25. <view class="font-color-333 fs30">总收益</view>
  26. <view class="font-color-C5AA7B fs30">{{ item.price }}元</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view style="padding-bottom: 45upx;">
  33. <LoadingMore
  34. :status="!isEmpty && !storeDataList.length
  35. ? 'loading' : !isEmpty && storeDataList.length && (storeDataList.length >= storeDataTotal) ? 'no-more' : ''"
  36. >
  37. </LoadingMore>
  38. <tui-no-data v-if="isEmpty" :fixed="false" style="margin-top: 60upx;">这里空空如也~</tui-no-data>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import { getDistributorAllShopApi } from '../../../api/anotherTFInterface'
  44. export default {
  45. name: 'DistributionModule',
  46. data() {
  47. return {
  48. isEmpty: false,
  49. storeDataList: [],
  50. storeDataTotal: 0,
  51. queryInfo: {
  52. page: 1,
  53. pageSize: 20
  54. }
  55. }
  56. },
  57. onLoad() {
  58. this.getStoreList()
  59. },
  60. methods: {
  61. getStoreList(isLoadmore) {
  62. uni.showLoading()
  63. getDistributorAllShopApi(this.queryInfo).then((res) => {
  64. this.storeDataTotal = res.data.total
  65. if (isLoadmore) {
  66. this.storeDataList.push(...res.data.list)
  67. } else {
  68. this.storeDataList = res.data.list
  69. }
  70. this.isEmpty = this.storeDataList.length === 0
  71. uni.hideLoading()
  72. })
  73. .catch((e) => {
  74. uni.hideLoading()
  75. })
  76. }
  77. },
  78. onReachBottom() {
  79. if (this.storeDataList.length < this.storeDataTotal) {
  80. ++this.queryInfo.page
  81. this.getStoreList(true)
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="less" scoped>
  87. .distribution-module-container {
  88. min-height: 100vh;
  89. box-sizing: border-box;
  90. background-color: #F8F8F8;
  91. .inStoreBackImg {
  92. width: 100%;
  93. height: 100upx;
  94. background: #333333;
  95. color: #FFFFFF;
  96. }
  97. .store-box {
  98. width: 690upx;
  99. background: #FFFFFF;
  100. padding: 22rpx;
  101. .storeLogoImg {
  102. width: 140upx;
  103. height: 140upx;
  104. }
  105. .income {
  106. width: 200rpx;
  107. text-align: center;
  108. border-left: 2rpx solid #F3F4F5;
  109. }
  110. }
  111. }
  112. </style>