Browse Source

Add missing script md5.js

master
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> </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"> <script type="text/javascript">
function key_login() { function key_login() {
if (event.keyCode == 13) { if (event.keyCode == 13) {
@ -50,7 +51,7 @@ function success(session_id) {
window.location.href = "/"; window.location.href = "/";
} }
function login() { function login() {
password = $.md5($("#password").val() + "syzoj2_xxx"); password = md5($("#password").val() + "syzoj2_xxx");
$("#login").addClass("loading"); $("#login").addClass("loading");
$.ajax({ $.ajax({
url: "/api/login", url: "/api/login",

3
views/sign_up.ejs

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

Loading…
Cancel
Save