|
|
|
@@ -1,11 +1,12 @@ |
|
|
|
<div class="indexPanel"> |
|
|
|
<p class="indexTitle">完善信息,进入比赛</p> |
|
|
|
<div class="indexInfos"> |
|
|
|
<%= form_tag(oauth_auto_register_path, method: :post, class: 'form-inline search-form flex-1') do %> |
|
|
|
|
|
|
|
<%= form_tag('', method: :post, id: 'oauth_form', class: 'form-inline search-form flex-1', remote: true) do %> |
|
|
|
<%= hidden_field_tag 'callback_url', params[:callback_url] %> |
|
|
|
<div class="indexInfo"> |
|
|
|
<span>用户名:</span> |
|
|
|
<%= text_field_tag :mail, params[:login], placeholder: '请输入用户名', disabled: true, id: 'login' %> |
|
|
|
<%= text_field_tag :login, params[:login], placeholder: '请输入用户名', readonly: true, id: 'login' %> |
|
|
|
<p class="checkInfo loginCheck"><span></span></p> |
|
|
|
</div> |
|
|
|
<div class="indexInfo"> |
|
|
|
@@ -19,27 +20,25 @@ |
|
|
|
<p class="checkInfo passwordCheck"><span></span></p> |
|
|
|
</div> |
|
|
|
<div class="indexBtn"> |
|
|
|
<button class="indexSubmit" onclick="sureSubmit();">确定</button> |
|
|
|
<button type="button" class="indexSubmit" id="indexSubmit" onclick="submitdata();">确定</button> |
|
|
|
</div> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<script type="text/javascript"> |
|
|
|
function sureSubmit(){ |
|
|
|
function submitdata(){ |
|
|
|
var login = $("#login").val(); |
|
|
|
var email = $("#email").val(); |
|
|
|
var password = $("#password").val(); |
|
|
|
|
|
|
|
alert(email) |
|
|
|
|
|
|
|
if(!login){ |
|
|
|
$(".loginCheck span").html("请输入账号"); |
|
|
|
return; |
|
|
|
}else{ |
|
|
|
$(".loginCheck span").html(""); |
|
|
|
} |
|
|
|
if(!login){ |
|
|
|
$(".loginCheck span").html("请输入账号"); |
|
|
|
if(!email){ |
|
|
|
$(".emailCheck span").html("请输入绑定的邮箱"); |
|
|
|
return; |
|
|
|
}else{ |
|
|
|
$(".emailCheck span").html(""); |
|
|
|
@@ -50,5 +49,10 @@ |
|
|
|
}else{ |
|
|
|
$(".passwordCheck span").html(""); |
|
|
|
} |
|
|
|
$.ajax({ |
|
|
|
url: "<%= oauth_auto_register_path %>", |
|
|
|
data: $("#oauth_form").serialize(), |
|
|
|
type: 'post' |
|
|
|
}) |
|
|
|
} |
|
|
|
</script> |