<template>
  <div class="container">
    <div class="bgimg"></div>
    <div class="content">
      <div class="injectionListForm baseInfo">
        <div class="title">消息通知</div>
        <ul class="notice_list">
          <li @click="goPage('/patbleedlist?id='+item.send_user)" v-for="(item,index) in list">
              {{item.msg_content}}
              <p>{{item.ctime}}</p>
          </li>
        </ul>
      </div>
      <div class="footer">
        <div class="jbbtn" @click="goPage(-1)">返回</div>
      </div>
    </div>
  </div>
</template>

<script>
  import {
    Field,
    Picker,
    Search,
    Button
  } from 'mint-ui'

  export default {
    name: 'Index',
    components: {
      Field,
      Picker,
      Search,
      Button
    },
    data() {
      return {
        list: []
      }
    },
    methods: {
      goPage(path) {
        if(path==-1){
          this.$router.go(-1)
        }else{
          this.$router.push(path)
        }
      },
      getData() {
        this.$api.get_patient_doctor_notice_list().then(res=>{
          console.log(res.data.data)
          if (!res.data.code) {
            this.list = res.data.data.list
          }
        })
      }
    },
    created() {
      this.getData()
    }
  }

</script>

<style scoped lang="scss">
  .injectionListForm {
    width: 95%;
    margin: auto;
    margin-top: 1rem;
    background: #fff;
    padding: 1rem 0;
    border-radius: 8px;
    position: relative;
    .title{
      color: #333;
      margin-bottom: 1rem;
    }
    .notice_list{
      margin: 0;
      padding: 0 10px;
      min-height: 55vh;
      overflow: auto;
      li{
        list-style: none;
        padding: 10px 0;
        text-align: left;
        border-bottom: 1px solid #4472C4;
        font-size: 14px;
        p{
          color: #E3E3E3;
        }
        &:last-child{
          border: none;
        }
      }
    }
  }

  .footer {
    display: flex;
    flex-wrap: wrap;
    // margin-top:2rem;
    .jbbtn {
      width: 42%;
    }
  }

  .listItemContainer {
    display: flex;
    .listItem {
      width: 33%;
      /* height: 3.2rem; */
      line-height: 3.2rem;
      flex-direction: row;
      justify-content: space-between;
      border-bottom: 1px solid #ccc;
      font-size:1.1rem;
    }

    .listHeader{
      font-size:1.2rem;
    }
  }

</style>
