瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
1.9 KiB

4 months ago
  1. <template>
  2. <view class="item" @click="$emit('click')">
  3. <image :src="item.imageTitle"
  4. @click.stop="previewImage([item.imageTitle])"
  5. mode="aspectFill"></image>
  6. <view class="text">
  7. <view class="title">
  8. {{ item.title }}
  9. </view>
  10. <view class="createBy">
  11. {{ item.num }}余座
  12. {{ item.startTime }}出发
  13. </view>
  14. <view class="createBy">
  15. {{ item.startAddress }}
  16. {{ item.endAddress }}
  17. </view>
  18. <view class="createBy">
  19. <view class="">
  20. {{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
  21. </view>
  22. <view class="phone"
  23. v-if="item.phone"
  24. @click.stop="callPhone">
  25. <image src="/static/image/home/phone.png" mode=""></image>
  26. 联系司机
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import mixinsSex from '@/mixins/sex.js'
  34. export default {
  35. mixins: [mixinsSex],
  36. props: ['item'],
  37. data() {
  38. return {
  39. };
  40. },
  41. methods: {
  42. callPhone(){
  43. uni.makePhoneCall({
  44. phoneNumber: this.item.phone
  45. })
  46. },
  47. },
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .item {
  52. height: 220rpx;
  53. width: 100%;
  54. background-color: #fff;
  55. overflow: hidden;
  56. border-radius: 10rpx;
  57. color: #777;
  58. display: flex;
  59. font-size: 24rpx;
  60. margin: 30rpx 0;
  61. image {
  62. width: 50%;
  63. height: 100%;
  64. }
  65. .text {
  66. display: flex;
  67. flex-direction: column;
  68. padding: 16rpx;
  69. width: 50%;
  70. .title {
  71. font-size: 30rpx;
  72. font-weight: 600;
  73. color: #000;
  74. }
  75. .createBy {
  76. display: flex;
  77. margin-top: auto;
  78. line-height: 40rpx;
  79. justify-content: space-between;
  80. &>view {
  81. display: flex;
  82. align-items: center;
  83. justify-content: center;
  84. }
  85. .phone{
  86. background-color: rgba($uni-color, 0.2);
  87. color: $uni-color;
  88. padding: 8rpx 16rpx;
  89. border-radius: 10rpx;
  90. margin-left: auto;
  91. image{
  92. width: 20rpx;
  93. height: 20rpx;
  94. }
  95. }
  96. }
  97. }
  98. }
  99. </style>