<template>
    <!-- 我的 -->
    <view class="user-info flex-row-start">
        <van-image
            round
            fit="cover"
            width="68px"
            height="68px"
            src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
        />

        <view class="right-info">
            <view class="pd-t-b-4">
                {{ memberStore.userInfo.userName }}
            </view>
            <view class="pd-t-b-4"> 18640300 </view>
            <view class="pd-t-b-4"> 安徽****公司 </view>
        </view>
    </view>
    <view class="van-hairline--top">
        <van-button type="primary" class="primary-lease" size="small" @click="onLogout">
            退出登录
        </van-button>
    </view>
</template>

<script setup>
import { useMemberStore } from '@/stores/index.js'
const memberStore = useMemberStore()
const onLogout = () => {
    uni.navigateTo({ url: '/pages/login/index' })
}
</script>

<style lang="scss" scoped>
.user-info {
    height: 120px;
    padding: 0 30px;
    color: #fff;
    background-color: #00a288;

    .right-info {
        margin-left: 10px;
    }
}

.van-hairline--top {
    width: 100%;
    margin-top: 10px;
    text-align: center;
}
</style>
