orderdetails.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view>
  3. <view>
  4. <view>
  5. <up-tag text="标签" type="error" style="width: 40rpx; height: 30rpx;"></up-tag>
  6. <view>
  7. {{listData.address.area}}
  8. </view>
  9. <view>
  10. {{listData.address.name}}
  11. {{listData.address.telephone}}
  12. </view>
  13. <view>
  14. {{listData.address.address}}
  15. </view>
  16. </view>
  17. </view>
  18. <view>
  19. <up-card title="志愿者介绍" :head-style="{ height: '80rpx', padding: '20rpx',}">
  20. <template #body>
  21. <view class="card-container">
  22. <image class="card-image" :src="listData.volunteerInfo.certificationPicture" mode="aspectFill">
  23. </image>
  24. <view class="card-info">
  25. <view class="info-item">{{listData.volunteerInfo.name}}</view>
  26. <view class="info-item">类别:11</view>
  27. <view class="info-item">科目:111</view>
  28. <view class="Telephone">电话:{{listData.volunteerInfo.phonenumber}}</view>
  29. <view class="info-item">住址:{{listData.volunteerInfo.city}}</view>
  30. </view>
  31. <view class="card-rating">4.5 评分</view>
  32. </view>
  33. </template>
  34. </up-card>
  35. <up-card title="技能介绍" :head-style="{ height: '80rpx', padding: '20rpx',}">
  36. <template #body>
  37. {{listData.volunteerInfo.remark}}
  38. </template>
  39. </up-card>
  40. <up-card title="证书" :head-style="{ height: '80rpx', padding: '20rpx',}">
  41. <template #body>
  42. <image src="../../../static/zhiyuanzhe.jpg" mode="" style="width: 100%;"></image>
  43. </template>
  44. </up-card>
  45. </view>
  46. <view>
  47. <up-list @scrolltolower="scrolltolower">
  48. <up-list-item v-for="(item, index) in listData.secondOrderList" :key="index">
  49. <view class="Wrap-top">
  50. <text>第一节课</text>
  51. <text>{{item.createTime}}</text>
  52. </view>
  53. <view class="list-item">
  54. <image src="/static/img/dd.png" mode="aspectFill" class="item-image"></image>
  55. <view class="item-info">
  56. <view class="info-line">姓名:王麻子</view>
  57. <view class="info-line">类别:刨土豆</view>
  58. <view class="info-line">技能介绍:{{item.remark}}</view>
  59. </view>
  60. <view class="item-right">
  61. <view class="rating">评分:9.5</view>
  62. <up-tag text="标签" plain size="mini" class="tag"></up-tag>
  63. </view>
  64. </view>
  65. </up-list-item>
  66. </up-list>
  67. </view>
  68. </view>
  69. </template>
  70. <script setup>
  71. import {
  72. onLoad
  73. } from '@dcloudio/uni-app'
  74. import {
  75. ref
  76. } from "vue";
  77. import {
  78. orderInfomainOrderId
  79. } from "@/api/userList.js";
  80. const listData = ref(); //志愿者详情数据
  81. const mainOrderId = ref(''); //志愿者ID
  82. // 获取传递的参数
  83. onLoad(async (options) => {
  84. mainOrderId.value = options.mainOrderId; // 存储到响应式变量
  85. const res = await orderInfomainOrderId(mainOrderId.value)
  86. listData.value = res.data;
  87. console.log(listData.value, '获取用户详情')
  88. });
  89. </script>
  90. <style scoped>
  91. .card-container {
  92. display: flex;
  93. position: relative;
  94. padding: 20rpx;
  95. align-items: flex-start;
  96. background-color: #fff;
  97. border-radius: 12rpx;
  98. }
  99. /* 左侧图片 */
  100. .card-image {
  101. width: 240rpx;
  102. height: 340rpx;
  103. border-radius: 12rpx;
  104. margin-right: 30rpx;
  105. flex-shrink: 0;
  106. }
  107. /* 中间信息区域 */
  108. .card-info {
  109. flex: 1;
  110. padding-right: 100rpx;
  111. }
  112. /* 中间信息区域 */
  113. .card-info {
  114. flex: 1;
  115. padding-right: 100rpx;
  116. }
  117. .Telephone {
  118. white-space: nowrap;
  119. margin-bottom: 24rpx;
  120. font-size: 28rpx;
  121. line-height: 1.6;
  122. color: #333;
  123. }
  124. .info-item {
  125. margin-bottom: 24rpx;
  126. font-size: 28rpx;
  127. line-height: 1.6;
  128. color: #333;
  129. }
  130. /* 右上角评分 */
  131. .card-rating {
  132. position: absolute;
  133. top: 20rpx;
  134. right: 20rpx;
  135. background-color: #f8f8f8;
  136. padding: 6rpx 16rpx;
  137. border-radius: 20rpx;
  138. font-size: 24rpx;
  139. color: #ff9900;
  140. font-weight: bold;
  141. }
  142. /* 上课时间 */
  143. .Wrap-top {
  144. display: flex;
  145. justify-content: space-between;
  146. align-items: center;
  147. padding: 24rpx 20rpx 0rpx 24rpx;
  148. }
  149. .list-item {
  150. display: flex;
  151. padding: 24rpx;
  152. align-items: flex-start;
  153. gap: 24rpx;
  154. }
  155. .item-image {
  156. width: 160rpx;
  157. height: 180rpx;
  158. border-radius: 16rpx;
  159. object-fit: cover;
  160. }
  161. .item-info {
  162. flex: 1;
  163. display: flex;
  164. flex-direction: column;
  165. gap: 14rpx;
  166. }
  167. .info-line {
  168. font-size: 28rpx;
  169. color: #333;
  170. line-height: 1.6;
  171. }
  172. .item-right {
  173. display: flex;
  174. flex-direction: column;
  175. align-items: flex-end;
  176. gap: 16rpx;
  177. min-width: 160rpx;
  178. }
  179. .rating {
  180. font-size: 28rpx;
  181. color: #f39c12;
  182. font-weight: bold;
  183. }
  184. .tag {
  185. transform: scale(0.9);
  186. /* 缩小标签尺寸 */
  187. }
  188. .action-btn {
  189. margin-top: 18rpx;
  190. width: 100%;
  191. }
  192. </style>