orderItem.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view>
  3. <up-list @scrolltolower="scrolltolower">
  4. <up-list-item v-for="(item, index) in dataList" :key="index">
  5. <view class="list-item">
  6. <!-- 左侧图片 -->
  7. <image src="/static/img/dd.png" mode="aspectFill" class="item-image"></image>
  8. <!-- 中间信息 -->
  9. <view class="item-info">
  10. <view class="info-line">姓名:王麻子</view>
  11. <view class="info-line">类别:刨土豆</view>
  12. <view class="info-line">技能介绍:{{ item.remark }}</view>
  13. </view>
  14. <!-- 右侧信息 -->
  15. <view class="item-right">
  16. <view class="rating">评分:9.5</view>
  17. <up-tag text="标签" plain size="mini" class="tag"></up-tag>
  18. <up-button type="primary" text="沟通" size="small" class="action-btn"
  19. @click="handlClick"></up-button>
  20. </view>
  21. </view>
  22. </up-list-item>
  23. </up-list>
  24. </view>
  25. </template>
  26. <script setup>
  27. import {
  28. userMainOrderList
  29. } from '@/api/userList.js'
  30. import {
  31. onMounted
  32. } from "vue";
  33. const props = defineProps({
  34. dataList: {
  35. typeof: Array,
  36. default: () => [],
  37. }
  38. })
  39. const handlClick = (item) => {
  40. // const orderId = item.orderId; // 获取详情id
  41. // uni.navigateTo({
  42. // url: '/pages_orderuser/pages/order/orderdetails'
  43. // });
  44. }
  45. </script>
  46. <style scoped>
  47. .list-item {
  48. display: flex;
  49. padding: 24rpx;
  50. align-items: flex-start;
  51. gap: 24rpx;
  52. }
  53. .item-image {
  54. width: 160rpx;
  55. height: 180rpx;
  56. border-radius: 16rpx;
  57. object-fit: cover;
  58. }
  59. .item-info {
  60. flex: 1;
  61. display: flex;
  62. flex-direction: column;
  63. gap: 14rpx;
  64. }
  65. .info-line {
  66. font-size: 28rpx;
  67. color: #333;
  68. line-height: 1.6;
  69. }
  70. .item-right {
  71. display: flex;
  72. flex-direction: column;
  73. align-items: flex-end;
  74. gap: 16rpx;
  75. min-width: 160rpx;
  76. }
  77. .rating {
  78. font-size: 28rpx;
  79. color: #f39c12;
  80. font-weight: bold;
  81. }
  82. .tag {
  83. transform: scale(0.9);
  84. /* 缩小标签尺寸 */
  85. }
  86. .action-btn {
  87. margin-top: 18rpx;
  88. width: 100%;
  89. }
  90. </style>