PromoterOrder.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="promoter-order">
  3. <!-- 头部背景 -->
  4. <view class="promoterHeader bg-color-red">
  5. <view class="headerCon acea-row row-between-wrapper">
  6. <view>
  7. <view class="name">累计推广订单</view>
  8. <view class="money">
  9. <text class="num">{{ count || '0' }}</text>
  10. <text>单</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <!-- 内容区域 -->
  16. <view class="sign-record">
  17. <view class="list">
  18. <view class="item" v-for="(item, listIndex) in list" :key="listIndex">
  19. <view class="data">{{ item.time }}</view>
  20. <view class="desc">本月累计推广订单:{{ item.count ? item.count : 0 }}单</view>
  21. <view class="listn" v-for="(val, indexn) in item.child" :key="indexn">
  22. <view class="itemn acea-row row-between-wrapper">
  23. <view class="user-info">
  24. <view class="pictxt acea-row row-between-wrapper">
  25. <view class="pictrue">
  26. <image :src="val.avatar" />
  27. </view>
  28. <text class="text line1">{{ val.nickname }}</text>
  29. </view>
  30. <view class="order-info">
  31. <view>
  32. <text class="name">订单号:</text>
  33. {{ val.orderId }}
  34. </view>
  35. <view>
  36. <text class="name">下单时间:</text>
  37. {{ val.time }}
  38. </view>
  39. </view>
  40. </view>
  41. <view class="num font-color-red">¥{{ val.number ? val.number : 0 }}</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. name: "PromoterOrder",
  52. data: function() {
  53. return {
  54. list: [],
  55. where: {
  56. page: 1,
  57. limit: 15
  58. },
  59. loaded: false,
  60. loading: false,
  61. loadTitle: "",
  62. count: ""
  63. };
  64. },
  65. mounted: function() {
  66. this.getIndex();
  67. },
  68. onReachBottom() {
  69. !this.loading && this.getIndex();
  70. },
  71. methods: {
  72. getIndex: function() {
  73. let that = this;
  74. if (that.loaded == true || that.loading == true) return;
  75. that.loading = true;
  76. uni.showLoading({
  77. title: '加载中...'
  78. })
  79. this.$api.request('get', 'app/userBill/spread/order', that.where).then(
  80. res => {
  81. uni.hideLoading();
  82. that.loading = false;
  83. that.loaded = res.rows.length < that.where.limit;
  84. that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
  85. that.where.page = that.where.page + 1;
  86. that.list.push.apply(that.list, res.rows);
  87. that.count = res.total;
  88. },
  89. err => {
  90. uni.hideLoading();
  91. uni.showToast({
  92. title: err.msg || err.response.data.msg|| err.response.data.message,
  93. icon: "none",
  94. duration: 2000
  95. });
  96. },
  97. 300
  98. );
  99. }
  100. }
  101. };
  102. </script>
  103. <style lang="less">
  104. .promoter-order {
  105. .promoterHeader {
  106. background-image: url('https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/bg.png');
  107. background-repeat: no-repeat;
  108. background-size: 100% 80%;
  109. width: 100%;
  110. height: 300rpx;
  111. padding: 0 50rpx;
  112. box-sizing: border-box;
  113. color: #fff;
  114. .headerCon {
  115. padding: 50rpx 0;
  116. .name {
  117. font-size: 28rpx;
  118. opacity: 0.9;
  119. margin-bottom: 10rpx;
  120. }
  121. .money {
  122. font-size: 36rpx;
  123. font-weight: bold;
  124. line-height: 1.2;
  125. font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', sans-serif;
  126. text-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
  127. .num {
  128. font-size: 48rpx;
  129. font-family: 'GuildfordProBook 5';
  130. }
  131. }
  132. }
  133. }
  134. .sign-record {
  135. background-color: #fff;
  136. border-radius: 16rpx 16rpx 0 0;
  137. margin-top: -20rpx;
  138. padding: 0 30rpx;
  139. .item {
  140. padding: 30rpx 0;
  141. border-bottom: 1rpx solid #f5f5f5;
  142. .data {
  143. font-size: 28rpx;
  144. color: #333;
  145. margin-bottom: 10rpx;
  146. font-weight: bold;
  147. }
  148. .desc {
  149. font-size: 24rpx;
  150. color: #666;
  151. margin-bottom: 20rpx;
  152. }
  153. .itemn {
  154. padding: 20rpx 0;
  155. align-items: flex-start;
  156. .user-info {
  157. flex: 1;
  158. margin-right: 20rpx;
  159. .pictxt {
  160. margin-bottom: 15rpx;
  161. .pictrue {
  162. width: 60rpx;
  163. height: 60rpx;
  164. border-radius: 50%;
  165. overflow: hidden;
  166. margin-right: 15rpx;
  167. image {
  168. width: 100%;
  169. height: 100%;
  170. }
  171. }
  172. .text {
  173. flex: 1;
  174. font-size: 28rpx;
  175. color: #333;
  176. }
  177. }
  178. .order-info {
  179. font-size: 24rpx;
  180. color: #999;
  181. padding-left: 75rpx;
  182. .name {
  183. color: #666;
  184. }
  185. }
  186. }
  187. .num {
  188. font-size: 28rpx;
  189. font-weight: bold;
  190. }
  191. .font-color-red {
  192. color: #eb3729;
  193. }
  194. }
  195. }
  196. }
  197. }
  198. .acea-row {
  199. display: flex;
  200. flex-wrap: wrap;
  201. }
  202. .row-between-wrapper {
  203. justify-content: space-between;
  204. align-items: center;
  205. }
  206. .line1 {
  207. overflow: hidden;
  208. text-overflow: ellipsis;
  209. white-space: nowrap;
  210. }
  211. </style>