<template>
  <!-- 登录页面 -->
  <div class="login">
    <h1>登录</h1>

    <div v - if="data">
      <h2>{{ data.code }}</h2>
      <p>{{ data.content }}</p>
    </div>
    <button @click="getData">按钮</button>

  </div>
</template>

<script setup>
const getData = async () => {
    try {
        const response = await axios.get('/web/getWebsiteCategory');
        console.log(response.data);

        data.value = response.data;
    } catch (error) {
        console.error(error);
    }
}



</script>