{{:ModuleInclude('public/header')}}

<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}

<!-- header simple nav -->
{{:ModuleInclude('public/header_nav_simple', [
    'title'       => MyLang('user.login_nav_title'),
    'is_go_home'  => '1',
    'is_sm_hide'  => '0'
])}}

<!-- conntent start  -->
<div class="am-g user-login-container am-padding-top-0 am-padding-bottom-0 theme-data-edit-event" data-module="user_login" {{if !empty($user_login_left_data['bg_color'])}}style="background-color:{{$user_login_left_data.bg_color}};"{{/if}}>
    <div class="user-login-background-img-container">
        {{if !empty($user_login_left_data['images'])}}
            <div class="user-login-background-img-content" style="background-image: url({{$user_login_left_data.images}});"></div>
        {{/if}}
        <div class="am-container">
            <div class="am-hide-sm-only am-u-md-6 am-u-lg-8 am-vertical-align am-text-center user-left-container">
                {{if !empty($user_login_left_data['images']) and !empty($user_login_left_data['url'])}}
                    <a href="{{$user_login_left_data.url}}" target="_blank"></a>
                {{/if}}
            </div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-4 user-right-container">
                <div class="login-top">
                    <!-- 用户登录页面顶部钩子 -->
                    {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                        <div class="plugins-tag">
                            <span>plugins_view_user_login_info_top</span>
                        </div>
                    {{/if}}
                    {{if !empty($plugins_view_user_login_info_top_data) and is_array($plugins_view_user_login_info_top_data)}}
                        {{foreach $plugins_view_user_login_info_top_data as $hook}}
                            {{if is_string($hook) or is_int($hook)}}
                                {{$hook|raw}}
                            {{/if}}
                        {{/foreach}}
                    {{/if}}
                </div>
                <div class="am-radius-lg am-background-white">
                    {{if count($home_user_login_type) gt 0}}
                        {{:ModuleInclude('user/login_content')}}
                    {{else /}}
                        <div class="am-text-center am-padding-vertical-lg register-close">
                            <i class="am-icon-warning"></i>
                            <span>{{:MyLang('user.login_close_tips')}}</span>
                        </div>
                    {{/if}}
                </div>
            </div>
        </div>
    </div>
</div>
<!-- conntent end  -->

<!-- 图片验证码  -->
{{if MyC('common_img_verify_state') eq 1}}
    {{:ModuleInclude('user/images_verify', ['type'=>'user_login'])}}
{{/if}}

{{:ModuleInclude('public/footer')}}
<script type="text/javascript">
// 登录成功回调
function LoginBackHandle(e)
{
    $.AMUI.progress.done();
    if(e.code == 0)
    {
        Prompt(e.msg, 'success');

        // 登录返回html处理
        if((e.data.body_html || null) != null)
        {
            $('body').append(e.data.body_html);
        }

        setTimeout(function()
        {
            window.location.href = '{{$referer_url}}';
        }, 1500);
    } else {
        $('form.am-form').find('button[type="submit"]').button('reset');
        Prompt(e.msg);
    }
}
</script>