list.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="u-page">
  3. <u--input placeholder="请输入手机号或订单" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399"
  4. v-model="value"></u--input>
  5. <u-list @scrolltolower="scrolltolower">
  6. <u-cell label="待评价">
  7. <view slot="title" class="u-slot-title">
  8. <text class="u-cell-text">01-2000-210507-00370</text>
  9. <u-tag text="已审核" size="mini">
  10. </u-tag>
  11. </view>
  12. </u-cell>
  13. <u-cell value="物流轨迹" :isLink="true" label="待评价">
  14. <view slot="title" class="u-slot-title">
  15. <text class="u-cell-text">01-2000-210507-00371</text>
  16. <u-tag text="运输中" size="mini" type="warning">
  17. </u-tag>
  18. </view>
  19. </u-cell>
  20. <u-cell value="签收详情" :isLink="true" label="已评价">
  21. <view slot="title" class="u-slot-title">
  22. <text class="u-cell-text">01-2000-210507-00372</text>
  23. <u-tag text="已签收" size="mini" type="success">
  24. </u-tag>
  25. </view>
  26. </u-cell>
  27. <!-- <u-list-item v-for="(item, index) in indexList" :key="index"
  28. <u-cell :title="`列表长度-${index + 1}`">
  29. <u-avatar slot="icon" shape="square" size="35" :src="item.url"
  30. customStyle="margin: -3px 5px -3px 0"></u-avatar>
  31. </u-cell>
  32. </u-list-item> -->
  33. </u-list>
  34. </view>
  35. </template>
  36. <script>
  37. import { getOrderList } from '@/api/index.js';
  38. export default {
  39. data() {
  40. return {
  41. value: '',
  42. indexList: [],
  43. urls: [
  44. "https://xxx.com/album/1.jpg",
  45. "https://xxx.com/album/2.jpg",
  46. "https://xxx.com/album/3.jpg",
  47. "https://xxx.com/album/4.jpg",
  48. "https://xxx.com/album/5.jpg",
  49. "https://xxx.com/album/6.jpg",
  50. "https://xxx.com/album/7.jpg",
  51. "https://xxx.com/album/8.jpg",
  52. "https://xxx.com/album/9.jpg",
  53. "https://xxx.com/album/10.jpg",
  54. ],
  55. };
  56. },
  57. created() {
  58. },
  59. onLoad() {
  60. this.loadmore();
  61. },
  62. methods: {
  63. scrolltolower() {
  64. this.loadmore();
  65. },
  66. loadmore() {
  67. for (let i = 0; i < 30; i++) {
  68. this.indexList.push({
  69. url: this.urls[uni.$u.random(0, this.urls.length - 1)],
  70. });
  71. }
  72. },
  73. change(e) {
  74. console.log('change', e);
  75. }
  76. },
  77. };
  78. </script>
  79. <style lang="scss">
  80. .cell-page {
  81. padding-bottom: 20px;
  82. }
  83. .cell-box {
  84. &__title {
  85. font-size: 14px;
  86. color: rgb(143, 156, 162);
  87. margin: 20px 0px 0px 15px;
  88. }
  89. &__block {
  90. // background-color: #fff;
  91. margin-top: 20px;
  92. }
  93. }
  94. .u-page {
  95. padding: 0;
  96. &__item {
  97. &__title {
  98. color: $u-tips-color;
  99. background-color: $u-bg-color;
  100. padding: 15px;
  101. font-size: 15px;
  102. &__slot-title {
  103. color: $u-primary;
  104. font-size: 14px;
  105. }
  106. }
  107. }
  108. }
  109. .u-slot-title {
  110. @include flex;
  111. flex-direction: row;
  112. align-items: center;
  113. }
  114. .u-cell-text {
  115. font-size: 15px;
  116. line-height: 22px;
  117. color: #303133;
  118. margin-right: 5px;
  119. }
  120. .u-slot-value {
  121. line-height: 17px;
  122. text-align: center;
  123. font-size: 10px;
  124. padding: 0 5px;
  125. height: 17px;
  126. color: #FFFFFF;
  127. border-radius: 100px;
  128. background-color: #f56c6c;
  129. }
  130. </style>