charge.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view>
  3. <view class="center ptb-10 bold size-34">{{info.car_name}}</view>
  4. <view class="uni-padding-wrap">
  5. <view class="page-section swiper">
  6. <view class="page-section-spacing">
  7. <swiper class="swiper" @change="change" :indicator-dots="true" indicator-active-color="#00C28E" indicator-color="#e8d4ff" :autoplay="false"
  8. :current="tab" :circular="true">
  9. <swiper-item v-for="(item,i) in carList" :key="i">
  10. <view class="pd-36 center">
  11. <image :src="item.car_image" style="width: 260rpx;height: 180rpx;" mode=""></image>
  12. <view class="ml-30">
  13. <view>载重{{item.load}}</view>
  14. <view class="bold mtb-20">长宽高{{item.length}}*{{item.width}}*{{item.height}}米</view>
  15. <view class="gray-2">载货体积{{item.volume}}方</view>
  16. </view>
  17. </view>
  18. </swiper-item>
  19. </swiper>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="bg" style="height: 20rpx;"></view>
  24. <view>
  25. <view class="bb pd-36 bold size-34">里程计费</view>
  26. <view class="bb pd-36 flex">
  27. <text>起步价(包含{{info.start_mileage}}公里)</text>
  28. <text>{{info.start_price}}元</text>
  29. </view>
  30. <view class="bb pd-36 flex">
  31. <text>{{info.section1_min_mileage}}-{{info.section1_max_mileage}}公里</text>
  32. <text>+{{info.section1_price}}元/公里</text>
  33. </view>
  34. <view class="bb pd-36 flex">
  35. <text>{{info.section2_mileage}}公里以上</text>
  36. <text>+{{info.section2_price}}元/公里</text>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. tab:0,
  46. carList:[]
  47. };
  48. },
  49. computed:{
  50. info(){
  51. return this.carList[this.tab]||{}
  52. }
  53. },
  54. onLoad(option) {
  55. this.tab = option.tab
  56. this.$http('/addons/ddrive/freight/carInfo').then(data=>{
  57. this.carList = data
  58. })
  59. },
  60. methods:{
  61. change(event){
  62. this.tab = event.detail.current
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. </style>