service.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view>
  3. <!--promote/balance/balance.wxml-->
  4. <view class="list" v-if="pageList.length > 0">
  5. <block v-for="(item, index) in pageList" :key="index">
  6. <view class="li dflex">
  7. <view class="flex">
  8. <view class="name">
  9. <text>订单:</text>
  10. {{item.orderId}}
  11. </view>
  12. <view class="dblock">
  13. <text class="moneygray">{{item.nickName}}</text>
  14. <text class="moneygray" v-if="item.orderMoney"> ¥{{item.orderMoney}}</text>
  15. <text class="moneyred" v-if="item.state==1"> 待结算</text>
  16. <text class="moneygray" v-else-if="item.state==2"> 已结算</text>
  17. <text class="moneygray" v-else> 已取消</text>
  18. </view>
  19. </view>
  20. <view class="money">¥<text>{{item.serviceShopMoney}}</text>
  21. <view>
  22. <text class="time" v-if="item.createDate">{{item.createDate}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </block>
  27. </view>
  28. <view class="nodata" v-if="pageList.length < 1">
  29. <image :src="picUrlss+'empty_dd.png'"></image>
  30. <text>暂无业绩订单</text>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. // promote/balance/balance.js
  36. const app = getApp();
  37. const req = require("../../utils/request.js");
  38. export default {
  39. data() {
  40. return {
  41. picUrlss: req.public.picUrls,
  42. pageList: [],
  43. form: {
  44. page: 1,
  45. limit: 12
  46. },
  47. isLoad: true
  48. };
  49. },
  50. components: {},
  51. props: {},
  52. onLoad(options) {
  53. this.getData();
  54. },
  55. onReachBottom: function () {
  56. if (this.hasmore) return false;
  57. this.form.page++;
  58. this.getData();
  59. },
  60. methods: {
  61. getData() {
  62. if (!this.isLoad) return false;
  63. this.isLoad = false;
  64. let that = this;
  65. req.getRequest('/api/shopServiceFee/list', that.form, data => {
  66. // console.log(data);
  67. if (data && data.length >= 10) that.isLoad = true;
  68. if (that.form.page > 1) data = that.pageList.concat(data);
  69. that.setData({
  70. pageList: data.list
  71. });
  72. });
  73. }
  74. }
  75. };
  76. </script>
  77. <style>
  78. @import "./service.css";
  79. </style>