Browse Source

Add missing script md5.js

pull/6/head
Menci 8 years ago
parent
commit
ae6b8dddf9
  1. 3
      views/login.ejs
  2. 3
      views/sign_up.ejs

3
views/login.ejs

@ -36,6 +36,7 @@
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.5.0/js/md5.min.js"></script>
<script type="text/javascript">
function key_login() {
if (event.keyCode == 13) {
@ -50,7 +51,7 @@ function success(session_id) {
window.location.href = "/";
}
function login() {
password = $.md5($("#password").val() + "syzoj2_xxx");
password = md5($("#password").val() + "syzoj2_xxx");
$("#login").addClass("loading");
$.ajax({
url: "/api/login",

3
views/sign_up.ejs

@ -31,6 +31,7 @@
<a id="sign_up" class="ui button" onclick="submit()">注册</a>
</form>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.5.0/js/md5.min.js"></script>
<script type="text/javascript">
function show_error(error) {
$("#error_info").text(error);
@ -45,7 +46,7 @@ function submit() {
show_error("两次输入的密码不一致");
return;
}
password = $.md5($("#password1").val() + "syzoj2_xxx")
password = md5($("#password1").val() + "syzoj2_xxx")
$("#sign_up").addClass("loading");
$.ajax({
url: '/api/sign_up',

Loading…
Cancel
Save