<template>
  <view class="assess">
    <!-- <assessTop  v-on:changes="lx"></assessTop> -->
    <!-- <view v-if="leixing==2">
          <assessList username="M***A" proname="大众 途观" date="2019.08.22" detail="维修师傅态度很好，问的问题多余给你解释很棒，维修师傅态度很好，问的问题多余给你解释很棒，下次保养还回来！维修师傅态度很好，问的问题多余···" shop="养车工厂店" shoppic="../../static/img/shoppic1.png" stars=4></assessList>
    <assessList username="M***A" proname="大众 途观" date="2019.08.22" detail="维修师傅态度很好，问的问题多余给你解释很棒，维修师傅态度很好，问的问题多余给你解释很棒，下次保养还回来！维修师傅态度很好，问的问题多余···" shop="养车工厂店" shoppic="../../static/img/shoppic1.png" stars=4></assessList>
    </view>-->
    <!-- <view v-if="leixing==1">
        mbiofjbiohjbi 
    </view>-->
    <view v-for="(item,j) in pingjia" :key="j">
     <assessList
      :pingfen="item.xing"
      :username="item.uname"
      :userpic="item.avatar_url"
      proname="大众 途观"
      :date="item.pingjia_time"
      :detail="item.comment"
      :buydate="item.pay_time"
      shoppic="../../static/img/shoppic1.png"
:stars="item.xing"
      :pinglunpic="item.imgs"
    ></assessList>
    </view>
  </view>
</template>

<script>
import assessTop from "../../components/assess/assess-top";
import assessList from "../../components/assess/assess-list";
import { requestP } from "../../static/js/request";
export default {
  data() {
    return {
      leixing: 1,
      pingjia:[]
    };
  },
  methods: {
    lx(e) {
      console.log(e);
      this.leixing = e;
    }
  },
  onLoad(e) {
    requestP({
      url: "goods/get_pingjia_list",
      data:{
        goods_id:e.shopid,
        page:0
      }
    }).then(res => {
      console.log(res)
      this.pingjia = res.data.data.list;
    });
  },
  components: {
    assessTop,
    assessList
  }
};
</script>

<style lang="scss">
</style>
