Authored by 陈轩

FIX bfcache 的问题

... ... @@ -16,6 +16,12 @@ const LOGIN_SUCCSS = '登录成功';
const VERIFY_ERROR = '校验失败';
exports.beforeIn = (req, res, next) => {
res.set({
'Cache-Control': 'no-cache, no-store, must-revalidate',
Pragma: 'no-cache',
Expires: 0
});
if (!req.xhr && req.user.uid) {
return res.redirect(req.cookies.refer);
}
... ...
... ... @@ -131,8 +131,8 @@ var page = {
})
.done(function(res) {
if (res.code === 200) {
// $nextBtn.off();
location.href = res.redirect;
$nextBtn.off();
return;
}
... ...
... ... @@ -76,7 +76,7 @@ var page = {
})
.done(function(data) {
if (data.code === 200) {
$nextBtn.off();
// $nextBtn.off();
location.href = data.redirect;
} else {
tip.show(data.message);
... ...
... ... @@ -56,7 +56,7 @@ var page = {
})
.done(function(res) {
if (res.code === 200) {
$nextBtn.off();
// $nextBtn.off();
location.href = res.redirect;
return;
}
... ...