<template>
    <div class="container">
        <div class="topConten"></div>
        <div class="content">
            <div class="userIcon">
                <div :style="{backgroundImage:'url('+userInfo.icon+')'}"></div>
            </div>
            <div class="userName">{{userInfo.nickname}}</div>

            <div class="menuList">
                <router-link :to="{name:'myCollection',params:{isNext:1}}" class="menu-item">
                    <img src="@/assets/iinfo_icon_shouchang.png" alt="">
                    <span>我的收藏</span>
                </router-link>
                <router-link :to="{name:'myappoint',params:{isNext:1}}" class="menu-item">
                    <img src="@/assets/info_icon_yuyue.png" alt="">
                    <span>预约管理</span>
                </router-link>
                <router-link :to="{name:'myContact',params:{isNext:1}}" class="menu-item">
                    <img src="@/assets/info_icon_lianxi.png" alt="">
                    <span>联系记录</span>
                </router-link>
            </div>

            <div class="navList">
                <router-link :to="{name:'set',params:{isNext:1}}" class="nav-item">
                    <div class="title">修改资料</div>
                    <img src="@/assets/icon_inter.png" alt="">
                </router-link>
                <a :href="'tel:'+customerPhone" class="nav-item">
                    <div class="title">客服电话</div>
                    <div class="sub">{{customerPhone}}</div>
                    <img src="@/assets/icon_inter.png" alt="">
                </a>

                <router-link :to="{name:'feedback',params:{isNext:1}}" class="nav-item">
                    <div class="title">联系我们</div>
                    <img src="@/assets/icon_inter.png" alt="">
                </router-link>
                 <router-link :to="{name:'housingTrust',params:{isNext:1}}" class="nav-item">
                    <div class="title">房屋托管</div>
                    <img src="@/assets/icon_inter.png" alt="">
                </router-link>
                <router-link :to="{name:'about',params:{isNext:1}}" class="nav-item">
                    <div class="title">关于享租屋</div>
                    <img src="@/assets/icon_inter.png" alt="">
                </router-link>

            </div>
        </div>
    </div>
</template>
<script>
import GmButton from '@/components/Button'
import { mapState } from "vuex";
export default {
    data() {
        return {
            city: '上海市'
        }
    },
    created() {


    },
    computed: {
        ...mapState(["userInfo", 'customerPhone'])
    },
    methods: {

    },
    components: { GmButton }
}
</script>
<style lang="less" scoped>
.topConten {
    min-height: 2rem;
    height: 2rem;
    background: rgba(21, 168, 170, 1);
}

.content {
    background-color: #fff;
    border-radius: 0.6rem 0.6rem 0 0;
    transform: translateY(-0.6rem);
    display: flex;
    flex-direction: column;

    .userIcon {
        width: 1.28rem;
        height: 1.28rem;
        border-radius: 100%;
        border: 0.16rem solid rgba(255, 255, 255, 0.6);
        overflow: hidden;
        align-self: center;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);

        div {
            width: 100%;
            height: 100%;
            background-position: center center;
            background-size: cover;
            background-repeat: no-repeat;
        }
    }

    .userName {
        font-size: 0.4rem;
        font-weight: bold;
        color: rgba(0, 0, 0, 1);
        line-height: 0.56rem;
        margin-top: 1.08rem;
        align-self: center;
    }

    .menuList {
        margin: 0.6rem 0.3rem 0;
        height: 2.2rem;
        min-height: 2.2rem;
        background: rgba(255, 255, 255, 1);
        box-shadow: 0rem 0.12rem 0.24rem 0rem rgba(0, 0, 0, 0.08);
        border-radius: 0.24rem;
        display: flex;
        align-items: center;
        // justify-content: space-around;
        .menu-item {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            img {
                width: 0.84rem;
                height: 0.84rem;
            }
            span {
                font-size: 0.26rem;
                color: rgba(0, 0, 0, 1);
                line-height: 0.36rem;
            }
        }
    }

    .navList {
        margin-top: 0.62rem;
        padding: 0 0.3rem;

        .nav-item {
            display: flex;
            align-items: center;
            height: 1.2rem;

            .title {
                font-size: 0.28rem;
                color: rgba(0, 0, 0, 1);
                line-height: 0.4rem;
                flex-grow: 1;
            }

            .sub {
                font-size: 0.24rem;
                color: rgba(170, 172, 173, 1);
                line-height: 0.34rem;
            }

            img {
                width: 0.16rem;
                height: 0.28rem;
                margin-left: 0.16rem;
            }
            &:active {
                background: shade(#fff, 10%);
            }
        }
    }
}
</style>


