userTuiOrderList.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="promoter-list" >
  3. <view class="header">
  4. <view class="promoterHeader">
  5. <image class="bg" src="/static/images/transparent.png" />
  6. <view class="headerCon acea-row row-between-wrapper">
  7. <view>
  8. <view class="name">推广人订单</view>
  9. <view>
  10. <text class="num">{{total}}</text>
  11. <text>单</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="list">
  18. <view>
  19. <view class="item acea-row row-between-wrapper" v-for="(item, index) in list"
  20. :key="index">
  21. <view class="picTxt acea-row row-between-wrapper">
  22. <view class="pictrue">
  23. <image :src="item.avatar==null?'../../static/image/my_img.png':item.avatar" />
  24. </view>
  25. <view class="text">
  26. <view class="name line1">{{item.nickname}}</view>
  27. <view>下单时间:{{item.createTime}}</view>
  28. </view>
  29. </view>
  30. <view class="right">
  31. <view>实付金额:¥{{item.payPrice}}</view>
  32. <view v-if="item.billType==1">返佣金:+¥{{item.tuiPrice}}</view>
  33. <view v-if="item.billType==0">退佣金:-¥{{item.tuiPrice}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <Loading :loaded="loaded" :loading="loading"></Loading>
  39. </view>
  40. </template>
  41. <script>
  42. import {getMyTuiOrderList} from '@/api/user'
  43. import Loading from "@/components/Loading";
  44. export default {
  45. name: "tuiList",
  46. components: {
  47. Loading
  48. },
  49. props: {},
  50. data: function () {
  51. return {
  52. total:0,
  53. page: {
  54. page: 1,
  55. pageSize: 10
  56. },
  57. list: [],
  58. loaded: false,
  59. loading: false
  60. };
  61. },
  62. mounted: function () {
  63. this.getMyTuiOrderList();
  64. },
  65. onReachBottom() {
  66. !this.loading && this.getMyTuiOrderList();
  67. },
  68. methods: {
  69. getMyTuiOrderList: function () {
  70. let that = this;
  71. if (that.loaded || that.loading) return;
  72. that.loading = true;
  73. getMyTuiOrderList(this.page).then(
  74. res => {
  75. that.list.push.apply(that.list, res.data.list);
  76. that.loading = false;
  77. that.loaded = !res.data.hasNextPage;
  78. this.total=res.data.total;
  79. uni.hideLoading()
  80. },
  81. err => {
  82. uni.showToast({
  83. title: err.msg,
  84. icon: "none",
  85. duration: 2000
  86. });
  87. },
  88. 300
  89. );
  90. },
  91. }
  92. };
  93. </script>
  94. <style lang="less">
  95. /*所有推广头部样式*/
  96. .promoterHeader {
  97. width: 100%;
  98. height: 2.2 * 100rpx;
  99. background-color: #018C39;
  100. position: relative;
  101. .bg{
  102. width: 100%;
  103. height: 100%;
  104. position: absolute;
  105. top: 0;
  106. left: 0;
  107. }
  108. }
  109. .promoterHeader .headerCon {
  110. height: 100%;
  111. padding: 0 0.88 * 100rpx 0 0.55 * 100rpx;
  112. font-size: 0.28 * 100rpx;
  113. color: #fff;
  114. }
  115. .promoterHeader .headerCon .name {
  116. margin-bottom: 0.02 * 100rpx;
  117. }
  118. .promoterHeader .headerCon .num {
  119. font-size: 0.5 * 100rpx;
  120. }
  121. .promoterHeader .headerCon .iconfont {
  122. font-size: 1.25 * 100rpx;
  123. }
  124. /*推广人列表*/
  125. .promoter-list .header {
  126. padding-bottom: 0.12 * 100rpx;
  127. }
  128. .promoter-list .nav {
  129. background-color: #fff;
  130. height: 0.86 * 100rpx;
  131. line-height: 0.86 * 100rpx;
  132. font-size: 0.28 * 100rpx;
  133. color: #282828;
  134. border-bottom: 1px solid #eee;
  135. }
  136. .promoter-list .nav .item {
  137. height: 100%;
  138. }
  139. .promoter-list .nav .item.on {
  140. color: #eb3729;
  141. border-bottom: 0.05 * 100rpx solid #eb3729;
  142. }
  143. .promoter-list .search {
  144. margin-top: 0.12 * 100rpx;
  145. box-sizing: border-box;
  146. width: 100%;
  147. background-color: #fff;
  148. height: 0.86 * 100rpx;
  149. padding: 0 0.3 * 100rpx;
  150. }
  151. .promoter-list .search .input {
  152. width: 6.3 * 100rpx;
  153. height: 0.6 * 100rpx;
  154. border-radius: 0.5 * 100rpx;
  155. background-color: #f5f5f5;
  156. text-align: center;
  157. position: relative;
  158. }
  159. .promoter-list .search .input input {
  160. height: 100%;
  161. font-size: 0.26 * 100rpx;
  162. width: 6.2 * 100rpx;
  163. text-align: left;
  164. }
  165. .promoter-list .search .input input::placeholder {
  166. color: #bbb;
  167. }
  168. .promoter-list .search .input .iconfont {
  169. position: absolute;
  170. right: 0.28 * 100rpx;
  171. color: #999;
  172. font-size: 0.28 * 100rpx;
  173. top: 50%;
  174. transform: translateY(-50%);
  175. }
  176. .promoter-list .search .iconfont {
  177. font-size: 0.4 * 100rpx;
  178. color: #515151;
  179. }
  180. .promoter-list .list .sortNav {
  181. background-color: #fff;
  182. height: 0.76 * 100rpx;
  183. border-bottom: 1px solid #eee;
  184. color: #333;
  185. font-size: 0.28 * 100rpx;
  186. }
  187. .promoter-list .list .sortNav.on {
  188. position: fixed;
  189. top: 0;
  190. left: 0;
  191. width: 100%;
  192. z-index: 5;
  193. }
  194. .promoter-list .list .sortNav .sortItem {
  195. text-align: center;
  196. flex: 1;
  197. -o-flex: 1;
  198. -ms-flex: 1;
  199. }
  200. .promoter-list .list .sortNav .sortItem image {
  201. width: 0.24 * 100rpx;
  202. height: 0.24 * 100rpx;
  203. margin-left: 0.06 * 100rpx;
  204. vertical-align: -0.03 * 100rpx;
  205. }
  206. .promoter-list .list .sortList {
  207. margin-top: 0.76 * 100rpx;
  208. }
  209. .promoter-list .list .item {
  210. background-color: #fff;
  211. border-bottom: 1px solid #eee;
  212. height: 1.52 * 100rpx;
  213. padding: 0 0.3 * 100rpx 0 0.2 * 100rpx;
  214. font-size: 0.24 * 100rpx;
  215. color: #666;
  216. }
  217. .promoter-list .list .item .picTxt {
  218. width: 4.4 * 100rpx;
  219. }
  220. .promoter-list .list .item .picTxt .pictrue {
  221. width: 1.06 * 100rpx;
  222. height: 1.06 * 100rpx;
  223. border-radius: 50%;
  224. }
  225. .promoter-list .list .item .picTxt .pictrue image {
  226. width: 100%;
  227. height: 100%;
  228. border-radius: 50%;
  229. border: 0.03 * 100rpx solid #fff;
  230. box-shadow: 0 0 0.07 * 100rpx #aaa;
  231. -moz-box-shadow: 0 0 0.07 * 100rpx #aaa;
  232. -o-box-shadow: 0 0 0.07 * 100rpx #aaa;
  233. -moz-box-sizing: border-box;
  234. box-sizing: border-box;
  235. }
  236. .promoter-list .list .item .picTxt .text {
  237. width: 3.04 * 100rpx;
  238. font-size: 0.24 * 100rpx;
  239. color: #666;
  240. }
  241. .promoter-list .list .item .picTxt .text .name {
  242. font-size: 0.28 * 100rpx;
  243. color: #333;
  244. margin-bottom: 0.13 * 100rpx;
  245. }
  246. .promoter-list .list .item .right {
  247. width: 2.4 * 100rpx;
  248. text-align: right;
  249. font-size: 0.22 * 100rpx;
  250. color: #333;
  251. }
  252. </style>