<template>
  <view class="school-information">
    <view class="school-information-list">
      <view
        class="school-information-item"
        v-for="item in schoolList"
        :key="item.id"
      >
        <view class="school-name">{{ item.schoolName }}</view>
        <view class="school-register-count"
          >初赛人数预估{{ item.totalPerson }}人</view
        >
      </view>
    </view>
  </view>
</template>

<script>
import { getAgentRegisterSchoolList } from "@/api/competition.js";
import Tip from "@/utils/tip.js";
export default {
  name: "school-information",
  data() {
    return {
      schoolList: [],
      id: "",
    };
  },
  onLoad(options) {
    this.id = options.id;
    this.getAgentRegisterSchoolList();
  },
  methods: {
    // 参赛学校列表
    async getAgentRegisterSchoolList() {
      const params = {
        id: this.id,
      };
      const { data, msg, status } = await getAgentRegisterSchoolList(params);
      if (status === 200) {
        // console.log(data, "getAgentRegisterSchoolList");
        this.schoolList = data;
      } else {
        Tip.error(msg);
      }
    },
  },
};
</script>

<style lang="less" scoped>
.school-information {
  .school-information-list {
    width: 100%;
    padding: 0 32rpx;
    padding-bottom: 250rpx;
    box-sizing: border-box;
    overflow: hidden;
    .school-information-item {
      width: 686rpx;
      height: 198rpx;
      background: #ffffff;
      box-shadow: 0rpx -4rpx 0rpx 0rpx #ff8e99,
        0px 4px 28px 0px rgba(123, 123, 123, 0.14);
      border-radius: 20rpx;
      margin-top: 48rpx;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      .school-name {
        font-size: 38rpx;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #333333;
      }
      .school-register-count {
        margin-top: 12rpx;
      }
    }
  }
}
</style>


