<template>
	<view class="content">
		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'历史查询'"></homenav>
	  <view class="box">
		  <view class="historyLine" v-for="(item,index) in historyList" @click="goDetail(item)">
			<view class="historyLineCar">
				<image :src="item.logo" mode="" class="historylinecarImg"></image>
				<view class="historylinecar">{{item.title}}</view>
			</view>
		  	<view class="historyLineVin" v-if="item.ifVin">
				<view class="vinms">vin</view>
				<view class="vinNum">{{item.vin}}</view>
			</view>
		  </view>
		  <nodata v-if="historyList.length==0&&loading"></nodata>
	  </view>
	</view>
</template>

<script>
	import homenav from "../../components/homenav/nav.vue"
	import nodata from '../../components/nodata/nodata.vue'
	export default {
		components: {
			homenav,nodata
		},
		data() {
			return {
				historyList:[],
				iStatusBarHeight:'',
				loading:false,
			}
		},
		onLoad(opt) {
			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
            this.queryHistory()
		},
		methods: {
			goDetail(e){
				uni.navigateTo({
					url:'/pages/index/byItem?nLevelID='+e.nLevelID+'&logo='+e.logo+'&value='+e.title+'&id='+e.groupID+'&isVin='+e.ifVin+'&vin='+e.vin
				}) 
			},
           queryHistory(){
			 this.loading=false;
			 this.$http2('queryHistory', {
			   
			  
			  },'POST').then(res => {
					this.loading=true;		
					this.historyList=res.data
			 })
           },
		}
	}
</script>

<style scoped>
.box{
	padding: 0 24rpx;
}
.historylinecarImg{
	width: 46rpx;
	height: 46rpx;
}
.historylinecar{
	font-weight: 400;font-size: 26rpx;
	color: #1A1A1A;
	line-height: 46rpx;width: 636rpx;
}
.historyLine{
	
	padding: 30rpx 0;border-top: 1rpx solid #EEEEEE;
}
.historyLineCar{
	display: flex;justify-content: space-between;
}
.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;
}
.historyLineVin{
	display: flex;
}
.vinNum{
	font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
	color: #999999;line-height: 30rpx;
}
</style>
