<template>
    <view :loading="loading">
        <view class="mine">
            <view class="mine-header" @click="jump('basic')">
                <image mode="aspectFill" class="mine-header-head" src="/static/head.jpg" />
                <view class="mine-header-name hide-txt">灿能电力</view>
                <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
            </view>
            <view class="mine-nav" @click="jump('server')"
                style="border-bottom: none; box-shadow: 0 4rpx 8rpx #e7e7e74c;">
                <image mode="aspectFill" class="mine-nav-icon" src="/static/server.png" />
                <view class="mine-nav-label">客服</view>
                <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
            </view>
            <view class="mine-nav" @click="jump('setup')" style="margin-top:20rpx;border-bottom: none; ">
                <image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png" />
                <view class="mine-nav-label">设置</view>
                <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data () {
        return {
            loading: false
        }
    },
    methods: {
        init () {
        },
        jump (type) {
            switch (type) {
                case 'login':
                    uni.navigateTo({
                        url: `/pages/login/login`
                    })
                default:
                    uni.navigateTo({
                        url: `/pages/mine/${type}`
                    })
                    break;
            }
        }
    },
    onLoad () {
        this.init()
    },
}
</script>

<style lang="scss">
.mine {
    .mine-header {
        padding: 200rpx 34rpx 34rpx;
        display: flex;
        align-items: center;
        background: $uni-theme-white;
        margin-bottom: 20rpx;
        box-shadow: 0 4rpx 8rpx #e7e7e74c;

        .mine-header-head {
            margin-right: 30rpx;
            height: 128rpx;
            width: 128rpx;
            border-radius: $uni-theme-radius;
            overflow: hidden;
        }

        .mine-header-name {
            margin-right: 30rpx;
            flex: 1;
            font-size: 36rpx;
            color: #111;
            font-weight: 700;
        }
    }

    .mine-nav {
        padding: 34rpx;
        display: flex;
        align-items: center;
        background: $uni-theme-white;
        border-bottom: 1rpx solid #e8e8e8;

        &-icon {
            margin-right: 30rpx;
            height: 44rpx;
            width: 44rpx;
            border-radius: $uni-theme-radius;
            overflow: hidden;
        }

        &-label {
            margin-right: 30rpx;
            flex: 1;
            font-size: 28rpx;
            color: #111;
        }
    }
}
</style>