content.hbs 5.64 KB
<form id="setting-form" name="setting-form">
    {{#userInfo}}
        <div class="setting-page inline-block">
            <input id="gender" type="hidden" value="{{info.gender}}">
            <input id="area_code" type="hidden" value="{{concat.area_code}}">
            <input id="zip_code" type="hidden" value="{{concat.zip_code}}">
            <input id="infoMobile" type="hidden" value="{{info.mobile}}">
            <div class="form-group">
                <label class="label-name">真实姓名:</label>
                <input id="username" class="input" type="text" placeholder="请输入2-12个汉字或英文"
                       value="{{info.username}}" minlength="2" maxlength="12">
                <span class="blue error-tips">{{> icon/error-round}}2-12个汉字或英文</span>
            </div>
            <div class="form-group">
                <label class="label-name">昵称:</label>
                <input id="nick_name" class="input" type="text" placeholder="中文、英文、数字、-和_组合"
                       value="{{info.nickname}}" maxlength="10">
                <span class="blue error-tips">{{> icon/error-round}}中文、英文、数字、-和_组合</span>
            </div>
            <div class="form-group">
                <label class="label-name">性别:</label>
                {{#each genders}}
                    <div class="input-radio inline-block operation" data-value="{{value}}">
                        {{> icon/radio}}
                        <label>{{name}}</label>
                    </div>
                {{/each}}
            </div>
            <div class="form-group">
                <label class="label-name">密码:</label>
                <input class="input no-edit" value="********">
                <a class="blue  operation" href="{{stepUrl}}/modifyPassword">修改</a>
            </div>
            <div class="form-group">
                <label class="label-name">手机:</label>
                {{#if info.verify_mobile}}
                    <input id="mobile" class="input no-edit" value="{{info.mobile}}">
                    <a class="blue  operation" href="{{stepUrl}}/modifyMobile">修改</a>
                {{else}}
                    <input class="input" type="text" placeholder="请绑定手机" disabled>
                    <a class="blue  operation" href="{{stepUrl}}/bindMobile">绑定</a>
                {{/if}}
            </div>
            <div class="form-group">
                <label class="label-name">邮箱:</label>
                {{#if info.verify_email}}
                    <input class="input no-edit" value="{{info.mobile}}">
                    <!--<a class="blue  operation" href="{{stepUrl}}/modifyEmail">修改</a>-->
                {{else}}
                    <input class="input" type="text" placeholder="请绑定邮箱" disabled>
                    <!--<a class="blue  operation" href="{{stepUrl}}/bindEmail">绑定</a>-->
                {{/if}}
            </div>
            <div class="form-group">
                <label class="label-name">出生日期:</label>
                {{#date}}
                    <select id="year" >
                        {{#each selectYear}}
                            {{#if isSelected}}
                                <option value="{{id}}" selected={{isSelected}}>{{value}}</option>
                            {{else}}
                                <option value="{{id}}" >{{value}}</option>
                            {{/if}}
                        {{/each}}
                    </select>

                    <select id="month" >
                        {{#each selectMonth}}
                            {{#if isSelected}}
                                <option value="{{id}}" selected={{isSelected}}>{{value}}</option>
                            {{else}}
                                <option value="{{id}}" >{{value}}</option>
                            {{/if}}
                        {{/each}}
                    </select>

                    <select id="day" >
                        {{#each selectDay}}
                            {{#if isSelected}}
                                <option value="{{id}}" selected={{isSelected}}>{{value}}</option>
                            {{else}}
                                <option value="{{id}}" >{{value}}</option>
                            {{/if}}
                        {{/each}}
                    </select>

                {{/date}}

                <span class="blue error-tips">{{> icon/error-round}}出生日期格式不对</span>
            </div>
            <div class="form-group-address">
                <label class="label-name">居住地址:</label>
                <div id="address"></div>
                <span class="blue error-tips">{{> icon/error-round}}请选择</span>
            </div>
            <div class="form-group">
                <label class="label-name" style="visibility: hidden">详细地址:</label>
                <input id="full_address" class="input big-input" type="text" placeholder="请填写详细地址"
                       maxlength="20" value="{{concat.full_address}}">
            </div>
            <div class="form-group">
                <span class="btn operation" id="save-settings">保存</span>
            </div>
        </div>
        <div class="user-icon inline-block">
            {{#if info.head_ico}}
                <div class="show-ico"><img src="{{info.head_ico}}"></div>
                <div class="edit-ico hide"></div>
            {{else}}
                <div class="show-ico"></div>
                <div class="edit-ico hide"></div>
            {{/if}}
        </div>
    {{/userInfo}}
</form>