From a50c7ddf4a069dcf3846e61d09c27f3d85f39cee Mon Sep 17 00:00:00 2001 From: Menci Date: Tue, 23 Oct 2018 20:14:53 +0800 Subject: [PATCH] Fixed #61 --- views/login.ejs | 2 +- views/sign_up.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/login.ejs b/views/login.ejs index 023ba56..865f82f 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -50,7 +50,7 @@ function show_error(error) { $("#error").show(); } function success(session_id) { - window.location.href = <%- JSON.stringify(req.query.url || '/') %>; + window.location.href = location.protocol + '//' + location.host + <%- JSON.stringify(req.query.url || '/') %>; } function login() { password = md5($("#password").val() + "syzoj2_xxx"); diff --git a/views/sign_up.ejs b/views/sign_up.ejs index 9657738..9e9dfed 100644 --- a/views/sign_up.ejs +++ b/views/sign_up.ejs @@ -37,7 +37,7 @@ function show_error(error) { function success() { alert("注册成功!"); - window.location.href = <%- JSON.stringify(req.query.url || '/') %>; + window.location.href = location.protocol + '//' + location.host + <%- JSON.stringify(req.query.url || '/') %>; } function mail_required() {