funManage.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="content">
  3. <view class="order-item">
  4. <view class="head dffd">
  5. <view class="top dfsb">
  6. <text class="white fontmid">账户余额(元)</text>
  7. <navigator url="/pages/user/funManage/fundCash" class="btn">提现</navigator>
  8. </view>
  9. <view class="mon">{{ topInfo.money }}</view>
  10. <view class="bot dfsb">
  11. <view class="monBox flex1 dffd">
  12. <text class="fontmid white">推荐奖励(元)</text>
  13. <text class="fontmid white">{{ topInfo.recom_money || 0.0 }}</text>
  14. </view>
  15. <view class="monBox flex1 dffd">
  16. <text class="fontmid white">邀请总人数(人)</text>
  17. <text class="fontmid white">{{ topInfo.pepo_num || 0.0 }}</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="pageCon">
  22. <view class="pgConTitle">收支明细</view>
  23. <view class="listBox">
  24. <view v-for="(item, ind) in list" :key="ind" class="pgConBox bb">
  25. <view class="pgConTop dfsb">
  26. <text class="elli">{{ item.content }}</text>
  27. <text :class="[item.check == 1 ? 'red' : 'green', 'mon']">{{ item.money }}</text>
  28. </view>
  29. <view class="pgConBot dfsb">
  30. <text>{{ item.create_time }}</text>
  31. <text class="">余额: {{ item.after_money }}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="nodata" v-if="list.length < 1"><u-empty icon-size="200" text="还没有记录哦" mode="list"></u-empty></view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. topInfo: {},
  45. list: [],
  46. status: 'more',
  47. page: 1,
  48. pagenum: 10
  49. };
  50. },
  51. async onLoad(options) {
  52. await this.loadData();
  53. await this.getMon();
  54. },
  55. onReachBottom() {
  56. if (this.status == 'nomore') return;
  57. this.page = ++this.page;
  58. this.loadData();
  59. },
  60. methods: {
  61. getMon() {
  62. this.$api.request('user/getTj').then(data => {
  63. if (data.code == 200) {
  64. this.topInfo = data.data;
  65. } else {
  66. this.$api.toast(data.msg);
  67. }
  68. });
  69. },
  70. //获取订单列表
  71. loadData() {
  72. // flag Number 类型: 1=余额 2=学豆
  73. this.$api
  74. .request('user/getMoneyLog', {
  75. flag: 1,
  76. page: this.page,
  77. limit: this.pagenum
  78. })
  79. .then(data => {
  80. if (data.code == 200) {
  81. this.list = this.list.concat(data.data.list);
  82. this.status = 'more';
  83. if (data.data.list.length < this.limit) {
  84. this.status = 'nomore';
  85. }
  86. } else {
  87. this.$api.toast(data.msg);
  88. }
  89. })
  90. .catch(function(error) {
  91. console.log(error);
  92. });
  93. },
  94. //提现
  95. tocash(url) {
  96. uni.navigateTo({
  97. url: url
  98. });
  99. }
  100. }
  101. };
  102. </script>
  103. <style lang="scss">
  104. .content {
  105. background: #fff;
  106. min-height: 100vh;
  107. padding: 20rpx 30rpx;
  108. }
  109. .order-item {
  110. background: #fff;
  111. margin: 0rpx 6rpx;
  112. .head {
  113. background: linear-gradient(120deg, #fba54a 0%, #fbc948 100%);
  114. border-radius: 23rpx 23rpx 0rpx 0rpx;
  115. height: 296rpx;
  116. padding: 33rpx 30rpx;
  117. .top {
  118. width: 100%;
  119. }
  120. .mon {
  121. font-size: 62rpx;
  122. font-family: PingFangSC-Semibold, PingFang SC;
  123. font-weight: 600;
  124. color: #ffffff;
  125. line-height: 87rpx;
  126. }
  127. .bot {
  128. width: 100%;
  129. margin-top: 20rpx;
  130. }
  131. .btn {
  132. width: 105rpx;
  133. height: 46rpx;
  134. line-height: 46rpx;
  135. text-align: center;
  136. border-radius: 42rpx;
  137. color: #ed742e;
  138. background-color: rgba(255, 255, 255, 1);
  139. font-size: 24rpx;
  140. color: $prosecond;
  141. margin: 0 10rpx;
  142. }
  143. .fundMon {
  144. justify-content: center;
  145. }
  146. }
  147. .pageCon {
  148. margin-top: 45rpx;
  149. .pgConTitle {
  150. font-size: 36rpx;
  151. line-height: 44rpx;
  152. font-family: PingFangSC-Medium, PingFang SC;
  153. font-weight: 500;
  154. color: #333333;
  155. }
  156. .listBox {
  157. .pgConBox {
  158. padding: 30rpx 0;
  159. .pgConTop {
  160. align-items: flex-start;
  161. .elli {
  162. margin-right: 5rpx;
  163. flex: 1;
  164. }
  165. text {
  166. font-size: 30rpx;
  167. }
  168. .mon {
  169. font-size: 36rpx;
  170. font-family: DIN-Medium, DIN;
  171. font-weight: 500;
  172. }
  173. }
  174. .pgConBot {
  175. margin-top: 20rpx;
  176. text {
  177. color: $textgrey;
  178. font-size: 26rpx;
  179. line-height: 36rpx;
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. </style>