paymentList.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <view class="list" v-if="pageList && pageList.length > 0">
  4. <view class="li ddflex" v-for="(item, index) in pageList">
  5. <view class="fflex">
  6. <view class="id">订单编号:{{ item.id }}</view>
  7. <view class="time">{{ item.payTime }}</view>
  8. </view>
  9. <view class="money">
  10. <text>¥</text>
  11. {{ item.payMoney }}
  12. </view>
  13. </view>
  14. </view>
  15. <view class="nodata" v-else>
  16. <image :src="picUrlss + 'empty_dd.png'"></image>
  17. <text>暂无记录</text>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. const req = require('../../utils/request.js');
  23. const api = require('../../utils/api.js');
  24. const util = require('../../utils/util.js');
  25. const app = getApp();
  26. export default {
  27. data() {
  28. return {
  29. picUrlss: req.public.picUrls,
  30. form: {
  31. page: 1,
  32. limit: 10
  33. },
  34. pageList: [],
  35. isLoad: true,
  36. openId: ''
  37. };
  38. },
  39. onLoad(options) {
  40. this.openId = options.openId;
  41. this.getList();
  42. },
  43. onReachBottom() {
  44. this.form.page++;
  45. this.getList();
  46. },
  47. onShow() {},
  48. methods: {
  49. getList() {
  50. if (!this.isLoad) return false;
  51. this.isLoad = false;
  52. if (this.form.page == 1) {
  53. uni.showLoading();
  54. }
  55. let form = this.form;
  56. form.openId = this.openId;
  57. req.getRequest(///api/receipt/receiptLogs
  58. '/api/v3/collection/logs',
  59. form,
  60. res => {
  61. if (res.list && res.list.length == this.form.limit) this.isLoad = true;
  62. if (this.form.page > 1) res.list = this.pageList.concat(res.list);
  63. this.pageList = res.list;
  64. uni.hideLoading();
  65. },
  66. true
  67. );
  68. }
  69. }
  70. };
  71. </script>
  72. <style>
  73. @import './paymentList.css';
  74. </style>