suit.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="mainCon">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'适配车型'"></homenav>
  4. <view class="innerCon" v-if="loading">
  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. loading:false,
  43. }
  44. },
  45. onLoad(opt) {
  46. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  47. this.id=opt.id;
  48. this.getDetail()
  49. },
  50. methods: {
  51. Ick(item){
  52. item.ck=!item.ck
  53. },
  54. getDetail(){
  55. uni.showLoading({ title: '加载中'});
  56. this.loading=false
  57. this.$http('partsByOpen/queryCarModelGroupByPartsID', {
  58. partsId:this.id,
  59. },'POST').then(res => {
  60. this.loading=true;
  61. uni.hideLoading();
  62. res.data.forEach(item=>{
  63. item.ck=false
  64. })
  65. this.list = res.data
  66. })
  67. this.$http('partsByOpen/queryPartDetail', {
  68. id:this.id,
  69. },'POST').then(res => {
  70. this.detail=res.data;
  71. })
  72. },
  73. }
  74. }
  75. </script>
  76. <style scoped>
  77. .detail-container{
  78. padding: 24rpx;
  79. }
  80. .info-2{
  81. font-size:24rpx;
  82. font-weight:400;
  83. color:rgba(153,153,153,1);
  84. }
  85. .title-2{
  86. font-size:30rpx;
  87. font-weight:500;
  88. color:rgba(51,51,51,1);
  89. }
  90. .spLogoLinebox{
  91. border-bottom: 1px solid #EEEEEE;
  92. }
  93. .spLogoLineImg{
  94. width: 44rpx;height: 44rpx;
  95. }
  96. .spLogoTitle{
  97. font-weight: 600;
  98. color: #333333;
  99. font-size: 28rpx;
  100. line-height: 44rpx;
  101. padding-left: 16rpx;
  102. }
  103. .spcarlineTop{
  104. display: flex;justify-content: space-between;
  105. background: #FFFFFF;
  106. padding: 30rpx 24rpx;font-weight: 500;
  107. color: #333333;font-size: 28rpx;
  108. }
  109. .spcarlineTopImg{
  110. width: 24rpx;height: 24rpx;
  111. }
  112. .spcarline{
  113. font-weight: 400;
  114. color: #666666;
  115. font-size: 28rpx;
  116. padding: 16rpx 24rpx;
  117. }
  118. .spLogoLine{
  119. display: flex;
  120. }
  121. </style>