goodsDetails.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view>
  3. <up-card title="志愿者介绍" :thumb="thumb" :head-style="{ height: '100rpx', padding: '0rpx 20rpx' }">
  4. <template #body>
  5. <view class="card-content">
  6. <!-- 左侧图片 -->
  7. <image class="card-image"
  8. src="https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg"
  9. mode="aspectFill"></image>
  10. <!-- 中间信息(姓名/类别等) -->
  11. <view class="card-info">
  12. <view class="info-item">姓名:王麻子</view>
  13. <view class="info-item">类别:教师</view>
  14. <view class="info-item">科目:语文</view>
  15. <view class="info-item">电话:15082*****1234</view>
  16. <view class="info-item">住址:重庆市永川区洞拐洞拐洞洞拐</view>
  17. </view>
  18. <!-- 右上角评分 -->
  19. <view class="card-rating">4.5 评分</view>
  20. </view>
  21. </template>
  22. </up-card>
  23. <up-card title="技能介绍" :thumb="thumb" :head-style="{ height: '100rpx', padding: '0rpx 20rpx' }">
  24. </up-card>
  25. </view>
  26. </template>
  27. <script setup>
  28. import {
  29. onLoad
  30. } from '@dcloudio/uni-app'
  31. import {
  32. onMounted,
  33. ref
  34. } from "vue";
  35. import {
  36. getDetailsvolunteerId
  37. } from "@/api/volunteerDetailsApi/details.js"
  38. const thumb = ref('http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg');
  39. const listData = ref([])
  40. // const itemInfo = ref({})
  41. //獲取信息
  42. // onLoad((option) => {
  43. // itemInfo.value = JSON.parse(decodeURIComponent(option.itemInfo))
  44. // console.log(itemInfo.value, '>>>>>>itemInfo.value');
  45. // })
  46. </script>
  47. <style scoped>
  48. /* 可选:深层覆盖 */
  49. .Box-card ::v-deep .u-card__body {
  50. border: none;
  51. }
  52. /* 卡片整体布局 */
  53. .card-content {
  54. display: flex;
  55. position: relative;
  56. padding: 20rpx;
  57. align-items: flex-start;
  58. }
  59. /* 左侧图片*/
  60. .card-image {
  61. width: 240rpx;
  62. height: 340rpx;
  63. border-radius: 12rpx;
  64. margin-right: 20rpx;
  65. }
  66. /* 中间信息(行间距更大) */
  67. .card-info {
  68. flex: 1;
  69. }
  70. .info-item {
  71. margin-bottom: 24rpx;
  72. /* 增加行间距 */
  73. font-size: 28rpx;
  74. line-height: 1.6;
  75. /* 行高增加 */
  76. color: #333;
  77. }
  78. /* 右上角评分 */
  79. .card-rating {
  80. position: absolute;
  81. top: 20rpx;
  82. right: 20rpx;
  83. background-color: #f8f8f8;
  84. padding: 6rpx 16rpx;
  85. border-radius: 20rpx;
  86. font-size: 24rpx;
  87. color: #ff9900;
  88. /* 橙色评分 */
  89. font-weight: bold;
  90. }
  91. </style>