<template>
<view>
 <proyearCarinfo :carname="canshu.popname" :carpic="canshu.popimg"></proyearCarinfo>
<proyearChoose :desc="canshu.pailiang" ifarrow=true></proyearChoose>
<proyearChoosetitle desc="选择生产年份"></proyearChoosetitle>
<view v-for="(i,j) in list" :key="j" @click="tochexing(i.nianfen,i.nianfen_id)">
<proyearChoose ifline=true :desc="i.nianfen"></proyearChoose>

</view>
<!-- <proyearChoose ifline=true desc="1999年生产"></proyearChoose>
<proyearChoose ifline=true desc="1999年生产"></proyearChoose>
<proyearChoose ifline=true desc="1999年生产"></proyearChoose>
<proyearChoose ifline=true desc="1999年生产"></proyearChoose>
<proyearChoose ifline=true desc="1999年生产"></proyearChoose> -->
</view>

</template>
<script>
import proyearCarinfo from "../../components/proyear/proyear-carinfo";
import proyearChoose from "../../components/proyear/proyear-choose";
import proyearChoosetitle from '../../components/proyear/proyear-choosetitle'
import {requestP} from "../../static/js/request"
export default {
  components: {
    proyearCarinfo,
    proyearChoose,
    proyearChoosetitle
  },
  data(){
    return {
      list:[],
        carname:[],
      carpic:[],
      canshu:{}
    }
  },
  methods:{
    tochexing(e,f){
       uni.navigateTo({
        url:
          "/pages/choosechexing/choosechexing?year=" +
          e +
          "&popname=" +
          this.canshu.popname +
          "&popimg=" +
          this.canshu.popimg +
          "&pinpaiid=" +
          this.canshu.pinpaiid +
          "&chexingid=" +
          this.canshu.chexingid +
          "&chexiid=" +
          this.canshu.chexiid+"&yearid="+f+"&pailiangid="+this.canshu.pailiangid
      });
    }
  },
  onLoad(e){
    console.log(e,'uear')
    this.canshu=e
    requestP({
      url:"car/get_nian_list",
      data:{
        brand_id:e.pinpaiid,
        chexi_id:e.chexiid,
        chexing_id:e.chexingid,
        pailiang_id:e.pailiangid
      }
    }).then((res)=>{
      console.log(res)
      this.list = res.data.data
    })
  }
};
</script>
<style lang="scss" scoped>
</style>