cashlist.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view>
  3. <navbar v-model="screenHeight" :scroll="scrollNum" :iSimmersive="false" :placeholder="true" title="提现记录"></navbar>
  4. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :height="screenHeight+'px'">
  5. <view class="top">
  6. <text>总余额:¥{{amount}}</text>
  7. <text @click="$utils.navigateTo('bill/withdraw')">去提现</text>
  8. </view>
  9. <view class="list-wrap">
  10. <view class="list-box clear">
  11. <view class="list-item clear" v-for="(item, index) in result" :key="index">
  12. <view class="t">
  13. <text>转帐</text>
  14. <text>-¥{{item.amount}}</text>
  15. </view>
  16. <view class="box">
  17. <view class="box-item">
  18. <view><text class="icon iconfont">&#xe619;</text>申请时间</view>
  19. <view>{{item.time}}</view>
  20. </view>
  21. <view class="box-item">
  22. <view><text class="icon iconfont">&#xe610;</text>申请状态</view>
  23. <view :class="{'c-1': item.status==0,'c-2': item.status==1,'c-3': item.status==2}">{{item.text}}</view>
  24. </view>
  25. <view class="box-item clear" v-if="item.description">{{item.description}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </mescroll-body>
  31. </view>
  32. </template>
  33. <script>
  34. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  35. import navbar from "@/components/navbar/navbar";
  36. export default {
  37. mixins: [MescrollMixin],
  38. components: {
  39. navbar
  40. },
  41. data() {
  42. return {
  43. screenHeight: 0,
  44. scrollNum: 0,
  45. amount: '',
  46. result: []
  47. };
  48. },
  49. onShow() {
  50. let users = this.$storage.getJson("users");
  51. this.amount = users.amount;
  52. this.$http.getUcenter().then((res)=>{
  53. if(res.status){
  54. this.amount = users.amount = res.data.amount;
  55. this.$store.commit("UPDATEUSERS",users);
  56. }
  57. });
  58. },
  59. onPageScroll(obj){
  60. this.scrollNum = obj.scrollTop;
  61. },
  62. methods: {
  63. downCallback(){
  64. setTimeout(()=>{
  65. this.mescroll.resetUpScroll();
  66. },1200);
  67. },
  68. triggerDownScroll(){
  69. this.mescroll.triggerDownScroll();
  70. },
  71. upCallback(page) {
  72. this.$http.getWalletCashlist({
  73. page: page.num
  74. }).then((result)=>{
  75. this.mescroll.endByPage(result.data.list.length, result.data.total);
  76. if(result.status==1){
  77. if(page.num == 1) this.result = [];
  78. this.result = this.result.concat(result.data.list);
  79. }else if(result.status == -1){
  80. this.mescroll.endErr();
  81. }
  82. }).catch(error=>{
  83. this.mescroll.endErr();
  84. });
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .top{
  91. height: 140rpx;
  92. line-height: 140rpx;
  93. background-color: #1b43c4;
  94. color: #fff;
  95. padding: 0 30rpx;font-size: 32rpx;
  96. text:first-child { float: left; }
  97. text:last-child { font-size: 30rpx; margin-top: 40rpx; float: right; width: 200rpx; height: 60rpx; line-height: 60rpx; text-align: center; border-radius: 60rpx; border: 2rpx solid #fff; }
  98. }
  99. .list-wrap{
  100. width: 100%;
  101. margin-top: 20rpx;
  102. .list-item{
  103. width: 100%;
  104. height: auto !important;
  105. height: 220rpx;
  106. background-color: #fff;
  107. font-size: 26rpx;
  108. margin-bottom: 20rpx;
  109. .t {
  110. height: 80rpx;
  111. line-height: 80rpx;
  112. border-bottom: 2rpx solid #ebebeb;
  113. text { font-size: 32rpx; color: #333; }
  114. text:first-child {
  115. padding-left: 32rpx; float: left;
  116. }
  117. text:last-child {
  118. padding-right: 32rpx; float: right;
  119. }
  120. }
  121. .box {
  122. height: 136rpx;
  123. width: 100%;
  124. .box-item {
  125. width: 100%;
  126. height: 32rpx;
  127. float: left;
  128. font-size: 28rpx; color: #888;
  129. padding-top: 20rpx;
  130. view {
  131. display: inline-block;
  132. text { padding-right: 10rpx; position: relative; top: 2rpx; }
  133. }
  134. view:first-child { padding-left: 32rpx; float: left; }
  135. view:last-child { padding-right: 32rpx; float: right; }
  136. .c-1 { color: #888; }
  137. .c-3 { color: #b91922; }
  138. .c-2 { color: green; }
  139. &:nth-child(3) {
  140. width: 90%;
  141. padding: 20rpx 32rpx;
  142. height: auto !important;
  143. height: 60rpx;
  144. min-height: 60rpx;
  145. font-size: 26rpx;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. </style>