datail.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="content">
  3. <swiper v-if="detail.imgList&&detail.imgList.length" class="swiperview" :indicator-dots='true' indicator-active-color="#3F90F7">
  4. <swiper-item v-for="(item,index) in detail.imgList" :key="index">
  5. <img class="detail-swipe-img" :src="item.imgPath|| require('../../static/img/pic_def_bj.png')"
  6. alt="图片加载失败" @click="showImgList(detail.imgList,index)" mode="aspectFit">
  7. </swiper-item>
  8. </swiper>
  9. <view class="contTop">
  10. <view class="name">{{ detail.brand }} {{ detail.categoryName }} {{ detail.name }}</view>
  11. <view class="partsCode">{{ detail.partsCode }} | {{ detail.specificationModel }}</view>
  12. </view>
  13. <view class="sycx" @click="goApply">
  14. <view>适用车型</view>
  15. <img src="../../static/img/icon_jiantou@2x.png" alt="" class="sycyJt">
  16. </view>
  17. <view class="cont">
  18. <view class="contTitle">基本信息</view>
  19. <view class="contLine">
  20. <view class="contLineLeft">配件品质</view>
  21. <view class="contLineRight">{{ detail.partquality?detail.partquality==='0'?'原厂件':detail.partquality==='1'?'品牌件':'拆车件':'--' }}</view>
  22. </view>
  23. <view class="contLine">
  24. <view class="contLineLeft">出厂编码</view>
  25. <view class="contLineRight">{{ detail.factoryNumber }}</view>
  26. </view>
  27. <view class="contLine">
  28. <view class="contLineLeft">是否OE件</view>
  29. <view class="contLineRight">{{ detail.isoe==='1'?'是':'否' }}</view>
  30. </view>
  31. <view class="contLine">
  32. <view class="contLineLeft">包装规格</view>
  33. <view class="contLineRight">{{ detail.packagingSpecification }}</view>
  34. </view>
  35. <view class="contLine">
  36. <view class="contLineLeft">产地</view>
  37. <view class="contLineRight">{{ detail.placeProduction }}</view>
  38. </view>
  39. <view class="contLine">
  40. <view class="contLineLeft">单位</view>
  41. <view class="contLineRight">{{ detail.measurementUnit }}</view>
  42. </view>
  43. </view>
  44. <view class="cont" v-if="detail.extendDatas&&detail.extendDatas.length">
  45. <view class="contTitle">规格参数</view>
  46. <view class="contLine" v-for="item in detail.extendDatas" :key="item.key">
  47. <view class="contLineLeft">{{ item.key }}</view>
  48. <view class="contLineRight">{{ item.value }}</view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. id:'',
  58. detail:'',
  59. }
  60. },
  61. onLoad(opt) {
  62. this.id=opt.id;
  63. this.getData()
  64. },
  65. methods: {
  66. getData(){
  67. uni.showLoading({ title: '加载中'});
  68. this.$http('partsByOpen/queryPartDetail', {
  69. id:this.id
  70. }, 'POST').then(res => {
  71. this.detail=res.data
  72. uni.hideLoading();
  73. })
  74. },
  75. goApply(){
  76. uni.navigateTo({
  77. url:'applyCx?id='+this.id+'&brand='+this.detail.brand+'&categoryName='+this.detail.categoryName+'&name='+this.detail.name+'&partsCode='+this.detail.partsCode+'&specificationModel='+this.detail.specificationModel
  78. })
  79. },
  80. showImgList(){
  81. }
  82. }
  83. }
  84. </script>
  85. <style scoped>
  86. .content{
  87. min-height: 100vh;
  88. background: #F4F5F7;
  89. }
  90. .detail-swipe-img{
  91. width: 750rpx;
  92. height: 736rpx;
  93. }
  94. .swiperview{
  95. height: 736rpx;
  96. }
  97. .contTop{
  98. color: #999999;
  99. background: #FFFFFF;
  100. padding: 30rpx 24rpx;
  101. }
  102. .name{
  103. color: #333333;
  104. line-height: 42rpx;
  105. font-size: 30rpx;
  106. font-weight: 500;
  107. }
  108. .partsCode{
  109. font-size: 24rpx;padding-top: 16rpx;
  110. }
  111. .sycyJt{
  112. width: 12rpx;
  113. height: 20rpx;
  114. margin-top: 40rpx;
  115. }
  116. .sycx{
  117. background: #FFFFFF;
  118. display: flex;
  119. justify-content: space-between;
  120. margin-top: 20rpx;
  121. color: #333333;
  122. font-weight: 500;
  123. font-size: 30rpx;
  124. line-height: 98rpx;
  125. padding-left: 24rpx;
  126. padding-right: 24rpx;
  127. }
  128. .cont{
  129. background: #FFFFFF;
  130. padding: 28rpx 24rpx;
  131. margin-top: 20rpx;
  132. }
  133. .contTitle{
  134. color: #333333;
  135. font-size: 30rpx;
  136. font-weight: 500;
  137. }
  138. .contLine{
  139. display: flex;padding-top: 30rpx;
  140. }
  141. .contLineLeft{
  142. color: #333333;
  143. font-size: 26rpx;
  144. width: 140rpx;
  145. }
  146. .contLineRight{
  147. color: #666666;
  148. font-size: 26rpx;
  149. }
  150. </style>