<template>
    <view class="content">
        <view class="files">
            <view class="name">
                性别
            </view>
            <view class="text">
                {{ recordsData.sex == 1 ? '男' : '女' }}
            </view>
        </view>
        <view class="files">
            <view class="name">
                年龄
            </view>
            <view class="text">
                {{ recordsData.age }}
            </view>
        </view>
        <view class="files">
            <view class="name">
                身高
            </view>
            <view class="text">
                {{ recordsData.height }}cm
            </view>
        </view>
        <view class="files">
            <view class="name">
                体重
            </view>
            <view class="text">
                {{ recordsData.weight }}kg
            </view>
        </view>
    </view>
</template>

<script>
    import { records } from '@/apis/interfaces/user'
    export default {
        data() {
            return {
                recordsData: ''
            };
        },
        mounted() {
            records().then(res => {
                this.recordsData = res
            })
        }
    };
</script>

<style lang="scss" scoped>
    .files {
        display: flex;
        padding: $padding;
        box-sizing: border-box;
        border-bottom: $border-color 2rpx solid;
        &:last-child {
            border: none;
        }
        .name {
            flex: 1;
        }
        .text {
            color: $text-gray;
        }
    }
</style>
