2023-03-14 14:33:06 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-05-14 08:53:10 +00:00
|
|
|
<h1>欢迎</h1>
|
|
|
|
|
2023-03-14 14:33:06 +00:00
|
|
|
</div>
|
|
|
|
|
2023-05-14 08:53:10 +00:00
|
|
|
<div class="mt-3">
|
|
|
|
<p>用户名: {{ user.name }}</p>
|
|
|
|
<p>剩余流量: {{ user.traffic }}GB</p>
|
2023-03-14 14:33:06 +00:00
|
|
|
</div>
|
2023-05-14 08:53:10 +00:00
|
|
|
|
2023-03-14 14:33:06 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
import http from '../plugins/http'
|
|
|
|
|
|
|
|
|
|
|
|
const user = ref({
|
2023-05-14 08:53:10 +00:00
|
|
|
name: 'loading...',
|
|
|
|
traffic: ''
|
2023-03-14 14:33:06 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
http.get('user').then((res) => {
|
|
|
|
user.value = res.data
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|