<template>
  <div class="message">
    <div>
      <h1 class="code" v-if="code === '200'" style="color: green;font-weight: bold;"><span>{{ msg }}</span></h1>
      <h1 class="code" v-if="code === '500'" style="color: red;font-weight: bold;"><span>{{ msg }}</span></h1>
    </div>
  </div>
</template>
<script>
export default {
  name: 'message',
  data() {
    return {
      code: '',
      msg: '',
    }
  },
  mounted() {
    const { code, msg } = this.$route.query
    if (code) {
      this.code = code
    }
    if (msg) {
      this.msg = msg
    }
  },
}
</script>
<style scoped>
.message {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
</style>
