Authored by lijing

页面返回按钮显示BUG

... ... @@ -43,7 +43,12 @@ const _msgDetail = (req, res, next) => {
info: result,
};
if (result && result.isCollar && result.isCollar === true) {
res.redirect('/home/message');
} else {
res.render('message-detail', options);
}
}).catch(next);
};
... ...
... ... @@ -81,6 +81,14 @@ const _detail = (result, id, couponData) => {
ticket: []
};
final.birthType = true;
if (result.data.list[0].body.is_collar === 'Y') {
final = {
isCollar: true
};
} else {
for (let coupon of couponData) {
final.ticket.push({
id: coupon.id ? coupon.id : '',
... ... @@ -91,6 +99,7 @@ const _detail = (result, id, couponData) => {
useLimit: coupon.useLimit
});
}
}
// 领取生日券消息
// final.coupons = [];
... ...
... ... @@ -10,6 +10,7 @@ const express = require('express');
const router = express.Router(); // eslint-disable-line
const auth = require('../../doraemon/middleware/auth');
const disableBFCache = require('../../doraemon/middleware/disable-BFCache');
const cRoot = './controllers';
const installment = require(cRoot + '/installment');
... ... @@ -90,7 +91,7 @@ router.get('/suggestSub', suggest.suggestSub);
router.post('/savesuggest', suggest.saveSuggest);
// 消息
router.use('/message', auth, message.index);
router.use('/message', auth, disableBFCache, message.index);
router.get('/messageDetail', auth, message.index);
router.post('/ajaxDelMes', auth, message.ajaxDelMes);
router.post('/pickCoupon', auth, message.pickCoupon);
... ...