applyCx.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="content">
  3. <view class="contTop">
  4. <view class="brand">{{ urldata.brand }} {{ urldata.categoryName }} {{ urldata.name }}</view>
  5. <view class="partsCode">{{ urldata.partsCode }} | {{ urldata.specificationModel }}</view>
  6. </view>
  7. <view class="sycx">
  8. <img src="../../static/img/icon_car_def 2.png" alt="" class="sycxImg">
  9. <view class="sycxTxt">适用车型</view>
  10. </view>
  11. <view class="listBox">
  12. <view class="listLine" v-for="(item,index) in list">
  13. <view class="lineTop" @click="zhankai(item)">
  14. <view class="lineTopTxt">{{item.brand}}</view>
  15. <img src="../../static/img/icon_arrow_down.png" alt="" class="jiantou" v-if="!item.show">
  16. <img src="../../static/img/icon_arrow_up.png" alt="" class="jiantou" v-else>
  17. </view>
  18. <view class="lineCont" v-for="(v,i) in item.list" v-show="item.show">
  19. <view class="lie">{{v.title}}</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. id:'',
  30. list:'',
  31. urldata:''
  32. }
  33. },
  34. onLoad(opt) {
  35. this.urldata=opt;
  36. uni.showLoading({ title: '加载中'});
  37. this.$http('matchingByOpen/queryCarModelGroupByPartsID', {
  38. partsId:opt.id
  39. }, 'POST').then(res => {
  40. res.data.forEach(item=>{
  41. item.show=false;
  42. })
  43. this.list=res.data;
  44. uni.hideLoading();
  45. })
  46. },
  47. methods: {
  48. zhankai(item){
  49. item.show=!item.show;
  50. }
  51. }
  52. }
  53. </script>
  54. <style scoped>
  55. .content{
  56. min-height: 100vh;
  57. background: #F4F5F7;
  58. }
  59. .contTop{
  60. background: #ffffff;
  61. padding: 30rpx 24rpx;
  62. }
  63. .brand{
  64. color: #333333;
  65. line-height: 42rpx;
  66. font-size: 30rpx;
  67. font-family: PingFangSC-Medium, PingFang SC;
  68. font-weight: 500;
  69. }
  70. .partsCode{
  71. color: #999999;font-size: 24rpx;padding-top: 10rpx;
  72. line-height: 33rpx;
  73. }
  74. .sycx{
  75. display: flex;background: #ffffff;padding: 28rpx 24rpx;
  76. border-bottom: 1px solid #EEEEEE;
  77. margin-top: 20rpx;
  78. }
  79. .sycxImg{
  80. width: 42rpx;height: 42rpx;
  81. }
  82. .sycxTxt{
  83. color: #333333;font-size: 30rpx;
  84. line-height: 42rpx;padding-left: 16rpx;
  85. font-weight: 500;
  86. }
  87. .lineTop{
  88. background: #ffffff;display: flex;
  89. justify-content: space-between;
  90. padding: 30rpx 24rpx;
  91. }
  92. .jiantou{
  93. width: 24rpx;height: 24rpx;margin-top: 8rpx;
  94. }
  95. .lineTopTxt{
  96. font-size: 28rpx;
  97. font-family: PingFangSC-Medium, PingFang SC;
  98. font-weight: 500;
  99. color: #333333;
  100. }
  101. .lineCont{
  102. color: #666666;
  103. line-height: 40rpx;
  104. font-size: 28rpx;
  105. padding: 5rpx 24rpx;
  106. }
  107. .lie{
  108. padding: 15rpx 0;
  109. }
  110. </style>