<template>
    <div class="feedback_record">
      <div class="recordItem" v-for="item in recordList" @click="toDetail(item)">
        <div class="recordTitle">{{item.feedbackContent}}</div>
        <div class="recordTime">
          <span class="time">提交时间：{{item.feedbackTime}}</span>
          <span :class="item.status=='1'?'dhf':'yhf'">{{item.status=='1'?'待回复':'已回复'}}</span>
        </div>
      </div>
    </div>
</template>

<script>
import { parkFeedbackInfoList,getUserLocalStorageInfo } from "@/js_sdk/http.js";
export default {
  name: "feedback_record",
  data(){
    return{
      recordList:[
        // {name:'园区道路的积水问题还需要尽快处理。否则会影响路面通行的效率。',time:'2021-1-21  13:00',type:'待回复'},
        // {name:'上月水费不太对，怀疑水表有问题，请派人查看。',time:'2021-1-21  13:00',type:'已回复'},
        // {name:'园区道路的积水问题还需要尽快处理。否则会影响路面通行的效率。',time:'2021-1-21  13:00',type:'已回复'},
      ],
      form:{
        feedbackId: getUserLocalStorageInfo().userId
      },
    }
  },
  mounted(){
     this.getList()
  },
  onPullDownRefresh() {
    this.getList()
    setTimeout(function () {
      uni.stopPullDownRefresh();
    }, 1000);
  },
  methods:{
    getList(){
      parkFeedbackInfoList(this.form).then(res=>{
        if (res.length){
          this.recordList = res
        }
      })
    },
    toDetail(item){
      uni.navigateTo({
        url:'/pages/subPackages/minePages/feedback_detail?id=' + item.id
      })
    }
  }
}
</script>

<style lang="scss">
    .feedback_record{
      padding: 24rpx 32rpx;
      .recordItem{
        padding: 32rpx 0 22rpx 0;
        background: white;
        border-radius: 16rpx;
        margin-bottom: 24rpx;
        .recordTitle{
          line-height: 36rpx;
          color: #222222;
          font-size: 28rpx;
          padding: 0 32rpx 24rpx 32rpx;
          border-bottom: 1px solid #E8EDF5;
        }
        .recordTime{
          padding: 24rpx 32rpx 0 32rpx;
          display: flex;
          justify-content: space-between;
          .time{
            color: #888888;
            font-size: 28rpx;
          }
          .dhf{
            color: #E25100;
            font-size: 28rpx;
          }
          .yhf{
            color: #0365F9;
            font-size: 28rpx;
          }
        }
      }
    }
</style>
