rechargeRecord.vue 2.2 KB

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