|
@@ -199,15 +199,20 @@
|
|
|
<!-- 商品区 -->
|
|
|
<view class="goodsBox">
|
|
|
<view class="goodsTabBox">
|
|
|
- <view class="goodsTab " :class="{goodsACt:tabIndex==index}" v-for="(item,index) in appletHomeSetting.sortSettingList">
|
|
|
+ <!-- <view class="goodsTab " :class="{goodsACt:tabIndex==index}" v-for="(item,index) in appletHomeSetting.sortSettingList">
|
|
|
<view @click="tabFn(index,item.type)" v-if="item.type==2">热销商品</view>
|
|
|
<view @click="tabFn(index,item.type)" v-if="item.type==1">热门活动</view>
|
|
|
<view @click="tabFn(index,item.type)" v-if="item.type==3&&homeCardList.isShowMaintain==1">{{homeCardList.maintainTitle}}</view>
|
|
|
+ <image v-if="tabIndex==index" class="activeGoodsIcon" src="../../static/img2/activeGoods.png" mode=""></image>
|
|
|
+ </view> -->
|
|
|
+ <view class="goodsTab " :class="{goodsACt:tabIndex==index}" v-for="(item,index) in navigationList">
|
|
|
+ <view @click="tabFn(index,item.showType,item.id)">{{item.title}}</view>
|
|
|
+
|
|
|
<image v-if="tabIndex==index" class="activeGoodsIcon" src="../../static/img2/activeGoods.png" mode=""></image>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="goodsLIneBox" v-if="tabType==3">
|
|
|
+ <view class="goodsLIneBox" v-if="tabType==1">
|
|
|
<view class="goodsLine" @click="goMaintain(item)" v-for="(item,index) in byList">
|
|
|
<view class="goodsLeft">
|
|
|
<image class="goodsIcon" v-if="item.mainImgUrl" :src="item.mainImgUrl" mode=""></image>
|
|
@@ -215,8 +220,12 @@
|
|
|
</view>
|
|
|
<view class="goodsRight">
|
|
|
<view class="goodsRtop">
|
|
|
- <view class="goodsName">{{item.title}}</view>
|
|
|
- <view class="goodsMs">{{item.remarks}}</view>
|
|
|
+ <view style="display: flex;">
|
|
|
+ <view class="isRecommend" v-if="item.isRecommend==1">适配</view>
|
|
|
+ <view class="goodsName">{{item.title}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="goodsMs">{{item.showContent}}</view>
|
|
|
</view>
|
|
|
<view class="goodsRb">
|
|
|
<view class="goodsCBox">
|
|
@@ -226,7 +235,7 @@
|
|
|
</view>
|
|
|
<view class="goodsPriceBox" v-for="(v,i) in item.packageItems" v-if="v.isDefault==1">
|
|
|
<span class="goodsPrice11">¥</span>
|
|
|
- <span class="goodsPrice22">{{v.crossedPrice}}</span>
|
|
|
+ <span class="goodsPrice22">{{v.price}}</span>
|
|
|
<span class="goodsPrice33">/次¥{{v.money}}</span>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -235,9 +244,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="goodsKbox">
|
|
|
- <view class="goosK1" v-if="item.showOilType">{{item.showOilType}}</view>
|
|
|
- <view class="goosK2" v-if="item.showOilLevel">{{item.showOilLevel}}</view>
|
|
|
- <view class="goosK2" v-if="item.showFit">{{item.showFit}}</view>
|
|
|
+ <view class="goosK1" v-if="item.showOilType">{{item.showOilType}}</view>
|
|
|
+ <view class="goosK2" v-if="item.showOilLevel">机油等级|{{item.showOilLevel}}</view>
|
|
|
+ <view class="goosK2" v-if="item.showFit">适配粘度|{{item.showFit}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -248,7 +257,7 @@
|
|
|
<!-- 热门商品 -->
|
|
|
<view v-if="OpenMGoods&&tabType==2">
|
|
|
<view class="" v-if="OpenMGoods.goodsList&&OpenMGoods.goodsList.length>0">
|
|
|
- <view class="Hot" v-if="OpenMGoods.showType==1">
|
|
|
+ <view class="Hot" ><!-- v-if="OpenMGoods.showType==1" -->
|
|
|
<!-- <view class="hotTop">
|
|
|
<view class="hotLeft">
|
|
|
<view class="hotSx" :style="{background:'#'+themeColor}"></view>
|
|
@@ -259,8 +268,8 @@
|
|
|
<img src="../../static/timg/icon_arrow_right.png" alt="" class="hotMoreJt">
|
|
|
</view>
|
|
|
</view> -->
|
|
|
- <view v-if="OpenMGoods.showLayout==1">
|
|
|
- <view class="hotGoodsLine" v-for="(item,index) in OpenMGoods.goodsList" @click="goGoods(item)" v-if="index<OpenMGoods.showCount">
|
|
|
+ <view v-if="OpenMGoods.showForm==1">
|
|
|
+ <view class="hotGoodsLine" v-for="(item,index) in OpenMGoods.goodsList" @click="goGoods(item)">
|
|
|
<view>
|
|
|
<image :src="item.url" mode="" class="hotGoodsLineImg"></image>
|
|
|
</view>
|
|
@@ -285,8 +294,8 @@
|
|
|
|
|
|
|
|
|
<!-- 俩列的 -->
|
|
|
- <div class="goodsTwo" v-if="OpenMGoods.showLayout==2">
|
|
|
- <div class="goodsTwoLine" v-for="(item,index) in OpenMGoods.goodsList" @click="goGoods(item)" v-if="index<OpenMGoods.showCount">
|
|
|
+ <div class="goodsTwo" v-if="OpenMGoods.showForm==2">
|
|
|
+ <div class="goodsTwoLine" v-for="(item,index) in OpenMGoods.goodsList" @click="goGoods(item)">
|
|
|
<div class="goodsTwoImg">
|
|
|
<image :src="item.url" mode="" class="hotGoodsLineImg"></image>
|
|
|
</div>
|
|
@@ -311,7 +320,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 热门活动 -->
|
|
|
- <view v-if="openMActivity&&openMActivity.openCollectingList&&tabType==1">
|
|
|
+ <view v-if="openMActivity&&openMActivity.openCollectingList&&tabType==3">
|
|
|
<view class="Hot" v-if="openMActivity.openCollectingList.length>0">
|
|
|
<!-- <view class="hotTop">
|
|
|
<view class="hotLeft">
|
|
@@ -323,7 +332,7 @@
|
|
|
<img src="../../static/timg/icon_arrow_right.png" alt="" class="hotMoreJt">
|
|
|
</view>
|
|
|
</view> -->
|
|
|
- <view class="hotLine" @click="goJk(item)" v-for="(item,index) in openMActivity.openCollectingList" v-if="index<openMActivity.showCount">
|
|
|
+ <view class="hotLine" @click="goJk(item)" v-for="(item,index) in openMActivity.openCollectingList" >
|
|
|
<view class="hotLineTop">
|
|
|
<image class="hotLineTopImg" :src="item.img" mode=""></image>
|
|
|
<view class="hotlineTimebox">
|
|
@@ -437,10 +446,11 @@
|
|
|
appletHomeSetting:'',
|
|
|
activityModulesShow:false,
|
|
|
tabIndex:0,
|
|
|
- OpenMGoods:'',
|
|
|
- openMActivity:'',
|
|
|
+ OpenMGoods:[],
|
|
|
+ openMActivity:[],
|
|
|
tabType:'',
|
|
|
byList:'',
|
|
|
+ navigationList:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -537,34 +547,66 @@
|
|
|
},
|
|
|
methods: {
|
|
|
goMaintain(item){
|
|
|
+ uni.removeStorageSync('byCar');
|
|
|
uni.navigateTo({
|
|
|
url:'../subPack/maintainItem?maintainId='+item.id+'&isRecommend='+item.isRecommend
|
|
|
})
|
|
|
},
|
|
|
- tabData(){
|
|
|
- this.$http('openHome/queryOpenMGoods', {
|
|
|
- unionId:this.unionId
|
|
|
- },'GET').then(res => {
|
|
|
- this.OpenMGoods=res.data
|
|
|
-
|
|
|
- })
|
|
|
- this.$http('openHome/queryOpenMActivity', {
|
|
|
- unionId:this.unionId
|
|
|
- },'GET').then(res => {
|
|
|
- this.openMActivity=res.data
|
|
|
- })
|
|
|
+ tabData(showType,id){
|
|
|
+ console.log("showType==="+showType)
|
|
|
+ if(showType==3){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ this.$http('openHome/queryOpenMActivity', {
|
|
|
+ unionId:this.unionId,id:id
|
|
|
+ },'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.openMActivity=res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(showType==2){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ this.$http('openHome/queryOpenMGoods', {
|
|
|
+ unionId:this.unionId,id:id
|
|
|
+ },'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.OpenMGoods=res.data
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(showType==1){
|
|
|
+ this.getHomeList(id)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- getHomeList(){
|
|
|
- this.$http('openMaintain/home-list', {
|
|
|
- carId:this.carInfo.id
|
|
|
- },'GET').then(res => {
|
|
|
+ getHomeList(id){
|
|
|
+ if(this.carInfo){
|
|
|
+ var params={
|
|
|
+ carId:this.carInfo.id,
|
|
|
+ id:id
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ var params={
|
|
|
+ id:id
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ this.$http('openMaintain/home-list',params,'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
this.byList=res.data
|
|
|
})
|
|
|
},
|
|
|
- tabFn(index,tpye){
|
|
|
+ tabFn(index,type,id){
|
|
|
this.tabIndex=index
|
|
|
- this.tabType=tpye
|
|
|
+ this.tabType=type
|
|
|
+ this.tabData(type,id)
|
|
|
},
|
|
|
activityModulesHide(){
|
|
|
this.activityModulesShow=false
|
|
@@ -878,12 +920,10 @@
|
|
|
/* uni.navigateTo({
|
|
|
url:'shopList'
|
|
|
}) */
|
|
|
- /* uni.switchTab({
|
|
|
+ uni.switchTab({
|
|
|
url:'shopList'
|
|
|
- }) */
|
|
|
- uni.navigateTo({
|
|
|
- url:'../subPack/maintain'
|
|
|
- })
|
|
|
+ })
|
|
|
+
|
|
|
}else if(item.bizType==8){ //我的会员卡
|
|
|
uni.navigateTo({
|
|
|
url:'vipCard'
|
|
@@ -949,6 +989,11 @@
|
|
|
uni.navigateTo({
|
|
|
url:'../user/addCar/cailist'
|
|
|
})
|
|
|
+ }else if(item.bizType==20){
|
|
|
+
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'../subPack/maintain?maintainProjectID='+item.maintainProjectID
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1075,7 +1120,7 @@
|
|
|
this.$store.commit('mutationsuserInfo', that.wxOpenData.loginInfo.openUser)
|
|
|
this.userInfo=that.wxOpenData.loginInfo.openUser
|
|
|
that.queryManagerInfo()
|
|
|
- that.tabData()
|
|
|
+ //that.tabData()
|
|
|
uni.setStorage({
|
|
|
key: 'userInfo',
|
|
|
data: that.wxOpenData.loginInfo.openUser,
|
|
@@ -1262,7 +1307,7 @@
|
|
|
this.carInfo=''
|
|
|
}
|
|
|
this.$store.commit('mutationscarInfo', this.carInfo)
|
|
|
- this.getHomeList()
|
|
|
+ //this.getHomeList()
|
|
|
this.jsTime()
|
|
|
}
|
|
|
|
|
@@ -1359,11 +1404,21 @@
|
|
|
uni.hideLoading();
|
|
|
this.homeCardList=res.data;
|
|
|
this.appletHomeSetting=res.data.appletHomeSetting;
|
|
|
+ this.navigationList=res.data.navigationList
|
|
|
var appletHomeSetting=this.appletHomeSetting
|
|
|
- this.tabType=appletHomeSetting.sortSettingList[0].type
|
|
|
+ //this.tabType=appletHomeSetting.sortSettingList[0].type
|
|
|
+
|
|
|
if(this.homeCardList.activityModules.length>0){
|
|
|
this.activityModulesShow=true
|
|
|
}
|
|
|
+ //console.log("this.navigationList")
|
|
|
+ //console.log(this.navigationList)
|
|
|
+
|
|
|
+ if(this.navigationList.length>0){
|
|
|
+ this.tabType=this.navigationList[0].showType
|
|
|
+
|
|
|
+ this.tabData(this.navigationList[0].showType,this.navigationList[0].id)
|
|
|
+ }
|
|
|
|
|
|
uni.setStorage({
|
|
|
key: 'openMCar',
|
|
@@ -2119,4 +2174,14 @@ color: #EC0F0A;margin-right: 10rpx;
|
|
|
line-height: 40rpx;
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
+ .isRecommend{
|
|
|
+ font-size: 20rpx;
|
|
|
+ background: #EC0F0A;
|
|
|
+ height: 30rpx;
|
|
|
+ padding: 0 6rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ }
|
|
|
</style>
|