|
@@ -28,6 +28,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="jiyouBox" v-if="loading">
|
|
|
+ <view class="modelRemarkBox">
|
|
|
+ <view class="modelRemarkLine" @click="modelRemarkTab(1)" :class="{activeMr:modelRemarkNum==1}">0-10万公里</view>
|
|
|
+ <view class="modelRemarkLine" @click="modelRemarkTab(2)" :class="{activeMr:modelRemarkNum==2}">10万公里以上</view>
|
|
|
+ </view>
|
|
|
<view class="jiyouTop">
|
|
|
<view class="jiyoutopTitle">机油推荐</view>
|
|
|
<!-- <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view> -->
|
|
@@ -40,8 +44,8 @@
|
|
|
</view>
|
|
|
<view class="jyName">
|
|
|
<!-- <span class="best">最佳</span> -->
|
|
|
- <span class="jyNametxt">{{item.name}} | {{item.specificationModel}} </span>
|
|
|
- <!-- | {{item.partsCode}} -->
|
|
|
+ <span class="jyNametxt">{{item.name}} </span>
|
|
|
+ <!--| {{item.specificationModel}} | {{item.partsCode}} -->
|
|
|
</view>
|
|
|
<view class="ruleList">
|
|
|
<view class="ruleListSpan">{{item.modelRemark}}</view>
|
|
@@ -89,6 +93,8 @@
|
|
|
iStatusBarHeight:'',
|
|
|
loading:false,
|
|
|
spec:'',
|
|
|
+ modelRemarkNum:1,
|
|
|
+ oldMaintainPartList:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -99,6 +105,20 @@
|
|
|
this.queryOilInfoByGroupID()
|
|
|
},
|
|
|
methods: {
|
|
|
+ modelRemarkTab(num){
|
|
|
+ this.modelRemarkNum=num
|
|
|
+ if(num == 1){
|
|
|
+ //var arr=[]
|
|
|
+ /* this.oldMaintainPartList.forEach(item = >{
|
|
|
+
|
|
|
+ }) */
|
|
|
+ var name='0-10万公里'
|
|
|
+ this.MaintainPartList= this.oldMaintainPartList.filter(item => item.modelRemark.includes(name))
|
|
|
+ }else{
|
|
|
+ var name='10万公里以上'
|
|
|
+ this.MaintainPartList= this.oldMaintainPartList.filter(item => item.modelRemark.includes(name))
|
|
|
+ }
|
|
|
+ },
|
|
|
queryMaintainPartList(){
|
|
|
this.loading=false;
|
|
|
uni.showLoading({ title: '加载中'});
|
|
@@ -109,7 +129,9 @@
|
|
|
},'POST').then(res => {
|
|
|
this.loading=true;
|
|
|
uni.hideLoading();
|
|
|
- this.MaintainPartList=res.data
|
|
|
+ //this.MaintainPartList=res.data
|
|
|
+ this.oldMaintainPartList=res.data
|
|
|
+ this.modelRemarkTab(1)
|
|
|
})
|
|
|
},
|
|
|
queryOilInfoByGroupID(){
|
|
@@ -292,4 +314,18 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
|
|
|
line-height: 36rpx;
|
|
|
padding-right: 6rpx;
|
|
|
}
|
|
|
+ .modelRemarkBox{
|
|
|
+ display: flex;padding-bottom: 20rpx;
|
|
|
+ }
|
|
|
+ .modelRemarkLine{
|
|
|
+ background: #eee;
|
|
|
+ padding: 6rpx 20rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ margin-right: 30rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ }
|
|
|
+ .activeMr{
|
|
|
+ background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
|
|
|
+ color: #FFF;
|
|
|
+ }
|
|
|
</style>
|