displacement.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. type:'',
  37. }
  38. },
  39. onLoad(opt) {
  40. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  41. this.optdata=opt;
  42. this.type=opt.type
  43. this.getdisplacementList()
  44. },
  45. methods: {
  46. getdisplacementList(){
  47. uni.showLoading({ title: '加载中'});
  48. this.$http('matchingByOpen/queryCarModelGroupPackage', {
  49. brand:this.optdata.brand,
  50. manufactor:this.optdata.manufactor,
  51. carSeries:this.optdata.carSeries
  52. },'POST').then(res => {
  53. uni.hideLoading();
  54. this.displacementList=res.data.displacementList
  55. })
  56. },
  57. gocarGroup(item){
  58. uni.navigateTo({
  59. url:'/pages/index/carGroup?logo='+this.optdata.logo+'&manufactor='+this.optdata.manufactor+'&carSeries='+this.optdata.carSeries+'&brand='+this.optdata.brand+'&displacement='+item+"&type="+this.type
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style scoped>
  66. .content{
  67. background: #F4F5F7;min-height: 100vh;
  68. }
  69. .top{
  70. display: flex;background: #ffffff;
  71. padding: 34rpx 24rpx;
  72. }
  73. .logoImg{
  74. width: 46rpx;
  75. height: 46rpx;
  76. }
  77. .topname{
  78. font-weight: 500;font-size: 28rpx;line-height: 46rpx;
  79. color: #1A1A1A;padding-left: 20rpx;
  80. }
  81. .tsImg{
  82. width: 27rpx;height: 28rpx;
  83. }
  84. .tsTxt{
  85. font-weight: 500;padding-left: 16rpx;
  86. color: #FFBF35;
  87. font-size: 28rpx;line-height: 28rpx;
  88. }
  89. .ts{
  90. padding: 36rpx 24rpx;display: flex;
  91. }
  92. .linebox{
  93. background: #ffffff;
  94. padding: 0 24rpx;
  95. }
  96. .line{
  97. border-bottom: 1rpx solid #EEEEEE;
  98. font-weight: 400;
  99. color: #333333;font-size: 26rpx;
  100. padding: 30rpx 0;
  101. }
  102. </style>