Authored by 徐炜

https

... ... @@ -87,7 +87,7 @@ const cookieHelper = {
getVal(req, k) {
return req.cookies[k];
}
}
};
/**
* 个人设置页面加载
... ... @@ -265,7 +265,7 @@ const modifyType = (req, res) => {
const edit = (req, res) => {
let type = req.params.type;
if (Number(cookieHelper.getVal(req, type + "_STEP")) !== 1) {
if (Number(cookieHelper.getVal(req, type + '_STEP')) !== 1) {
res.redirect(helpers.urlFormat('/me/setting/step1/' + type));
return;
}
... ... @@ -304,14 +304,14 @@ const edit = (req, res) => {
const success = (req, res) => {
let type = req.params.type;
let step = Number(cookieHelper.getVal(req, type + "_STEP")) || 0;
let step = Number(cookieHelper.getVal(req, type + '_STEP')) || 0;
if (step !== 2) {
res.redirect(helpers.urlFormat('/me/setting/step' + (step + 1) + '/' + type));
return;
}
cookieHelper.setVal(res, type + "_STEP", 0, {
cookieHelper.setVal(res, type + '_STEP', 0, {
maxAge: -1
});
... ... @@ -363,7 +363,7 @@ const validate1 = (req, res) => {
}
if (a) {
cookieHelper.setVal(res, req.body.type + "_STEP", 1);
cookieHelper.setVal(res, req.body.type + '_STEP', 1);
res.send(a);
}
})();
... ... @@ -382,7 +382,7 @@ const validate2 = (req, res) => {
let a = yield accountModel.changePwd(uid, body.password);
if (a.code === 200) {
cookieHelper.setVal(res, body.type + "_STEP", 2);
cookieHelper.setVal(res, body.type + '_STEP', 2);
res.send(a);
}
... ... @@ -391,7 +391,7 @@ const validate2 = (req, res) => {
let b = yield accountModel.modifyVerifyMobile(uid, body.area, body.mobile);
if (a.code === 200 && b.code === 200) {
cookieHelper.setVal(res, body.type + "_STEP", 2);
cookieHelper.setVal(res, body.type + '_STEP', 2);
res.send({
code: 200,
data: {}
... ...