card2.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="">
  3. <view class="cu-card case card" v-for="(item,index) in list" :key="index">
  4. <view class="cu-item shadow">
  5. <view class="image">
  6. <image :src="item.pic"
  7. mode="widthFix"></image>
  8. </view>
  9. <view class="content">
  10. <view class="top">
  11. <text class="title">{{item.name}}</text>
  12. <view v-if="item.introduce" class="desc text-cut-2">
  13. {{item.introduce}}
  14. </view>
  15. </view>
  16. <view class="bottom">
  17. <view class="">
  18. <image src="../../../static/del/map1.png" mode=""></image>
  19. <text>距此3.5km</text>
  20. </view>
  21. <view class="">
  22. <image src="../../../static/del/activitys.png" mode=""></image>
  23. <text>18个活动</text>
  24. </view>
  25. <view class="">
  26. <image src="../../../static/del/diancan.png" mode=""></image>
  27. <text>去点餐</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default{
  37. props:{
  38. list:Array
  39. },
  40. data(){
  41. return {
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. .card{
  48. background-color: #FFFFFF;
  49. border-bottom: 1rpx solid #ececec;
  50. }
  51. .card:last-child{
  52. border: none;
  53. }
  54. .content{
  55. display: flex;
  56. flex-direction: column;
  57. .top{
  58. .title{
  59. font-weight: 800;
  60. font-size: 28rpx;
  61. }
  62. .desc{
  63. margin-top: 10rpx;
  64. color: #919191;
  65. font-size: 24rpx;
  66. }
  67. }
  68. .bottom{
  69. margin-top: 20rpx;
  70. display: flex;
  71. width: 100%;
  72. view{
  73. width: calc(100% / 3);
  74. display: flex;
  75. align-items: center;
  76. image{
  77. width: 30rpx;
  78. height: 30rpx;
  79. }
  80. text{
  81. font-size: 28rpx;
  82. margin-left: 6rpx;
  83. }
  84. }
  85. view:nth-child(1){
  86. justify-content: flex-start;
  87. }
  88. view:nth-child(2){
  89. justify-content: center;
  90. }
  91. view:nth-child(3){
  92. justify-content: flex-end;
  93. }
  94. }
  95. }
  96. </style>