<template>
  <view class="container">
    <view v-for="(item, index) in noticeList" :key="index">
      <view class="notice-item" @click="toNoticeDetail(item)">
        <image :src="item.image" class="notice-image"></image>
        <view class="notice-main">
          <view class="notice-title">{{ item.title }}</view>
          <view class="notice-content">{{ item.content }}</view>
          <view class="notice-date">
            <image
              src="https://static.hshuishang.com/time.png"
              class="date-image"
            ></image>
            <view>{{ item.date }}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import {
  request,
  picUrl,
  NavgateTo,
  menuButtonInfo,
} from "../../../utils/index";
export default {
  data() {
    return {
      noticeList: [
        {
          image: "https://static.hshuishang.com/test.png",
          title: "公告标题1",
          content: "公告内容",
          date: "2023-01-01",
        },
        {
          image: "https://static.hshuishang.com/test.png",
          title: "公告标题2",
          content: "公告内容",
          date: "2023-01-02",
        },
      ],
    };
  },
  methods: {
    toNoticeDetail(item) {
      NavgateTo("/packages/homeServer/noticeDetails/index");
    },
  },
};
</script>

<style>
@import url("./index.css");
</style>