123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <view class="content">
- <homenav :iStatusBarHeight="iStatusBarHeight" :title="'机油'"></homenav>
- <view class="box">
- <view class="historyLine">
- <view class="historyLogoBox">
- <image :src="optdata.logo" mode="" class="historylinecarImg"></image>
- </view>
- <view>
- <view class="historylinecar">{{optdata.value}}</view>
- <view class="historyLineVin" v-if="optdata.isVin==1">
- <view class="vinms">VIN</view>
- <view class="vinNum">{{optdata.vin}}</view>
- </view>
- </view>
- </view>
- </view>
- <view class="cont">
- <view class="topBox">
- <view class="topLine" @click="goby">
- <image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
- <view class="topName">保养周期</view>
- </view>
- <view class="topsx"></view>
- <view class="topLine" @click="gopz">
- <image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
- <view class="topName">车辆配置</view>
- </view>
- </view>
- <view class="jiyouBox" v-if="loading">
- <view class="jiyouTop">
- <view class="jiyoutopTitle">机油推荐</view>
- <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view>
- </view>
- <view class="jylineBox">
- <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
- <view class="jyimgBox">
- <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
- <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
- </view>
- <view class="jyName">
- <!-- <span class="best">最佳</span> -->
- <span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
- </view>
- </view>
- </view>
- <nodata v-if="MaintainPartList.length==0"></nodata>
- </view>
- </view>
- </view>
- </template>
- <script>
- import nodata from '../../components/nodata/nodata.vue'
- import homenav from "../../components/homenav/nav.vue"
- export default {
- components: {
- nodata,homenav
- },
- data() {
- return {
- optdata:'',
- MaintainPartList:[],
- oilusage:'',
- iStatusBarHeight:'',
- loading:false,
- }
- },
- onLoad(opt) {
- console.log(opt)
- this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
- this.optdata=opt;
- this.queryMaintainPartList()
- this.queryOilInfoByGroupID()
- },
- methods: {
- queryMaintainPartList(){
- this.loading=false;
- uni.showLoading({ title: '加载中'});
- this.$http('partsByOpen/queryMaintainPartList', {
- groupId:this.optdata.id,
- componentCode:'015001',
-
- },'POST').then(res => {
- this.loading=true;
- uni.hideLoading();
- this.MaintainPartList=res.data
- })
- },
- queryOilInfoByGroupID(){
- var that=this;
- this.$http('matchingByOpen/queryOilInfoByGroupID', {
- // mileage:'30000',
- groupId:this.optdata.id,
-
- },'POST').then(res => {
- var arr = res.data
- arr.forEach(item=>{
- if(item[0]=='机油'){
- that.oilusage=item[2]
- }
- })
- console.log(that.oilusage)
- })
- },
- goby(){
- uni.navigateTo({
- url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
- })
- },
- godetail(e){
- uni.navigateTo({
- url:'/pages/index/goodsDetail?id='+e.id
- })
- },
- gopz(){
- uni.navigateTo({
- url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
- })
- }
- }
- }
- </script>
- <style scoped>
- .content {
- min-height: 100vh;
- background: #F4F5F7;
- }
- .jyimgBox{
- border: 1px solid #EEEEEE; width: 302rpx;border-radius: 10rpx;
- }
- .box {
- padding: 0 24rpx;
- background: #ffffff;
- }
- .historylinecarImg{
- width: 54rpx;
- height: 54rpx;
- }
- .historyLogoBox{
- display: flex;align-items: center;
- padding-right: 14rpx;
- }
- .historylinecar {
- font-weight: 500;
- font-size: 26rpx;
- color: #1A1A1A;
- line-height: 46rpx;
- width: 636rpx;
- }
- .historyLine {
- display: flex;
- padding: 30rpx 0;
- /* border-top: 1rpx solid #EEEEEE; */
- }
- .cont {
- padding: 30rpx 24rpx;
- }
- .toplineImg{
- width: 35rpx;
- height: 34rpx;
- }
- .topName{
- line-height: 34rpx;font-weight: 400;
- color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
- }
- .topBox{
- width: 702rpx;
- height: 98rpx;
- background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
- border-radius: 16rpx;
- display: flex;justify-content: center;
- }
- .topsx{
- width: 2rpx;background: #ffffff;
- margin-left: 85rpx;margin-right: 85rpx;
- height: 54rpx;margin-top: 22rpx;
- }
- .topLine{
- display: flex;padding-top: 34rpx;
- }
- .jiyouTop{
- display: flex;justify-content: space-between;
- }
- .jiyouBox{
- margin-top: 30rpx;border-radius: 16rpx;
- background: #ffffff;padding: 30rpx;
- }
- .jiyoutopTitle{
- font-weight: 500;font-size: 28rpx;
- color: #1A1A1A;
- line-height: 40rpx;
- }
- .jyzl{
- font-weight: 400;line-height: 40rpx;
- color: #666666;font-size: 24rpx;
- }
- .jyimg{
- width: 302rpx;
- height: 302rpx;
- border-radius: 10rpx;
- }
- .jyline{
- width: 302rpx;padding-top: 30rpx;
- }
- .jyName{
- font-weight: 400;font-size: 22rpx;
- color: #1A1A1A;
- line-height:36rpx ;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- padding-top: 10rpx;
- }
- .best{
- color: #FF4F00;border-radius: 6rpx;
- padding: 0 8rpx;border: 1px solid #FF4F00;
- }
- .jylineBox{
- display: flex;justify-content: space-between;flex-wrap: wrap;
- }
- .historyLineVin{
- display: flex;background: #ffffff;
- }
- .historyLineCar{
- display: flex;justify-content: space-between;
- }
- .vinNum{
- font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
- color: #999999;line-height: 30rpx;
- }
- .vinms{
- width: 38rpx;
- height: 26rpx;
- background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
- border-radius: 4rpx;
- text-align: center;
- line-height: 26rpx;
- font-weight: 600;
- color: #FFFFFF;
- font-size: 18rpx;
- margin-top: 2rpx;
- }
- </style>
|