<?php /*a:1:{s:61:"D:\phpstudy\WWW\12xz\app\index\view/default\user\reginfo.html";i:1782629701;}*/ ?>
<?php echo ModuleInclude('public/header'); ?>

<!-- header top nav -->
<?php echo ModuleInclude('public/header_top_nav'); ?>

<!-- header simple nav -->
<?php echo ModuleInclude('public/header_nav_simple', [
    'title'       => MyLang('user.register_nav_title'),
    'is_go_home'  => '1',
    'is_sm_hide'  => '0'
]); ?>

<!-- conntent start  -->
<div class="am-g user-register-container theme-data-edit-event" data-module="user_register" <?php if(!empty($user_register_bg_images)): ?>style="background: <?php if(empty($user_register_bg_color)): ?>#f5f5f5<?php else: ?><?php echo htmlentities((string) $user_register_bg_color); ?><?php endif; ?> url(<?php echo AttachmentPathViewHandle($user_register_bg_images); ?>);"<?php endif; ?>>
    <div class="am-container">
        <!-- 用户注册页面顶部钩子 -->
        <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
            <div class="plugins-tag">
                <span>plugins_view_user_reg_info_top</span>
            </div>
        <?php endif; if(!empty($plugins_view_user_reg_info_top_data) and is_array($plugins_view_user_reg_info_top_data)): foreach($plugins_view_user_reg_info_top_data as $hook): if(is_string($hook) or is_int($hook)): ?>
                    <?php echo $hook; ?>
                <?php endif; ?>
            <?php endforeach; ?>
        <?php endif; ?>

        <div class="register-container am-margin-auto">
            <div class="register-top">
                <!-- 用户注册页面钩子 -->
                <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                    <div class="plugins-tag">
                        <span>plugins_view_user_reg_info</span>
                    </div>
                <?php endif; if(!empty($plugins_view_user_reg_info_data) and is_array($plugins_view_user_reg_info_data)): foreach($plugins_view_user_reg_info_data as $hook): if(is_string($hook) or is_int($hook)): ?>
                            <?php echo $hook; ?>
                        <?php endif; ?>
                    <?php endforeach; ?>
                <?php endif; ?>
            </div>

            <div class="am-radius-lg am-background-white">
                <?php if(count($home_user_reg_type) > 0): ?>
                    <?php echo ModuleInclude('user/reg_content'); else: ?>
                    <div class="am-text-center am-padding-vertical-lg register-close">
                        <i class="am-icon-warning"></i>
                        <span><?php echo MyLang('user.register_close_tips'); ?></span>
                    </div>
                <?php endif; ?>
            </div>
        </div>

        <!-- 用户注册页面底部钩子 -->
        <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
            <div class="plugins-tag">
                <span>plugins_view_user_reg_info_bottom</span>
            </div>
        <?php endif; if(!empty($plugins_view_user_reg_info_bottom_data) and is_array($plugins_view_user_reg_info_bottom_data)): foreach($plugins_view_user_reg_info_bottom_data as $hook): if(is_string($hook) or is_int($hook)): ?>
                    <?php echo $hook; ?>
                <?php endif; ?>
            <?php endforeach; ?>
        <?php endif; ?>
    </div>
</div>
<!-- conntent end  -->

<!-- 图片验证码  -->
<?php if(MyC('common_img_verify_state') == 1): ?>
    <?php echo ModuleInclude('user/images_verify', ['type'=>'user_reg']); ?>
<?php endif; ?>

<?php echo ModuleInclude('public/footer'); ?>
<script type="text/javascript">
// 注册成功回调
function RegisterSuccessBack(e)
{
    if(e.code == 0)
    {
        $.AMUI.progress.done();
        Prompt(e.msg, 'success');

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

        setTimeout(function()
        {
            window.location.href = '<?php echo htmlentities((string) $referer_url); ?>';
        }, 1500);
    } else {
        $('.register-container form.am-form').find('button[type="submit"]').button('reset');
        $.AMUI.progress.done();
        Prompt(e.msg);
    }
}
</script>