<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 v-if="token">
			<view class="layout-box">
				<fs-button round full @click="handleLogout">退出登录</fs-button>
			</view>
		</template>
	</fs-container>
</template>

<script setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
import useUser from '@/hooks/useUser'

const store = useStore()

const token = computed(() => store.state.token)

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

<style>

</style>
