engineOil.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'机油'"></homenav>
  4. <view class="box">
  5. <view class="historyLine">
  6. <view class="historyLineCar">
  7. <image :src="optdata.logo" mode="" class="historylinecarImg"></image>
  8. <view class="historylinecar">{{optdata.value}}</view>
  9. </view>
  10. <view class="historyLineVin" v-if="optdata.isVin==1">
  11. <view class="vinms">vin</view>
  12. <view class="vinNum">{{optdata.vin}}</view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="cont">
  17. <view class="topBox">
  18. <view class="topLine" @click="goby">
  19. <image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
  20. <view class="topName">保养周期</view>
  21. </view>
  22. <view class="topsx"></view>
  23. <view class="topLine" @click="gopz">
  24. <image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
  25. <view class="topName">车辆配置</view>
  26. </view>
  27. </view>
  28. <view class="jiyouBox">
  29. <view class="jiyouTop">
  30. <view class="jiyoutopTitle">机油推荐</view>
  31. <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view>
  32. </view>
  33. <view class="jylineBox">
  34. <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
  35. <view class="jyimgBox">
  36. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  37. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  38. </view>
  39. <view class="jyName">
  40. <!-- <span class="best">最佳</span> -->
  41. <span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
  42. </view>
  43. </view>
  44. </view>
  45. <nodata v-if="MaintainPartList.length==0"></nodata>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import nodata from '../../components/nodata/nodata.vue'
  52. import homenav from "../../components/homenav/nav.vue"
  53. export default {
  54. components: {
  55. nodata,homenav
  56. },
  57. data() {
  58. return {
  59. optdata:'',
  60. MaintainPartList:[],
  61. oilusage:'',
  62. iStatusBarHeight:'',
  63. }
  64. },
  65. onLoad(opt) {
  66. console.log(opt)
  67. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  68. this.optdata=opt;
  69. this.queryMaintainPartList()
  70. this.queryOilInfoByGroupID()
  71. },
  72. methods: {
  73. queryMaintainPartList(){
  74. uni.showLoading({ title: '加载中'});
  75. this.$http('partsByOpen/queryMaintainPartList', {
  76. groupId:this.optdata.id,
  77. componentCode:'015001',
  78. },'POST').then(res => {
  79. uni.hideLoading();
  80. this.MaintainPartList=res.data
  81. })
  82. },
  83. queryOilInfoByGroupID(){
  84. var that=this;
  85. this.$http('matchingByOpen/queryOilInfoByGroupID', {
  86. // mileage:'30000',
  87. groupId:this.optdata.id,
  88. },'POST').then(res => {
  89. var arr = res.data
  90. arr.forEach(item=>{
  91. if(item[0]=='机油'){
  92. that.oilusage=item[2]
  93. }
  94. })
  95. console.log(that.oilusage)
  96. })
  97. },
  98. goby(){
  99. uni.navigateTo({
  100. url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
  101. })
  102. },
  103. godetail(e){
  104. uni.navigateTo({
  105. url:'/pages/index/goodsDetail?id='+e.id
  106. })
  107. },
  108. gopz(){
  109. uni.navigateTo({
  110. url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
  111. })
  112. }
  113. }
  114. }
  115. </script>
  116. <style scoped>
  117. .content {
  118. min-height: 100vh;
  119. background: #F4F5F7;
  120. }
  121. .box {
  122. padding: 0 24rpx;
  123. background: #ffffff;
  124. }
  125. .historylinecarImg {
  126. width: 46rpx;
  127. height: 46rpx;
  128. }
  129. .historylinecar {
  130. font-weight: 400;
  131. font-size: 26rpx;
  132. color: #1A1A1A;
  133. line-height: 46rpx;
  134. width: 636rpx;
  135. }
  136. .historyLine {
  137. padding: 30rpx 0;
  138. border-top: 1rpx solid #EEEEEE;
  139. }
  140. .cont {
  141. padding: 30rpx 24rpx;
  142. }
  143. .toplineImg{
  144. width: 35rpx;
  145. height: 34rpx;
  146. }
  147. .topName{
  148. line-height: 34rpx;font-weight: 400;
  149. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  150. }
  151. .topBox{
  152. width: 702rpx;
  153. height: 98rpx;
  154. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  155. border-radius: 16rpx;
  156. display: flex;justify-content: space-around;
  157. }
  158. .topsx{
  159. width: 2rpx;background: #ffffff;
  160. height: 54rpx;margin-top: 22rpx;
  161. }
  162. .topLine{
  163. display: flex;padding-top: 34rpx;
  164. }
  165. .jiyouTop{
  166. display: flex;justify-content: space-between;
  167. }
  168. .jiyouBox{
  169. margin-top: 30rpx;border-radius: 16rpx;
  170. background: #ffffff;padding: 30rpx;
  171. }
  172. .jiyoutopTitle{
  173. font-weight: 500;font-size: 28rpx;
  174. color: #1A1A1A;
  175. line-height: 40rpx;
  176. }
  177. .jyzl{
  178. font-weight: 400;line-height: 40rpx;
  179. color: #666666;font-size: 24rpx;
  180. }
  181. .jyimg{
  182. width: 302rpx;
  183. height: 302rpx;
  184. border-radius: 10rpx;
  185. }
  186. .jyline{
  187. width: 302rpx;padding-top: 30rpx;
  188. }
  189. .jyName{
  190. font-weight: 400;font-size: 22rpx;
  191. color: #1A1A1A;
  192. line-height:36rpx ;
  193. overflow: hidden;
  194. text-overflow: ellipsis;
  195. display: -webkit-box;
  196. -webkit-box-orient: vertical;
  197. -webkit-line-clamp: 2;
  198. padding-top: 10rpx;
  199. }
  200. .best{
  201. color: #FF4F00;border-radius: 6rpx;
  202. padding: 0 8rpx;border: 1px solid #FF4F00;
  203. }
  204. .jylineBox{
  205. display: flex;justify-content: space-between;flex-wrap: wrap;
  206. }
  207. .historyLineVin{
  208. display: flex;background: #ffffff;
  209. }
  210. .historyLineCar{
  211. display: flex;justify-content: space-between;
  212. }
  213. .vinNum{
  214. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  215. color: #999999;line-height: 30rpx;
  216. }
  217. .vinms{
  218. width: 38rpx;
  219. height: 26rpx;
  220. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  221. border-radius: 4rpx;
  222. text-align: center;
  223. line-height: 26rpx;
  224. font-weight: 600;
  225. color: #FFFFFF;
  226. font-size: 18rpx;
  227. margin-top: 2rpx;
  228. }
  229. </style>