2025-09-28
This commit is contained in:
@@ -1,26 +1,32 @@
|
||||
<template>
|
||||
<view class="my-container">
|
||||
|
||||
|
||||
{{user.real_name}}
|
||||
|
||||
<u-button @click="loginOut">退出登录</u-button>
|
||||
|
||||
|
||||
</view>
|
||||
<Tabbar></Tabbar>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
const user = ref()
|
||||
|
||||
onMounted(() => {
|
||||
user.value = uni.getStorageSync("user")
|
||||
|
||||
const loginOut = () => {
|
||||
uni.removeStorageSync("token")
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
const loginOut = () => {
|
||||
uni.removeStorageSync("token")
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.my-container {
|
||||
|
||||
}
|
||||
.my-container {}
|
||||
</style>
|
||||
Reference in New Issue
Block a user