
<view class="schedule">
    <view class="schedule-item {{procedure >= 1 ? 'show': ''}}">上传证件</view>
    <view class="schedule-item {{procedure >= 2 ? 'show': ''}}">确认信息</view>
    <view class="schedule-item {{procedure >= 3 ? 'show': ''}}">认证完成</view>
</view>

<!-- 上传证件 -->
<block wx:if="{{procedure == 1}}">
    <form bindsubmit="onSubmitIdcard">
        <view class="upds">
            <view class="upds-item" bind:tap="onUpd" data-type="front">
                <view class="upds-text">
                    <image class="upds-icon" src="/static/icons/add_icon.png" mode="widthFix"></image>
                    <view>上传身份证正面</view>
                </view>
                <image class="upds-back" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/08/22/1919a336eb5bf37f580747073402d838.png" mode="widthFix"></image>
                <image wx:if="{{front != null}}" class="upds-src" src="{{front.url}}" mode="aspectFit"></image>
            </view>
            <view class="upds-item" bind:tap="onUpd" data-type="back">
                <view class="upds-text">
                    <image class="upds-icon" src="/static/icons/add_icon.png" mode="widthFix"></image>
                    <view>上传身份证反面</view>
                </view>
                <image class="upds-back"  src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/08/22/2fba50d950d7569986177b26c229713b.png" mode="widthFix"></image>
                <image wx:if="{{back != null}}" class="upds-src" src="{{back.url}}" mode="aspectFit"></image>
            </view>
            <view class="idcard-input">
                <label>联系地址</label>
                <input placeholder="输入联系地址" name="address" />
            </view>
        </view>
        <view class="idcard-btn">
            <button size="default" form-type="submit">下一步</button>
        </view>
    </form>
</block>

<!-- 确认信息 -->
<block wx:if="{{procedure == 2}}">
    <view class="info-block">
        <view class="info-flex">
            <label>真实姓名</label>
            <view class="info-val">{{info.name || '-'}}</view>
        </view>
        <view class="info-flex">
            <label>证件号码</label>
            <view class="info-val">{{info.id_card || '-'}}</view>
        </view>
        <view class="info-flex">
            <label>联系地址</label>
            <view class="info-val">{{info.address || '-'}}</view>
        </view>
        <view class="info-flex">
            <label>上传时间</label>
            <view class="info-val">{{info.created_at || '-'}}</view>
        </view>
    </view>
    <view class="idcard-btn">
        <button size="default" bind:tap="onGetSignUrl">人脸认证</button>
    </view>
</block>

<!-- 认证完成 -->
<block wx:if="{{procedure == 3}}">
    <view class="idcard-success">
        <image class="idcard-icon" src="/static/icons/idcard_success.png" mode="widthFix"></image>
        <view class="idcard-title">认证完成</view>
        <view class="idcard-info">{{info.name}}({{info.id_card}})</view>
        <view class="idcard-subtitle">您已完成实名认证<text wx:if="{{!isSignContract}}">
        点击按钮进行签约开通会员</text></view>
        <view class="idcard-btn">
            <button size="default" bind:tap="onGetOpenVip">{{isSignContract ? '返回' : '开通会员'}}</button>
        </view>
    </view>
</block>
