<view class="container">
    <view class="profile-header">
        <view class="user-info">
            <image class="avatar" src="{{user.avatar}}" mode="aspectFill"></image>
            <view class="user-details">
                <view class="username">{{user.name}}</view>
                <view class="userid">ID: {{user.id}}</view>
            </view>
        </view>
        
        <view class="stats-card">
            <view class="stat-item">
                <view class="stat-val">{{user.stats.learning}}</view>
                <view class="stat-label">在学课程</view>
            </view>
            <view class="stat-item">
                <view class="stat-val">{{user.stats.coupons}}</view>
                <view class="stat-label">优惠券</view>
            </view>
            <view class="stat-item">
                <view class="stat-val">{{user.stats.hours}}h</view>
                <view class="stat-label">学习时长</view>
            </view>
        </view>
    </view>

    <view class="form-section">
        <view class="form-title-bar">
            <view class="blue-line"></view>
            <text class="form-title">录入学员信息</text>
        </view>

        <view class="form-group">
            <text class="label">学员姓名</text>
            <view class="input-wrap">
                <input type="text" placeholder="请输入真实姓名" bindinput="handleInput" data-field="name" value="{{formData.name}}"/>
            </view>
        </view>

        <view class="form-group">
            <text class="label">联系电话</text>
            <view class="input-wrap">
                <input type="number" placeholder="请输入手机号码" bindinput="handleInput" data-field="phone" value="{{formData.phone}}"/>
            </view>
        </view>

        <view class="form-row">
            <view class="form-group half">
                <text class="label">年龄</text>
                <view class="input-wrap">
                    <input type="number" placeholder="0" bindinput="handleInput" data-field="age" value="{{formData.age}}"/>
                </view>
            </view>
            <view class="form-group half">
                <text class="label">学历</text>
                <view class="input-wrap">
                    <input type="text" placeholder="学历" bindinput="handleInput" data-field="education" value="{{formData.education}}"/>
                </view>
            </view>
        </view>

        <view class="form-group">
            <text class="label">居住地址</text>
            <view class="input-wrap">
                <input type="text" placeholder="请输入详细地址" bindinput="handleInput" data-field="address" value="{{formData.address}}"/>
            </view>
        </view>

        <button class="submit-btn" bindtap="handleSubmit">保存信息</button>
    </view>
</view>
