Files
jurong_circle_front_app/pages/my/my.vue
2025-09-28 17:30:20 +08:00

33 lines
528 B
Vue

<template>
<view class="my-container">
<view v-if="user!=null">
{{user.real_name}}
</view>
<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'
})
}
</script>
<style scoped lang="scss">
.my-container {}
</style>