<template>
	<fs-container>
		<template #default>
			<fs-cell-group arrow border gutter><fs-cell link="/pages/my/userInfo" title="个人信息"></fs-cell></fs-cell-group>
		</template>

		<template #footer>
			<view class="layout-box" v-if="token"><fs-button round full @click="handleLogout">退出登录</fs-button></view>
		</template>
	</fs-container>
</template>

<script setup>
import { computed } from 'vue'
import { useUserStore } from '@/stores/user'

const user = useUserStore()
const token = computed(() => user.token)

const handleLogout = () => {
	user.logout().then(res => {
		console.log('logout')
	})
}
</script>

<style></style>
