displacement.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'车型选择'"></homenav>
  4. <view class="top">
  5. <image :src="optdata.logo" mode="" class="logoImg"></image>
  6. <view class="topname">
  7. {{optdata.brand}}-{{optdata.manufactor}}-{{optdata.carSeries}}
  8. </view>
  9. </view>
  10. <view class="ts">
  11. <image src="../../static/img/icon_xuanze.png" mode="" class="tsImg"></image>
  12. <view class="tsTxt">请选择发动机排量</view>
  13. </view>
  14. <view class="linebox">
  15. <view class="line" v-for="(item,index) in displacementList" @click="gocarGroup(item)">
  16. {{item}}
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import homenav from "../../components/homenav/nav.vue"
  23. export default {
  24. components: {
  25. homenav
  26. },
  27. data() {
  28. return {
  29. brand:'',
  30. manufactor:'',
  31. carSeries:'',
  32. logo:'',
  33. optdata:'',
  34. displacementList:[],
  35. iStatusBarHeight:'',
  36. }
  37. },
  38. onLoad(opt) {
  39. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  40. this.optdata=opt;
  41. this.getdisplacementList()
  42. },
  43. methods: {
  44. getdisplacementList(){
  45. uni.showLoading({ title: '加载中'});
  46. this.$http('matchingByOpen/queryCarModelGroupPackage', {
  47. brand:this.optdata.brand,
  48. manufactor:this.optdata.manufactor,
  49. carSeries:this.optdata.carSeries
  50. },'POST').then(res => {
  51. uni.hideLoading();
  52. this.displacementList=res.data.displacementList
  53. })
  54. },
  55. gocarGroup(item){
  56. uni.navigateTo({
  57. url:'/pages/index/carGroup?logo='+this.optdata.logo+'&manufactor='+this.optdata.manufactor+'&carSeries='+this.optdata.carSeries+'&brand='+this.optdata.brand+'&displacement='+item
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style scoped>
  64. .content{
  65. background: #F4F5F7;min-height: 100vh;
  66. }
  67. .top{
  68. display: flex;background: #ffffff;
  69. padding: 34rpx 24rpx;
  70. }
  71. .logoImg{
  72. width: 46rpx;
  73. height: 46rpx;
  74. }
  75. .topname{
  76. font-weight: 500;font-size: 28rpx;line-height: 46rpx;
  77. color: #1A1A1A;padding-left: 20rpx;
  78. }
  79. .tsImg{
  80. width: 27rpx;height: 28rpx;
  81. }
  82. .tsTxt{
  83. font-weight: 500;padding-left: 16rpx;
  84. color: #FFBF35;
  85. font-size: 28rpx;line-height: 28rpx;
  86. }
  87. .ts{
  88. padding: 36rpx 24rpx;display: flex;
  89. }
  90. .linebox{
  91. background: #ffffff;
  92. padding: 0 24rpx;
  93. }
  94. .line{
  95. border-bottom: 1rpx solid #EEEEEE;
  96. font-weight: 400;
  97. color: #333333;font-size: 26rpx;
  98. padding: 30rpx 0;
  99. }
  100. </style>