mycar_detail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <view class="container">
  3. <view class="introduce-section">
  4. <view v-for="(item, index) in carInfo" :key="index" class="guess-item">
  5. <view class="grid col-4 car-title">
  6. <view class="cu-tag radius line-green">{{item.carNo}}</view>
  7. <view class='cu-tag radius line-green'>{{item.driver}}</view>
  8. <view class='cu-tag radius line-green'>{{item.driverPhone}}</view>
  9. </view>
  10. <view class="grid col-3 grid-square flex-sub">
  11. <view class="bg-img" v-if="item.personNoImg != ''" @tap="ViewImage" :data-url="item.personNoImg">
  12. <image :src="item.personNoImg" mode="aspectFit"></image>
  13. </view>
  14. <view class="bg-img" v-if="item.personNoImg1 != ''" @tap="ViewImage" :data-url="item.personNoImg1">
  15. <image :src="item.personNoImg1" mode="aspectFit"></image>
  16. </view>
  17. <view class="bg-img" v-if="item.driverNoImg != ''" @tap="ViewImage" :data-url="item.driverNoImg">
  18. <image :src="item.driverNoImg" mode="aspectFit"></image>
  19. </view>
  20. </view>
  21. <view class="grid col-3 grid-square flex-sub">
  22. <view class="bg-img" v-if="item.carNoImg != ''" @tap="ViewImage" :data-url="item.carNoImg">
  23. <image :src="item.carNoImg" mode="aspectFit"></image>
  24. </view>
  25. <view class="bg-img" v-if="item.carNoImg1 != ''" @tap="ViewImage" :data-url="item.carNoImg1">
  26. <image :src="item.carNoImg1" mode="aspectFit"></image>
  27. </view>
  28. <view class="bg-img" v-if="item.driverNoImg1 != ''" @tap="ViewImage" :data-url="item.driverNoImg1">
  29. <image :src="item.driverNoImg1" mode="aspectFit"></image>
  30. </view>
  31. </view>
  32. </view>
  33. <view v-show="isLoadMore">
  34. <uni-load-more :status="loadStatus"></uni-load-more>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import {
  41. mapState
  42. } from 'vuex';
  43. export default {
  44. data() {
  45. return {
  46. carInfo:[]
  47. };
  48. },
  49. computed: {
  50. ...mapState(['hasLogin','userInfo'])
  51. },
  52. onShow() {
  53. },
  54. onLoad(options) {
  55. const that = this
  56. uni.showLoading({
  57. title: '正在加载',
  58. mask:true
  59. })
  60. that.$api.request('tran', 'getMyCarListByCarNo', {
  61. carNo: options.carNo
  62. }, failres => {
  63. that.$api.msg(failres.errmsg)
  64. uni.hideLoading()
  65. }).then(res => {
  66. that.carInfo = res.data
  67. uni.hideLoading()
  68. })
  69. },
  70. methods: {
  71. ViewImage(e) {
  72. var img = [];
  73. img = e.currentTarget.dataset.url.split(' ')
  74. uni.previewImage({
  75. current:0,
  76. urls: img
  77. });
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang='scss'>
  83. .car-title{
  84. padding-top: 20rpx;
  85. padding-bottom: 20rpx;
  86. }
  87. /* 销售信息 */
  88. .introduce-section {
  89. background: #fff;
  90. padding: 20upx 30upx;
  91. padding-bottom: 100upx;
  92. .guess-item {
  93. padding-bottom: 20upx;
  94. border-bottom: 1px solid #ccc;
  95. }
  96. .title {
  97. font-size: 28upx;
  98. color: $font-color-dark;
  99. font-weight:bold;
  100. height: 50upx;
  101. line-height: 50upx;
  102. flex:2.5;
  103. }
  104. .title-tip {
  105. flex:1;
  106. }
  107. .price-box {
  108. display: flex;
  109. align-items: baseline;
  110. height: 70upx;
  111. padding: 10upx 0;
  112. font-size: 26upx;
  113. color: $uni-color-primary;
  114. }
  115. .price {
  116. font-size: $font-lg + 2upx;
  117. }
  118. .m-price {
  119. margin: 0 12upx;
  120. color: $font-color-light;
  121. text-decoration: line-through;
  122. }
  123. .coupon-tip {
  124. align-items: center;
  125. padding: 4upx 10upx;
  126. background: $uni-color-primary;
  127. font-size: $font-sm;
  128. color: #fff;
  129. border-radius: 6upx;
  130. line-height: 1;
  131. transform: translateY(-4upx);
  132. }
  133. .bot-row {
  134. display: flex;
  135. align-items: center;
  136. height: 50upx;
  137. font-size: $font-sm;
  138. color: $font-color-light;
  139. view {
  140. flex: 1;
  141. }
  142. }
  143. }
  144. </style>