credit1.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="" style="text-align: center;">
  3. <view style="padding: 50rpx;padding-bottom: 0rpx;">
  4. <view style="color: #fff;">当前</view>
  5. <view style="color: #fff;font-size: 50rpx;line-height: 200%;">{{userinfo.lepiao}}</view>
  6. </view>
  7. <button type="default" @click="zhuanzhang()" class="btn1" style="margin-bottom: 30rpx;" v-if="lx=='lp'">转出</button>
  8. <view v-for="(item,index) in list" style="border-top: solid 1px gainsboro;padding:30rpx 10rpx;color: #fff;font-size:28rpx;line-height: 150%;">
  9. <view style="width: 100%;display: table;">
  10. <view style="float: left;">
  11. <view>
  12. <text v-if="item.type==0" style="color: #fff;">+{{item.price}}</text>
  13. <text v-if="item.type==1" style="color: #e8131a;font-weight: bold;">-{{item.price}}</text>
  14. </view>
  15. </view>
  16. <view style="float: right;">
  17. <view>{{item.time}}</view>
  18. </view>
  19. </view>
  20. <view style="display: table;width: 100%;text-align: left;">{{item.content}}</view>
  21. </view>
  22. <uni-load-more :status="status" :content-text="contentText" />
  23. <view v-if="list.length==0" style="padding: 20px;">
  24. 暂无明细
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. constants: {},
  33. userinfo: null,
  34. data:{
  35. _token:"",
  36. uid:0,
  37. },
  38. num:"",
  39. mobile:"",
  40. jymm:"",
  41. list:[],
  42. page:1,
  43. status: 'more',
  44. contentText: {
  45. contentdown: '上拉加载更多',
  46. contentrefresh: '加载中',
  47. contentnomore: '到底了'
  48. },
  49. lx:''
  50. };
  51. },
  52. onLoad(o) {
  53. this.lx=o.lx
  54. },
  55. onShow() {
  56. var user = this.$api.getUserinfo();
  57. if (user) {
  58. this.userinfo = user;
  59. this.data._token=user._token;
  60. this.data.uid=user.id;
  61. this.MhMyInteger();
  62. } else {
  63. this.userinfo = null;
  64. }
  65. },
  66. onReachBottom() {
  67. this.status = 'loading';
  68. this.page++;
  69. this.MhMyInteger();
  70. },
  71. methods: {
  72. zhuanzhang(){
  73. //手动预约的 要求输入数量
  74. uni.navigateTo({
  75. url: 'zrlp'
  76. });
  77. },
  78. MhMyInteger(){
  79. var data = this.data;
  80. data.page=this.page;
  81. this.$api
  82. .MhPostModel(data, 'user/lplist')
  83. .then(res => {
  84. var shuju = res.data.data.data;
  85. this.list = this.list.concat(shuju)
  86. this.status = 'more';
  87. if (shuju.length == 0) {
  88. this.status = 'nomore';
  89. }
  90. })
  91. .catch(err => {
  92. // console.log('request fail', JSON.stringify(err));
  93. });
  94. },
  95. }
  96. }
  97. </script>
  98. <style>
  99. page{padding: 15rpx;background: #98a737;background-attachment: fixed !important;
  100. background-repeat: no-repeat !important;}
  101. .btn1{background: #f2a50b; width:150rpx;text-align: center;color: #fff;font-size: 30rpx;line-height: 200%;border-radius: 10rpx;}
  102. </style>