income.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view>
  3. <view class="index">
  4. <image class="index-bg" src="@/static/img/wallet/bg.png" mode="scaleToFill"></image>
  5. <view class="head-money">
  6. <view class="sys-color-794B06 sys-size-28">我的波点(个)</view>
  7. <view class="head-mongy-1">
  8. <view class="sys-size-52 sys-color-362100 sys-weight-600">{{currentIcoco}}</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="t-box sys-background-FFDFC3">
  13. <view class="sys-background-gray-f"></view>
  14. </view>
  15. <view class="box-sizing-border box-card">
  16. <view class="card-echrecs box-sizing-border">
  17. <view class="sys-size-32 sys-color-gray-3 sys-weight-600">每日波点</view>
  18. <view class="card-echrecs-box">
  19. <ColumnEcharts ref="columnEcharts"></ColumnEcharts>
  20. </view>
  21. </view>
  22. <image class="crad-f" src="@/static/img/wallet/ad-1.png" mode="scaleToFill" @click="selectFun(1)"></image>
  23. <view class="card-b">
  24. <view class="sys-background-FE6915 sys-radius-16 sys-size-32 sys-color-white sys-weight-600"
  25. @click="selectFun(2)">兑换JM币</view>
  26. <view class="sys-radius-16 tx-view sys-size-32 sys-color-FE6915 sys-weight-600" @click="selectFun(3)">提现
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import ColumnEcharts from './column-echarts.vue';
  34. import {
  35. getDailyEarnings
  36. } from "@/api/my";
  37. import tools from "@/service/tools";
  38. export default {
  39. components: {
  40. ColumnEcharts
  41. },
  42. data() {
  43. return {
  44. date: '',
  45. currentIcoco:0,
  46. }
  47. },
  48. mounted() {
  49. this.date = tools.getDateYM();
  50. this.getDailyEarnings()
  51. },
  52. methods: {
  53. getDailyEarnings() {
  54. if (this.isAjax) {
  55. return
  56. }
  57. this.isAjax = true
  58. let that = this
  59. getDailyEarnings({
  60. 'pageNo': this.page,
  61. 'pageSize': 30,
  62. 'month': this.date
  63. }).then((res) => {
  64. this.isAjax = false
  65. if (res.code === 0) {
  66. that.currentIcoco = res.data.currentIcoco
  67. let categories = []
  68. let data = []
  69. res.data.datas.data.forEach((item)=>{
  70. categories.push(item.date)
  71. data.push(item.icoco)
  72. })
  73. let info = {
  74. categories: categories,
  75. series: [
  76. {
  77. name: "收益",
  78. data: data
  79. },
  80. ]
  81. };
  82. this.$refs.columnEcharts.chartData = JSON.parse(JSON.stringify(info));
  83. }
  84. })
  85. },
  86. selectFun(type) {
  87. if (type === 1) {
  88. uni.navigateTo({
  89. url: '/pages/wallet/wave-point'
  90. })
  91. } else if (type === 2) {
  92. // 兑换JM币
  93. } else if (type === 3) {
  94. // 提现
  95. }
  96. },
  97. },
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. .index {
  102. width: 100%;
  103. height: 436rpx;
  104. position: relative;
  105. .index-bg {
  106. width: 100%;
  107. height: 436rpx;
  108. }
  109. .head-money {
  110. position: absolute;
  111. left: 54rpx;
  112. bottom: 76rpx;
  113. .head-mongy-1 {
  114. display: flex;
  115. align-items: center;
  116. margin-top: 26rpx;
  117. image {
  118. width: 40rpx;
  119. height: 40rpx;
  120. border-radius: 50%;
  121. margin-right: 12rpx;
  122. }
  123. }
  124. }
  125. }
  126. .t-box {
  127. height: 30rpx;
  128. view {
  129. height: 30rpx;
  130. border-radius: 30rpx 30rpx 0rpx 0rpx;
  131. }
  132. }
  133. .box-card {
  134. min-height: 100rpx;
  135. padding: 0 32rpx 10rpx 32rpx;
  136. .card-echrecs {
  137. width: 100%;
  138. height: 516rpx;
  139. border-radius: 20rpx;
  140. box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
  141. margin-bottom: 30rpx;
  142. padding: 32rpx 36rpx;
  143. .card-echrecs-box {
  144. width: 100%;
  145. height: 400rpx;
  146. margin-top: 20rpx;
  147. }
  148. }
  149. .crad-f {
  150. width: 100%;
  151. height: 160rpx;
  152. border-radius: 20rpx;
  153. box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
  154. }
  155. .card-b {
  156. margin-top: 20rpx;
  157. display: flex;
  158. justify-content: space-between;
  159. view {
  160. width: 332rpx;
  161. height: 88rpx;
  162. line-height: 88rpx;
  163. text-align: center;
  164. }
  165. .tx-view {
  166. box-sizing: border-box;
  167. border: 2rpx solid #FE6915;
  168. }
  169. }
  170. }
  171. </style>