me_order.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template style="background: #F6F6F6;">
  2. <view style="height: 100%;width: 100%;padding: 20rpx 28rpx;">
  3. <view class="" v-for="(itm,idx) in serviceList" :key="idx">
  4. <view class="list" @click="list(itm)">
  5. <!-- 左边 -->
  6. <view class="left">
  7. <view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">{{itm.order_pack.insurance_policy}}</view>
  8. <view style="font-size: 26rpx;color: #999999;">{{itm.order_pack.pack_name}}</view>
  9. </view>
  10. <!-- 右边 -->
  11. <view class="ringht">
  12. <u-icon name="arrow-right" color="#C0C0C0"></u-icon>
  13. </view>
  14. </view>
  15. </view>
  16. <u-empty text="暂无数据" :show="show" mode="order" margin-top="250"></u-empty>
  17. <view class="cu-tabbar-height"></view>
  18. <view class="cu-tabbar-height"></view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. mounted() {
  24. this.getInsurance()
  25. },
  26. data() {
  27. return {
  28. pageindex: 1,
  29. serviceList: [],
  30. show: false
  31. }
  32. },
  33. methods: {
  34. //关注
  35. list(item) {
  36. uni.navigateTo({
  37. url: '/pages/common_tools/me_order/order_details?data=' + JSON.stringify(item)
  38. // url: '/pages/customer/customer-datails?n=' + n
  39. })
  40. },
  41. getInsurance: async function() {
  42. let res = await this.$request.post("/api/v1/order/orderList", {
  43. page: this.pageindex,
  44. list_type: 1,
  45. product_type: 6,
  46. })
  47. console.log(res)
  48. if (res.status == 0) {
  49. if (this.pageindex > res.data.last_page) {
  50. uni.showToast({
  51. title: "没有更多了",
  52. icon: "none"
  53. })
  54. } else {
  55. this.serviceList = this.serviceList.concat(res.data.data)
  56. this.pageindex++
  57. }
  58. }
  59. if (this.serviceList.length == 0) {
  60. this.show = true
  61. } else {
  62. this.show = false
  63. }
  64. }
  65. }
  66. }
  67. </script>
  68. <style>
  69. .list {
  70. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
  71. border-radius: 12px;
  72. background: #FFFFFF;
  73. margin-bottom: 20rpx;
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. padding: 48rpx 28rpx;
  78. }
  79. .left {
  80. width: 95%;
  81. display: initial;
  82. }
  83. .ringht {
  84. width: 5%;
  85. }
  86. </style>