card2.vue 2.1 KB

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