order-detail1-list.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view class="order-detail1-list">
  3. <view class="list-item" v-for="(item, index) in list" :key="index">
  4. <view class="info">
  5. <view class="name">{{ item.name }}</view>
  6. <view class="num">
  7. <text>尺码:{{ item.size.length }}</text>
  8. <text>数量:{{ item.num.reduce((t, e) => t + e, 0) }}</text>
  9. </view>
  10. </view>
  11. <view class="size-item" v-for="(sizeItem, sizeIndex) in item.size" :key="sizeIndex">
  12. <image :src="item.main_img"></image>
  13. <view class="info">
  14. <text class="size">尺码:{{ sizeItem }}</text>
  15. <text class="basecolor">¥{{ item.money }}/{{ item.unit }}</text>
  16. </view>
  17. <view class="num">数量:{{ item.num[sizeIndex] }}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. list: []
  27. };
  28. },
  29. onLoad({ list }) {
  30. this.list = JSON.parse(uni.getStorageSync('lll'))
  31. console.log(this.list)
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .order-detail1-list {
  37. height: 100vh;
  38. overflow: auto;
  39. background: $app-base-bg;
  40. .list-item {
  41. margin-bottom: 20rpx;
  42. > .info {
  43. height: 90rpx;
  44. @include flex();
  45. padding: 30rpx;
  46. background: #FFFFFF;
  47. margin-bottom: 1rpx;
  48. box-sizing: border-box;
  49. justify-content: space-between;
  50. .name {
  51. font-size: 32rpx;
  52. font-weight: bold;
  53. }
  54. .num {
  55. font-size: 28rpx;
  56. text {
  57. margin-left: 24rpx;
  58. }
  59. }
  60. }
  61. .size-item {
  62. @include flex();
  63. height: 200rpx;
  64. background: #FFFFFF;
  65. border-bottom: 2rpx;
  66. background: #FFFFFF;
  67. box-sizing: border-box;
  68. align-items: flex-end;
  69. justify-content: space-between;
  70. padding: 30rpx 81rpx 30rpx 30rpx;
  71. image {
  72. width: 140rpx;
  73. height: 140rpx;
  74. border-radius: 6rpx;
  75. margin-right: 30rpx;
  76. }
  77. > .info {
  78. @include flex(column);
  79. justify-content: space-between;
  80. align-items: flex-start;
  81. height: 100%;
  82. flex: 1;
  83. line-height: 2;
  84. .size {
  85. font-size: 32rpx;
  86. font-weight: bold;
  87. }
  88. .basecolor {
  89. font-weight: bold;
  90. }
  91. }
  92. .num {
  93. line-height: 2;
  94. font-size: 28rpx;
  95. }
  96. }
  97. }
  98. }
  99. </style>