rechargeRecord.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="content" :style="{height:nowHeight}">
  3. <view class="recharge-box" v-for="pay in payList" :key='pay.id'>
  4. <view class="recharge-time-box">
  5. <view class="recharge-font">智能投顾</view>
  6. <view class="recharge-time">{{pay.paytime}}</view>
  7. </view>
  8. <view class="recharge-money">
  9. <text>{{pay.money}}</text>
  10. </view>
  11. </view>
  12. <view v-if='payList.length === 0' style="font-size: 14px;margin-top: 5%;">
  13. <p>暂无充值记录</p>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. var md5 = require("../../../common/md5.js");
  19. export default {
  20. data() {
  21. return {
  22. nowHeight:getApp().globalData.glbalHeight,
  23. payList:[
  24. // {
  25. // paytime:'8-28 17:27',
  26. // money:'¥ 14',
  27. // id:'A1',
  28. // },
  29. ],
  30. }
  31. },
  32. onShow() {
  33. this.getRechargeList()
  34. },
  35. methods: {
  36. getRechargeList(){
  37. let that = this;
  38. uni.request({
  39. url:getApp().globalData.shareUrl, //需要设置为全局
  40. method: 'POST',
  41. header: {
  42. 'content-type': 'application/x-www-form-urlencoded'
  43. },
  44. data: {
  45. method: 'charge_list',
  46. timestamp: getApp().globalData.globalTimestamp, //Date.now()
  47. uid:getApp().globalData.user_id,
  48. sign: md5('charge_list' + getApp().globalData.globalTimestamp),
  49. },
  50. success: res => {
  51. that.payList = res.data.msg
  52. }
  53. });
  54. },
  55. }
  56. }
  57. </script>
  58. <style>
  59. .content {
  60. display: flex;
  61. flex-direction: column;
  62. align-items: center;
  63. justify-content: flex-start;
  64. background: #f4f5f7;
  65. }
  66. .recharge-box {
  67. display: flex;
  68. align-items: center;
  69. justify-content: space-between;
  70. background: #fff;
  71. width:100%;
  72. height: 150upx;
  73. border-bottom: 1upx solid #D8D8D8;
  74. }
  75. .recharge-time-box {
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. justify-content: space-between;
  80. margin-left: 5%;
  81. height: 110upx;
  82. }
  83. .recharge-font {
  84. font-size: 30upx;
  85. margin-left: -10%;
  86. }
  87. .recharge-time {
  88. color:#D9D9D9;
  89. font-size: 26upx;
  90. }
  91. .recharge-money {
  92. margin-right: 5%;
  93. }
  94. .recharge-money text {
  95. font-size: 28upx;
  96. }
  97. </style>