suit.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="mainCon">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'适配车型'"></homenav>
  4. <view class="innerCon">
  5. <view class="detail-container">
  6. <h2 class="title-2">{{ detail.brand }} {{ detail.categoryName }} {{ detail.name }}</h2>
  7. <p class="info-2">{{ detail.partsCode }} | {{ detail.specificationModel }}</p>
  8. </view>
  9. <view style="height: 20rpx;background: #F4F5F7;"></view>
  10. <view class="detail-container mt10 spLogoLinebox">
  11. <view class="spLogoLine">
  12. <img src="../../static/img/home_icon_1.png" alt="" class="spLogoLineImg">
  13. <view class="spLogoTitle">适用车型</view>
  14. </view>
  15. </view>
  16. <view class="spcarlinebox" v-for="(item,index) in list">
  17. <view class="spcarlineTop" @click="Ick(item)">
  18. <view class="spcarlineCarBrad">{{item.brand}}</view>
  19. <img v-if="item.ck" src="../../static/img/icon_arrow_up.png" alt="" class="spcarlineTopImg">
  20. <img v-if="!item.ck" src="../../static/img/icon_arrow_down.png" alt="" class="spcarlineTopImg">
  21. </view>
  22. <view v-if="item.ck">
  23. <view class="spcarline" v-for="(v,i) in item.list">{{v.title}}</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import homenav from "../../components/homenav/nav.vue"
  31. import nodata from '../../components/nodata/nodata.vue'
  32. export default {
  33. components: {
  34. homenav,nodata
  35. },
  36. data() {
  37. return {
  38. detail: {},
  39. current: 0,
  40. list:'',
  41. iStatusBarHeight:'',
  42. }
  43. },
  44. onLoad(opt) {
  45. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  46. this.id=opt.id;
  47. this.getDetail()
  48. },
  49. methods: {
  50. Ick(item){
  51. item.ck=!item.ck
  52. },
  53. getDetail(){
  54. uni.showLoading({ title: '加载中'});
  55. this.$http('partsByOpen/queryCarModelGroupByPartsID', {
  56. partsId:this.id,
  57. },'POST').then(res => {
  58. uni.hideLoading();
  59. res.data.forEach(item=>{
  60. item.ck=false
  61. })
  62. this.list = res.data
  63. })
  64. this.$http('partsByOpen/queryPartDetail', {
  65. id:this.id,
  66. },'POST').then(res => {
  67. this.detail=res.data;
  68. })
  69. },
  70. }
  71. }
  72. </script>
  73. <style scoped>
  74. .detail-container{
  75. padding: 24rpx;
  76. }
  77. .info-2{
  78. font-size:24rpx;
  79. font-weight:400;
  80. color:rgba(153,153,153,1);
  81. }
  82. .title-2{
  83. font-size:30rpx;
  84. font-weight:500;
  85. color:rgba(51,51,51,1);
  86. }
  87. .spLogoLinebox{
  88. border-bottom: 1px solid #EEEEEE;
  89. }
  90. .spLogoLineImg{
  91. width: 44rpx;height: 44rpx;
  92. }
  93. .spLogoTitle{
  94. font-weight: 600;
  95. color: #333333;
  96. font-size: 28rpx;
  97. line-height: 44rpx;
  98. padding-left: 16rpx;
  99. }
  100. .spcarlineTop{
  101. display: flex;justify-content: space-between;
  102. background: #FFFFFF;
  103. padding: 30rpx 24rpx;font-weight: 500;
  104. color: #333333;font-size: 28rpx;
  105. }
  106. .spcarlineTopImg{
  107. width: 24rpx;height: 24rpx;
  108. }
  109. .spcarline{
  110. font-weight: 400;
  111. color: #666666;
  112. font-size: 28rpx;
  113. padding: 16rpx 24rpx;
  114. }
  115. .spLogoLine{
  116. display: flex;
  117. }
  118. </style>