2025-09-12 17:23:03 +08:00
|
|
|
<template>
|
2025-09-16 16:05:34 +08:00
|
|
|
<view class="my-container">
|
2025-09-28 09:21:15 +08:00
|
|
|
|
|
|
|
|
{{user.real_name}}
|
|
|
|
|
|
2025-09-16 16:05:34 +08:00
|
|
|
<u-button @click="loginOut">退出登录</u-button>
|
2025-09-28 09:21:15 +08:00
|
|
|
|
2025-09-16 16:05:34 +08:00
|
|
|
</view>
|
2025-09-15 11:34:07 +08:00
|
|
|
<Tabbar></Tabbar>
|
2025-09-12 17:23:03 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-09-28 09:21:15 +08:00
|
|
|
import { onMounted, ref } from 'vue';
|
|
|
|
|
const user = ref()
|
2025-09-12 17:23:03 +08:00
|
|
|
|
2025-09-28 09:21:15 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
user.value = uni.getStorageSync("user")
|
2025-09-12 17:23:03 +08:00
|
|
|
|
2025-09-16 16:05:34 +08:00
|
|
|
})
|
2025-09-28 09:21:15 +08:00
|
|
|
|
|
|
|
|
const loginOut = () => {
|
|
|
|
|
uni.removeStorageSync("token")
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-09-16 16:05:34 +08:00
|
|
|
</script>
|
2025-09-12 17:23:03 +08:00
|
|
|
|
2025-09-16 16:05:34 +08:00
|
|
|
<style scoped lang="scss">
|
2025-09-28 09:21:15 +08:00
|
|
|
.my-container {}
|
2025-09-16 16:05:34 +08:00
|
|
|
</style>
|