2018-12-28 10:58:37 +00:00
{{include file="public/header" /}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
<!-- conntent start -->
2019-10-16 07:06:46 +00:00
< div class = "am-g my-content user-register-container" { { if ! empty ( $ user_register_bg_images ) } } style = "background: #FAFAFA url({{:AttachmentPathViewHandle($user_register_bg_images)}});" { { / if } } >
2019-05-16 10:42:22 +00:00
< div class = "am-container" >
<!-- 用户注册页面顶部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
< div class = "plugins-tag" >
< span > plugins_view_user_reg_info_top< / span >
2019-05-15 17:25:19 +00:00
< / div >
2019-05-16 10:42:22 +00:00
{{/if}}
{{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)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
2019-05-15 17:25:19 +00:00
2019-05-16 17:42:37 +00:00
< div class = "am-u-sm-12 am-u-md-6 am-u-lg-5 am-u-sm-centered" >
2019-05-16 10:42:22 +00:00
< div class = "register-container" >
< div class = "register-top" >
{{if MyC('home_user_login_state') eq 1}}
< span > 我已经注册,现在就< / span >
2019-05-31 16:11:34 +00:00
< a href = "{{:MyUrl('index/user/logininfo')}}" class = "am-btn am-btn-secondary am-btn-xs am-radius" > 登录< / a >
2019-05-16 10:42:22 +00:00
{{/if}}
2019-05-15 10:40:27 +00:00
2019-05-16 10:42:22 +00:00
<!-- 用户注册页面钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
< div class = "plugins-tag" >
< span > plugins_view_user_reg_info< / span >
< / div >
{{/if}}
{{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)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
< / div >
2019-05-15 10:40:27 +00:00
2019-05-16 10:42:22 +00:00
< div class = "register-content" >
{{if in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state')) or in_array('username', MyC('home_user_reg_state'))}}
< div data-am-widget = "tabs" class = "am-tabs am-tabs-d2" data-am-tabs = "{noSwipe: 1}" >
< ul class = "am-tabs-nav am-cf" >
{{if in_array('username', MyC('home_user_reg_state'))}}
< li class = "am-active" > < a href = "[data-tab-panel-0]" > 账号注册< / a > < / li >
{{/if}}
{{if in_array('sms', MyC('home_user_reg_state'))}}
< li class = "{{if !in_array('username', MyC('home_user_reg_state'))}}am-active{{/if}}" > < a href = "[data-tab-panel-1]" > 手机注册< / a > < / li >
{{/if}}
{{if in_array('email', MyC('home_user_reg_state'))}}
< li class = "{{if !in_array('username', MyC('home_user_reg_state')) and !in_array('sms', MyC('home_user_reg_state'))}}am-active{{/if}}" > < a href = "[data-tab-panel-2]" > 邮箱注册< / a > < / li >
{{/if}}
< / ul >
< div class = "am-tabs-bd" >
{{if in_array('username', MyC('home_user_reg_state'))}}
< div data-tab-panel-0 class = "am-tab-panel am-active" >
<!-- form start -->
< form class = "am-form form-validation-username" method = "post" action = "{{:MyUrl('index/user/reg')}}" request-type = "ajax-fun" request-value = "RegisterSuccessBack" >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 用户名< / label >
< input type = "text" name = "accounts" class = "am-radius" placeholder = "请使用字母、数字、下划线 2~18 个字符" pattern = "{{:lang('common_regex_username')}}" data-validation-message = "用户名格式由 字母数字下划线 2~18 个字符" required / >
< / div >
2019-05-15 10:40:27 +00:00
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 设置登录密码< / label >
< div class = "am-input-group am-input-group-sm" >
< input type = "password" name = "pwd" class = "am-radius" placeholder = "设置登录密码" pattern = "{{:lang('common_regex_pwd')}}" data-validation-message = "密码格式 6~18 个字符之间" required / >
< span class = "am-input-group-btn" >
< button class = "am-btn am-btn-default am-radius am-icon-eye eye-submit" type = "button" > < / button >
< / span >
< / div >
< / div >
2019-05-15 10:40:27 +00:00
2019-05-17 09:47:47 +00:00
{{if MyC('home_user_register_img_verify_state') eq 1}}
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 验证码< / label >
< div class = "am-input-group am-input-group-sm" >
2019-08-05 15:47:02 +00:00
< input type = "text" name = "verify" class = "am-radius" placeholder = "验证码" minlength = "4" maxlength = "4" data-validation-message = "请输入图片验证码" required / >
2019-05-16 10:42:22 +00:00
< span class = "am-input-group-btn" >
< span class = "am-btn am-btn-default am-radius form-verify" >
2019-05-17 10:11:13 +00:00
< img src = "{{:MyUrl('index/user/userverifyentry', ['type'=>'images_verify_reg'])}}" class = "am-radius c-p" id = "form-verify-img" onClick = "this.src=this.src+'#'+Math.random();" / >
< a href = "javascript:;" class = "form-verify-tips" onClick = "document.getElementById('form-verify-img').src='{{:MyUrl('index/user/userverifyentry', ['type'=>'images_verify_reg'])}}#'+Math.random();" > 更换一张< / a >
2019-05-16 10:42:22 +00:00
< / span >
< / span >
< / div >
< / div >
{{/if}}
2019-05-15 10:40:27 +00:00
2019-05-31 16:11:34 +00:00
{{if MyC('home_is_enable_userregister_agreement') eq 1}}
2019-06-03 10:46:27 +00:00
< div class = "agreement am-padding-horizontal-sm" >
2019-05-31 16:11:34 +00:00
< label class = "am-checkbox am-success c-p" >
< input type = "checkbox" value = "1" name = "is_agree_agreement" data-validation-message = "请同意注册协议" data-am-ucheck required / > 阅读并同意
< / label >
< a href = "{{:MyUrl('index/agreement/index', ['document'=>'userregister'])}}" target = "_blank" > 《服务协议》< / a >
< / div >
{{/if}}
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< input type = "hidden" name = "type" value = "username" / >
< button type = "submit" class = "am-btn am-btn-primary am-btn-block am-radius am-btn-sm btn-loading-example" data-am-loading = "{loadingText: '处理中...'}" > 注册< / button >
< / div >
< / form >
<!-- form end -->
< / div >
{{/if}}
{{if in_array('sms', MyC('home_user_reg_state'))}}
< div data-tab-panel-1 class = "am-tab-panel {{if !in_array('username', MyC('home_user_reg_state'))}}am-active{{/if}}" >
<!-- form start -->
< form class = "am-form form-validation-sms" method = "post" action = "{{:MyUrl('index/user/reg')}}" request-type = "ajax-fun" request-value = "RegisterSuccessBack" >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 手机号码< / label >
< input type = "text" name = "accounts" class = "am-radius" placeholder = "请输入手机号码" pattern = "{{:lang('common_regex_mobile')}}" data-validation-message = "手机号码格式错误" required / >
< / div >
2019-05-15 10:40:27 +00:00
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 验证码< / label >
< div class = "am-input-group am-input-group-sm" >
2019-08-05 15:47:02 +00:00
< input type = "number" name = "verify" class = "am-radius" placeholder = "验证码" minlength = "4" maxlength = "4" data-validation-message = "验证码格式 4 位数字" required / >
2019-05-16 10:42:22 +00:00
< span class = "am-input-group-btn" >
2020-06-03 05:38:13 +00:00
< button class = "am-btn am-btn-default am-radius btn-loading-example verify-submit" type = "button" data-am-loading = "{spinner:'circle-o-notch', loadingText:'发送中...'}" data-url = "{{:MyUrl('index/user/regverifysend')}}" data-verify = "{{:MyC('home_img_verify_state')}}" data-text = "获取验证码" data-send-text = "还有 {time} 秒" data-time = "{{:MyC('common_verify_interval_time', 30, true)}}" data-form-tag = "form.form-validation-sms" > 获取验证码< / button >
2019-05-16 10:42:22 +00:00
< / span >
< / div >
< / div >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 设置登录密码< / label >
< div class = "am-input-group am-input-group-sm" >
< input type = "password" name = "pwd" class = "am-radius" placeholder = "设置登录密码" pattern = "{{:lang('common_regex_pwd')}}" data-validation-message = "密码格式 6~18 个字符之间" required / >
< span class = "am-input-group-btn" >
< button class = "am-btn am-btn-default am-radius am-icon-eye eye-submit" type = "button" > < / button >
< / span >
< / div >
< / div >
2019-05-31 16:11:34 +00:00
{{if MyC('home_is_enable_userregister_agreement') eq 1}}
2019-06-03 10:46:27 +00:00
< div class = "agreement am-padding-horizontal-sm" >
2019-05-31 16:11:34 +00:00
< label class = "am-checkbox am-success c-p" >
< input type = "checkbox" value = "1" name = "is_agree_agreement" data-validation-message = "请同意注册协议" data-am-ucheck required / > 阅读并同意
< / label >
< a href = "{{:MyUrl('index/agreement/index', ['document'=>'userregister'])}}" target = "_blank" > 《服务协议》< / a >
< / div >
{{/if}}
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< input type = "hidden" name = "type" value = "sms" / >
< button type = "submit" class = "am-btn am-btn-primary am-btn-block am-radius am-btn-sm btn-loading-example" data-am-loading = "{loadingText: '处理中...'}" > 注册< / button >
< / div >
< / form >
<!-- form end -->
< / div >
{{/if}}
{{if in_array('email', MyC('home_user_reg_state'))}}
< div data-tab-panel-2 class = "am-tab-panel {{if !in_array('username', MyC('home_user_reg_state')) and !in_array('sms', MyC('home_user_reg_state'))}}am-active{{/if}}" >
<!-- form start -->
< form class = "am-form form-validation-email" method = "post" action = "{{:MyUrl('index/user/reg')}}" request-type = "ajax-fun" request-value = "RegisterSuccessBack" >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 电子邮箱< / label >
< input type = "email" name = "accounts" class = "am-radius" placeholder = "请输入电子邮箱" data-validation-message = "电子邮箱格式错误" required / >
< / div >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 验证码< / label >
< div class = "am-input-group am-input-group-sm" >
2019-08-05 15:47:02 +00:00
< input type = "number" name = "verify" class = "am-radius" placeholder = "验证码" minlength = "4" maxlength = "4" data-validation-message = "验证码格式 4 位数字" required / >
2019-05-16 10:42:22 +00:00
< span class = "am-input-group-btn" >
2020-06-03 05:38:13 +00:00
< button class = "am-btn am-btn-default am-radius btn-loading-example verify-submit" type = "button" data-am-loading = "{spinner:'circle-o-notch', loadingText:'发送中...'}" data-url = "{{:MyUrl('index/user/regverifysend')}}" data-verify = "{{:MyC('home_img_verify_state')}}" data-text = "获取验证码" data-send-text = "还有 {time} 秒" data-time = "{{:MyC('common_verify_interval_time', 30, true)}}" data-form-tag = "form.form-validation-email" > 获取验证码< / button >
2019-05-16 10:42:22 +00:00
< / span >
< / div >
< / div >
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< label > 设置登录密码< / label >
< div class = "am-input-group am-input-group-sm" >
< input type = "password" name = "pwd" class = "am-radius" placeholder = "设置登录密码" pattern = "{{:lang('common_regex_pwd')}}" data-validation-message = "密码格式 6~18 个字符之间" required / >
< span class = "am-input-group-btn" >
< button class = "am-btn am-btn-default am-radius am-icon-eye eye-submit" type = "button" > < / button >
< / span >
< / div >
< / div >
2019-05-15 10:40:27 +00:00
2019-05-31 16:11:34 +00:00
{{if MyC('home_is_enable_userregister_agreement') eq 1}}
2019-06-03 10:46:27 +00:00
< div class = "agreement am-padding-horizontal-sm" >
2019-05-31 16:11:34 +00:00
< label class = "am-checkbox am-success c-p" >
< input type = "checkbox" value = "1" name = "is_agree_agreement" data-validation-message = "请同意注册协议" data-am-ucheck required / > 阅读并同意
< / label >
< a href = "{{:MyUrl('index/agreement/index', ['document'=>'userregister'])}}" target = "_blank" > 《服务协议》< / a >
< / div >
{{/if}}
2019-05-16 10:42:22 +00:00
< div class = "am-form-group am-form-group-refreshing business-form-block" >
< input type = "hidden" name = "type" value = "email" / >
< button type = "submit" class = "am-btn am-btn-primary am-btn-block am-radius am-btn-sm btn-loading-example" data-am-loading = "{loadingText: '处理中...'}" > 注册< / button >
< / div >
< / form >
<!-- form end -->
< / div >
{{/if}}
2019-05-15 17:25:19 +00:00
< / div >
< / div >
2019-05-16 10:42:22 +00:00
{{if MyC('home_img_verify_state') eq 1}}
<!-- verify win start -->
< div class = "am-modal am-modal-no-btn" tabindex = "-1" id = "verify-win" >
< div class = "am-modal-dialog am-radius" >
< div class = "am-modal-hd" >
< a href = "javascript:;" class = "am-close am-close-spin" data-am-modal-close > × < / a >
< / div >
< div class = "am-modal-bd" >
< div class = "base" >
2019-08-05 15:47:02 +00:00
< input type = "text" placeholder = "图形验证码" minlength = "4" maxlength = "4" id = "verify-img-value" data-validation-message = "请输入有效的图形验证码" class = "am-form-field am-radius" / >
2019-05-16 10:42:22 +00:00
< div class = "am-fl" >
< img src = "{{:MyUrl('index/user/userverifyentry', ['type'=>'reg'])}}" class = "am-radius c-p" id = "verify-img" onClick = "this.src=this.src+'#'+Math.random();" / >
< a href = "javascript:;" class = "verify-tips" onClick = "document.getElementById('verify-img').src='{{:MyUrl('index/user/userverifyentry', ['type'=>'reg'])}}#'+Math.random();" > 看不清换一张< / a >
< / div >
< / div >
< button type = "button" class = "am-btn am-btn-secondary am-radius am-btn-sm block m-t-20 btn-loading-example verify-submit-win" data-am-loading = "{spinner:'circle-o-notch', loadingText:'发送中...'}" data-win = "1" > 确认< / button >
< / div >
< / div >
< / div >
<!-- verify win end -->
{{/if}}
{{else /}}
< div class = "am-text-center am-padding-vertical-lg register-close" > < i class = "am-icon-warning" > < / i > 暂时关闭了注册< / div >
{{/if}}
2019-05-15 17:25:19 +00:00
< / div >
< / div >
2019-05-15 10:40:27 +00:00
< / div >
2019-05-16 10:42:22 +00:00
<!-- 用户注册页面底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
< div class = "plugins-tag" >
< span > plugins_view_user_reg_info_bottom< / span >
< / div >
{{/if}}
{{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)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
2018-12-28 10:58:37 +00:00
< / div >
< / div >
<!-- conntent end -->
2019-05-15 17:25:19 +00:00
{{include file="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 = '{{$referer_url}}';
}, 1500);
} else {
2019-05-16 10:42:22 +00:00
$('.register-container form.am-form').find('button[type="submit"]').button('reset');
2019-05-15 17:25:19 +00:00
$.AMUI.progress.done();
Prompt(e.msg);
}
}
< / script >