index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <!-- #ifdef H5 -->
  2. <template >
  3. <view class="wallet_missed" :style="colorStyle">
  4. <view class="tota_income">
  5. <text class="t-t"> {{ moneyObj.lossTotalAmount }}</text>
  6. <text class="t-b"> 已错失总金额</text>
  7. </view>
  8. <view class="tota_history">
  9. <view class="h-item" v-for="(src, i) in historyList" :key="src.id">
  10. <view class="h-l">
  11. <text>{{ src.dateTime }}</text>
  12. </view>
  13. <view class="h-r">
  14. <text class="imp">{{ src.count }}元</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="op-area">
  19. <button type="warn" @click="goToAccelerate" class="bnt">去加速</button>
  20. </view>
  21. </view>
  22. </template>
  23. <script> import {
  24. exclusivePage,
  25. todayStatistics
  26. } from '@/api/home.js';
  27. export default {
  28. components: {
  29. },
  30. data () {
  31. return {
  32. historyList: [],
  33. moneyObj: {
  34. lossTotalAmount: "0",
  35. receiveItemAmount: "0",
  36. receiveItemCount: 0,
  37. redEnvelopeItemCount: 0,
  38. remainItemCount: 0,
  39. totalReceivedRedEnvelopeAmount: "0",
  40. totalRedEnvelopeAmount: "0",
  41. totalRemainItemAmount: "0"
  42. },
  43. };
  44. },
  45. onPullDownRefresh () {
  46. this.exclusivePage()
  47. this.todayStatistics()
  48. },
  49. onLoad (options) {
  50. },
  51. created () {
  52. this.exclusivePage()
  53. this.todayStatistics()
  54. },
  55. methods: {
  56. goToAccelerate(){
  57. uni.navigateTo({
  58. url: '/pages/order_addcart/wallet_accelerate/index'
  59. })
  60. },
  61. todayStatistics () {
  62. todayStatistics().then(res => {
  63. this.moneyObj = res.data
  64. })
  65. },
  66. exclusivePage () {
  67. let that = this
  68. exclusivePage().then(res => {
  69. if (res.data.length > 0) {
  70. that.$set(that, "historyList", res.data)
  71. } else {
  72. that.$set(that, "historyList", [])
  73. }
  74. uni.stopPullDownRefresh();
  75. })
  76. },
  77. }
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. .wallet_missed {
  82. .tota_income {
  83. height: 250rpx;
  84. background: white;
  85. border-bottom: 3px solid rgb(250, 250, 250);
  86. box-sizing: border-box;
  87. padding-top: 20px;
  88. padding-bottom: 20px;
  89. .t-t {
  90. display: block;
  91. text-align: center;
  92. width: 100%;
  93. font-size: 30px;
  94. color: #ec912d;
  95. }
  96. .t-b {
  97. display: block;
  98. text-align: center;
  99. font-size: 15px;
  100. font-family: PingFangSC-Regular, PingFang SC;
  101. font-weight: 400;
  102. color: #ec912d;
  103. }
  104. }
  105. .tota_history {
  106. overflow: auto;
  107. height: 740rpx;
  108. .h-item {
  109. display: flex;
  110. padding: 10px;
  111. height: 100rpx;
  112. background: white;
  113. border-bottom: 3px solid rgb(250, 250, 250);
  114. .h-l {
  115. display: flex;
  116. flex-direction: column;
  117. text-align: left;
  118. flex: 1;
  119. line-height: 50rpx;
  120. &:nth-child(0) {
  121. font-size: 15px;
  122. font-family: PingFangSC-Medium, PingFang SC;
  123. font-weight: 500;
  124. color: #333333;
  125. }
  126. }
  127. .h-r {
  128. display: flex;
  129. text-align: right;
  130. flex: 1;
  131. font-size: 12px;
  132. font-family: PingFangSC-Regular, PingFang SC;
  133. font-weight: 400;
  134. color: #666666;
  135. line-height: 50rpx;
  136. justify-content: flex-end;
  137. padding-right: 30px;
  138. .imp {
  139. font-family: DINAlternate-Bold, DINAlternate;
  140. color: #eb4c63;
  141. }
  142. }
  143. }
  144. }
  145. .op-area {
  146. .bnt {
  147. background: rgb(235, 75, 99);
  148. font-size: 32rpx;
  149. color: #fff;
  150. width: 690rpx;
  151. height: 90rpx;
  152. text-align: center;
  153. border-radius: 50rpx;
  154. line-height: 90rpx;
  155. margin: 64rpx auto;
  156. }
  157. }
  158. }
  159. </style>
  160. <!-- #endif -->