monthly.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <!-- 包月 -->
  3. <view class="monthly">
  4. <view class="monthly-list">
  5. <view class="monthly-list-item" v-for="(item, index) in monthlyList" :key="index">
  6. <view class="monthly-list-item-top">
  7. <view class="mlit-left">
  8. <view>{{item.name}}</view>
  9. <view>{{item.parking}}</view>
  10. </view>
  11. <view class="mlit-right" v-if="item.carType === 1">汽油车</view>
  12. <view class="mlit-right" v-if="item.carType === 3">新能源</view>
  13. </view>
  14. <view class="monthly-list-item-bottom">
  15. <view class="mlib-item">
  16. <view>包期</view>:
  17. <view>{{item.dateRange}}</view>
  18. </view>
  19. <view class="mlib-item">
  20. <view>剩余天数</view>:
  21. <view>{{item.balance}}天</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. monthlyList: [
  33. {
  34. id: 1,
  35. name: '贵A37W45',
  36. parking: '甜蜜小镇D18组团停车场',
  37. dateRange: '2021.04.21-2021.05.20',
  38. balance: '20',
  39. carType: 1
  40. },
  41. {
  42. id: 2,
  43. name: '贵A37W45',
  44. parking: '甜蜜小镇D18组团停车场',
  45. dateRange: '2021.04.21-2021.05.20',
  46. balance: '20',
  47. carType: 3
  48. },
  49. {
  50. id: 3,
  51. name: '贵A37W45',
  52. parking: '甜蜜小镇D18组团停车场',
  53. dateRange: '2021.04.21-2021.05.20',
  54. balance: '20',
  55. carType: 1
  56. }
  57. ]
  58. }
  59. },
  60. onShow () {
  61. this.getCarsLicenseList()
  62. },
  63. methods: {
  64. getCarsLicenseList () {
  65. this.$u.apiurl.mycarsUrl()
  66. .then(res => {
  67. console.log(res)
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. @import './monthly.scss';
  75. </style>