|
@@ -2,7 +2,7 @@
|
|
|
<view class="content">
|
|
|
<view class="indexTop">
|
|
|
<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
- <view class="indexnav">首页</view>
|
|
|
+ <view class="indexnav">{{wxOpenData.unionName}}</view>
|
|
|
</view>
|
|
|
<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
|
|
|
<view style="height: 43px;"></view>
|
|
@@ -38,7 +38,7 @@
|
|
|
<view class="huancheBtn">换车</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="carInfoBottom">
|
|
|
+ <!-- <view class="carInfoBottom">
|
|
|
<view class="carInfoBottomLine">
|
|
|
<view class="carInfoBottomLineTitle">下次保养里程</view>
|
|
|
<view class="carInfoBottomLineTxt" v-if="carInfo.nextCareMilage">{{carInfo.nextCareMilage}}</view>
|
|
@@ -53,7 +53,34 @@
|
|
|
<view class="carInfoBottomLineTitle">保养手册</view>
|
|
|
<view class="carInfoBottomLineTxt" @click="information">点击查看</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
+ <view class="bxBox">
|
|
|
+ <view class="bxline bxline1">
|
|
|
+ <img src="../../static/timg/car1.png" alt="" class="bxlineIcon">
|
|
|
+ <view class="bxlineTitle">保险</view>
|
|
|
+ <view class="bxlineMs1" v-if="carInfo.insuranceExpireDate">{{InsuranceExpireDate}}天到期</view>
|
|
|
+ <view class="bxlineMs2" v-else>--</view>
|
|
|
+ </view>
|
|
|
+ <view class="bxline bxline2">
|
|
|
+ <img src="../../static/timg/car2.png" alt="" class="bxlineIcon" style="width: 22rpx;height: 32rpx;">
|
|
|
+ <view class="bxlineTitle">下次保养</view>
|
|
|
+ <view class="bxlineMs1" v-if="carInfo.nextCareDate||carInfo.nextCareMilage">{{NextCareDate}}天后
|
|
|
+ <span v-if="carInfo.nextCareMilage">或{{carInfo.nextCareMilage}}km</span>
|
|
|
+ </view>
|
|
|
+ <view class="bxlineMs2" v-else>--</view>
|
|
|
+ </view>
|
|
|
+ <view class="bxline bxline1">
|
|
|
+ <img src="../../static/timg/car3.png" alt="" class="bxlineIcon" style="width: 23rpx;height: 30rpx;margin-top: 2rpx;">
|
|
|
+ <view class="bxlineTitle">年审</view>
|
|
|
+ <view class="bxlineMs1" v-if="carInfo.nextAuditDate">{{NextAuditDate}}天到期</view>
|
|
|
+ <view class="bxlineMs2" v-else>--</view>
|
|
|
+ </view>
|
|
|
+ <view class="bxline bxline2">
|
|
|
+ <img src="../../static/timg/car4.png" alt="" class="bxlineIcon" style="width: 33rpx;height: 24rpx;margin-top: 6rpx;">
|
|
|
+ <view class="bxlineTitle">保养手册</view>
|
|
|
+ <view class="bxlineMs2" @click="information">查看</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -119,7 +146,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 homeCardList.openMActivity.openCollectingList">
|
|
|
+ <view class="hotLine" @click="goJk(item)" v-for="(item,index) in homeCardList.openMActivity.openCollectingList" v-if="index<homeCardList.openMActivity.showCount">
|
|
|
<view class="hotLineTop">
|
|
|
<image class="hotLineTopImg" :src="item.img" mode=""></image>
|
|
|
<view class="hotlineTimebox">
|
|
@@ -132,13 +159,13 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <!-- 热门商品 -->
|
|
|
+ <!-- 热门车型 -->
|
|
|
<view class="" v-if="homeCardList">
|
|
|
<view class="Hot" v-if="homeCardList.openMGoods.showType==1">
|
|
|
<view class="hotTop">
|
|
|
<view class="hotLeft">
|
|
|
<view class="hotSx"></view>
|
|
|
- <view class="hottitle">热门商品</view>
|
|
|
+ <view class="hottitle">热门车型</view>
|
|
|
</view>
|
|
|
<view class="hotRight" @click="goShop">
|
|
|
<view class="hotMore">更多</view>
|
|
@@ -146,7 +173,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="hotGoodsLine" v-for="(item,index) in homeCardList.openMGoods.goodsList" @click="goGoods(item)">
|
|
|
+ <view class="hotGoodsLine" v-for="(item,index) in homeCardList.openMGoods.goodsList" @click="goGoods(item)" v-if="index<homeCardList.openMGoods.showCount">
|
|
|
<view>
|
|
|
<image :src="item.url" mode="" class="hotGoodsLineImg"></image>
|
|
|
</view>
|
|
@@ -160,7 +187,9 @@
|
|
|
<view class="goodsPrice">
|
|
|
<view class="goodsPrice1">{{item.saleLabel}}</view>
|
|
|
<view class="goodsPrice2">¥</view>
|
|
|
- <view class="goodsPrice3">{{item.salePrice}}</view>
|
|
|
+ <view class="goodsPrice3">{{item.salePrice}}
|
|
|
+ <span v-if="item.categoryIds=='7B97D114-C419-42B2-9C1E-0B4CA284CDA0'">万</span>
|
|
|
+ </view>
|
|
|
<view class="goodsPrice4" v-if="item.showLabel&&item.scribingPrice&&item.showLabel.indexOf('1')!=-1">¥{{item.scribingPrice}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -209,6 +238,9 @@
|
|
|
ext:'',
|
|
|
duration:500,
|
|
|
interval:3000,
|
|
|
+ InsuranceExpireDate:'',
|
|
|
+ NextCareDate:'',
|
|
|
+ NextAuditDate:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -243,6 +275,7 @@
|
|
|
this.uniLogin()
|
|
|
}
|
|
|
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
var indexaddcar = uni.getStorageSync("indexaddcar")
|
|
@@ -321,7 +354,27 @@
|
|
|
this.authorizShow=true;
|
|
|
}else{
|
|
|
if(item.bizType==0){
|
|
|
+ if(item.name=='新车'){ //
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'newCar'
|
|
|
+ })
|
|
|
+ }else if(item.name=='二手车'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'usedCar'
|
|
|
+ })
|
|
|
+ }else if(item.name=='爱车估价'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'evaluation'
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
+ else{
|
|
|
+ uni.showToast({
|
|
|
+ title: '敬请期待',
|
|
|
+ icon:'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ }
|
|
|
}else if(item.bizType==1){ //紧急救援
|
|
|
uni.navigateTo({
|
|
|
url:'rescue'
|
|
@@ -448,6 +501,9 @@
|
|
|
unionId:this.unionId
|
|
|
},'GET').then(res => {
|
|
|
this.wxOpenData=res.data;
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title:this.wxOpenData.miniAppName
|
|
|
+ })
|
|
|
|
|
|
that.queryHomeCardList()
|
|
|
//that.wxPhoneLogin()
|
|
@@ -513,10 +569,74 @@
|
|
|
}else{
|
|
|
this.carInfo=res.data[0]
|
|
|
this.$store.commit('mutationscarInfo', this.carInfo)
|
|
|
+ this.carInfo.insuranceExpireDate='2022-11-11';
|
|
|
+ this.carInfo.nextCareDate='2022-08-11';
|
|
|
+ this.carInfo.nextAuditDate='2022-08-13';
|
|
|
+ this.jsTime()
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ jsTime(){
|
|
|
+ if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.insuranceExpireDate.replace(/-/g, '/')).getTime()) || 0)) {
|
|
|
+ console.log("现在时间大于开始时间")
|
|
|
+ this.InsuranceExpireDate = 0
|
|
|
+ } else {
|
|
|
+ this.clock()
|
|
|
+ }
|
|
|
+ if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextCareDate.replace(/-/g, '/')).getTime()) || 0)) {
|
|
|
+ this.NextCareDate = 0
|
|
|
+ } else {
|
|
|
+ this.clock2()
|
|
|
+ }
|
|
|
+ if (Number(new Date().getTime()) > (Number(new Date(this.carInfo.nextAuditDate.replace(/-/g, '/')).getTime()) || 0)) {
|
|
|
+ this.NextAuditDate = 0
|
|
|
+ } else {
|
|
|
+ this.clock3()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clock () {
|
|
|
+ let _this = this
|
|
|
+ let today = new Date() // 当前时间
|
|
|
+ let h = today.getHours()
|
|
|
+ let m = today.getMinutes()
|
|
|
+ let s = today.getSeconds()
|
|
|
+ let stopTime = new Date(_this.carInfo.insuranceExpireDate.replace(/-/g, '/')) // 结束时间
|
|
|
+ let stopH = stopTime.getHours()
|
|
|
+ let stopM = stopTime.getMinutes()
|
|
|
+ let stopS = stopTime.getSeconds()
|
|
|
+ let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
|
|
|
+ let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
|
|
|
+ this.InsuranceExpireDate=shengyuD+1;
|
|
|
+
|
|
|
+ // setTimeout(_this.clock, 500)
|
|
|
+ },
|
|
|
+ clock2 () {
|
|
|
+ let _this = this
|
|
|
+ let today = new Date() // 当前时间
|
|
|
+ let h = today.getHours()
|
|
|
+ let m = today.getMinutes()
|
|
|
+ let s = today.getSeconds()
|
|
|
+ let stopTime = new Date(_this.carInfo.insuranceExpireDate.replace(/-/g, '/')) // 结束时间
|
|
|
+ let stopH = stopTime.getHours()
|
|
|
+ let stopM = stopTime.getMinutes()
|
|
|
+ let stopS = stopTime.getSeconds()
|
|
|
+ let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
|
|
|
+ let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
|
|
|
+ this.NextCareDate=shengyuD+1;
|
|
|
+
|
|
|
+ // setTimeout(_this.clock, 500)
|
|
|
+ },
|
|
|
+ clock3 () {
|
|
|
+ let _this = this
|
|
|
+ let today = new Date() // 当前时间
|
|
|
+ let stopTime = new Date(_this.carInfo.nextAuditDate.replace(/-/g, '/')) // 结束时间
|
|
|
+ let shenyu = stopTime.getTime() - today.getTime() // 倒计时毫秒数
|
|
|
+ let shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)) // 转换为天
|
|
|
+ this.NextAuditDate=shengyuD+1;
|
|
|
+
|
|
|
+ // setTimeout(_this.clock, 500)
|
|
|
+ },
|
|
|
queryManagerInfo(){
|
|
|
console.log("11")
|
|
|
this.$http('openHome/queryManagerInfo', {
|
|
@@ -574,6 +694,44 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+ .bxBox{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .bxline{
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ padding-top: 22rpx;
|
|
|
+ }
|
|
|
+ .bxline1{
|
|
|
+ width: 40%;
|
|
|
+ }
|
|
|
+ .bxline2{
|
|
|
+ width: 60%;
|
|
|
+ }
|
|
|
+ .bxlineTitle{
|
|
|
+ color: #333333;
|
|
|
+ font-size: 26rpx;
|
|
|
+ line-height: 37rpx;
|
|
|
+ padding-left: 10rpx;
|
|
|
+ }
|
|
|
+ .bxlineMs1{
|
|
|
+ line-height: 37rpx;
|
|
|
+ color: #D53533;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding-left: 12rpx;
|
|
|
+ }
|
|
|
+ .bxlineMs2{
|
|
|
+ line-height: 37rpx;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding-left: 12rpx;
|
|
|
+ }
|
|
|
+ .bxlineIcon{
|
|
|
+ width: 27rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ margin-left: 24rpx;
|
|
|
+ }
|
|
|
.indexTop{
|
|
|
background: #D53533;
|
|
|
width: 750rpx;
|
|
@@ -665,11 +823,12 @@
|
|
|
}
|
|
|
.carinfoBox{
|
|
|
width: 702rpx;
|
|
|
- height: 250rpx;
|
|
|
+ /* height: 250rpx; */
|
|
|
background: #FFFFFF;
|
|
|
border-radius: 10rpx;
|
|
|
margin-left: 24rpx;
|
|
|
overflow: hidden;
|
|
|
+ height: 270rpx;
|
|
|
|
|
|
}
|
|
|
.carinfoBox2{
|
|
@@ -685,7 +844,8 @@
|
|
|
|
|
|
}
|
|
|
.carinfoBox .carLogo{
|
|
|
- width: 72rpx;height: 72rpx;
|
|
|
+ width: 60rpx;height: 60rpx;
|
|
|
+ margin-top: 6rpx;
|
|
|
}
|
|
|
.carinfoBoxTop{
|
|
|
display: flex;
|