promotion.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <view class="content">
  3. <view class="content-money">
  4. <image src="../../static/img/promation.png" mode="" class="bg"></image>
  5. <view class="money-box">
  6. <view class="money">
  7. {{ all }}
  8. <text>人</text>
  9. </view>
  10. <view class="text">我的推广人数</view>
  11. </view>
  12. </view>
  13. <view class="swiper-box" :style="{ height: height }">
  14. <scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData" :style="{ height: height }">
  15. <!-- 空白页 -->
  16. <empty v-if="loaded === true && list.length === 0"></empty>
  17. <!-- 订单列表 -->
  18. <view class="order-item flex" v-for="(item, index) in list" :key="index">
  19. <view class="title-box flex_item">
  20. <view class="title-avatar"><image :src="item.avatar"></image></view>
  21. <view class="list_tpl">
  22. <view class="title">
  23. <text>{{ item.email || item.phone }}</text>
  24. </view>
  25. <view class="time">
  26. <text>{{ item.time }}</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <uni-load-more :status="loadingType"></uni-load-more>
  32. </scroll-view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import { spreadCommission, userBalance } from '@/api/wallet.js';
  38. import { mapState, mapMutations } from 'vuex';
  39. import { getMoneyStyle } from '@/utils/rocessor.js';
  40. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  41. import empty from '@/components/empty';
  42. export default {
  43. components: {
  44. empty,
  45. uniLoadMore
  46. },
  47. onReady(res) {
  48. var obj = this;
  49. uni.getSystemInfo({
  50. success: resu => {
  51. const query = uni.createSelectorQuery();
  52. query.select('.swiper-box').boundingClientRect();
  53. query.exec(function(res) {
  54. console.log(res, 'ddddddddddddd');
  55. obj.height = resu.windowHeight - res[0].top + 'px';
  56. console.log('打印页面的剩余高度', obj.height);
  57. });
  58. },
  59. fail: res => {}
  60. });
  61. },
  62. data() {
  63. return {
  64. // 头部图高度
  65. height: '',
  66. tabCurrentIndex: 0,
  67. all: '100',
  68. list: '',
  69. loadingType: 'more'
  70. };
  71. },
  72. onLoad(options) {},
  73. onShow() {
  74. // this.loadData();
  75. },
  76. methods: {
  77. navto(e) {
  78. uni.navigateTo({
  79. url: e
  80. });
  81. }
  82. }
  83. };
  84. </script>
  85. <style lang="scss">
  86. page {
  87. background: #000;
  88. height: 100%;
  89. }
  90. .content-money {
  91. padding-bottom: 30rpx;
  92. background: $page-color-base;
  93. position: relative;
  94. .bg {
  95. position: absolute;
  96. width: 100%;
  97. }
  98. .moneyTx {
  99. position: absolute;
  100. top: 150rpx;
  101. right: 0rpx;
  102. width: 150rpx;
  103. padding: 10rpx 30rpx;
  104. border: 2px solid #ffffff;
  105. border-top-left-radius: 99rpx;
  106. border-bottom-left-radius: 99rpx;
  107. color: #ffffff;
  108. line-height: 1;
  109. font-size: $font-base;
  110. }
  111. .buttom-box {
  112. background-color: #ffffff;
  113. text-align: center;
  114. margin: 0 30rpx;
  115. padding: 20rpx 0;
  116. border-radius: $border-radius-sm;
  117. margin-top: -60rpx;
  118. .buttom {
  119. font-size: $font-lg;
  120. flex-grow: 1;
  121. }
  122. .interval {
  123. width: 2px;
  124. height: 60rpx;
  125. background-color: #eeeeee;
  126. }
  127. .icon {
  128. height: 50rpx;
  129. width: 48rpx;
  130. margin: 0 auto;
  131. .icon-img {
  132. width: 100%;
  133. height: 100%;
  134. }
  135. }
  136. }
  137. }
  138. .money-box {
  139. // background-color: $base-color;
  140. padding-top: var(--status-bar-height);
  141. height: 368rpx;
  142. color: #fad6b0;
  143. text-align: center;
  144. position: relative;
  145. .text {
  146. font-size: $font-sm;
  147. }
  148. .money {
  149. padding-top: 147rpx;
  150. font-size: 47px;
  151. font-family: PingFang SC;
  152. font-weight: bold;
  153. text {
  154. font-size: 24px;
  155. }
  156. }
  157. }
  158. .navbar {
  159. width: 702rpx;
  160. height: auto;
  161. padding: 20rpx 0;
  162. background: linear-gradient(90deg, #393326, #27221d);
  163. border: 2rpx solid #f5d2ad;
  164. border-radius: 10rpx;
  165. position: relative;
  166. z-index: 10;
  167. margin: 0 auto;
  168. .xian {
  169. width: 2rpx;
  170. height: 54rpx;
  171. background: #eeeeee;
  172. }
  173. .nav-item {
  174. display: flex;
  175. flex-direction: column;
  176. justify-content: center;
  177. align-items: center;
  178. height: 100%;
  179. font-size: 15px;
  180. color: #fff;
  181. position: relative;
  182. width: 50%;
  183. .num {
  184. font-size: 32rpx;
  185. font-family: PingFang SC;
  186. font-weight: bold;
  187. color: #fad6b0;
  188. }
  189. .font {
  190. font-size: 28rpx;
  191. font-family: PingFang SC;
  192. font-weight: 500;
  193. color: #ffffff;
  194. }
  195. }
  196. }
  197. //列表
  198. .swiper-box {
  199. // background-color: red;
  200. padding-top: 10rpx;
  201. .order-item {
  202. padding: 20rpx 30rpx;
  203. line-height: 1.5;
  204. .title-box {
  205. width: 100%;
  206. .title-avatar {
  207. width: 100rpx;
  208. height: 100rpx;
  209. margin-right: 25rpx;
  210. border-radius: 100%;
  211. image {
  212. width: 100%;
  213. height: 100%;
  214. border-radius: 100%;
  215. }
  216. }
  217. .list_tpl {
  218. width: 85%;
  219. .title {
  220. font-size: $font-lg;
  221. color: $font-color-base;
  222. overflow: hidden; //超出的文本隐藏
  223. text-overflow: ellipsis; //溢出用省略号显示
  224. white-space: nowrap;
  225. }
  226. .time {
  227. font-size: $font-base;
  228. color: $font-color-light;
  229. }
  230. }
  231. }
  232. .money {
  233. color: #db1935;
  234. font-size: $font-lg;
  235. }
  236. }
  237. }
  238. .content {
  239. height: 100%;
  240. .empty-content {
  241. background-color: #000;
  242. }
  243. }
  244. </style>