Authored by 李奇

/evalute/queryReasonBySettingType接口session_key验证添加

... ... @@ -111,9 +111,12 @@ const saveEval = (req, res, next) => {
* @param next
*/
const queryReason = (req, res, next) => {
const uid = req.user.uid;
const type = req.body.type;
const encryptedUid = aes.encryptionUid(uid);
clientApi.queryReason(type)
clientApi.queryReason(uid, encryptedUid, type)
.then(result => {
res.json(result);
}).catch(next);
... ...
... ... @@ -97,9 +97,11 @@ const saveEval = (params) => {
* @param cvId
* @returns {*}
*/
const queryReason = (type) => {
const queryReason = (uid, encryptedUid, type) => {
const params = {
type
uid,
type,
encryptedUid
};
return api.post(urls.evalReason, params);
... ...
... ... @@ -36,6 +36,12 @@ var _fetchReason = (function() {
type: YOHO_CS
})
.done(function(res) {
if (res && res.code === 401) {
window.onbeforeunload = null;
return location.href = '//www.yohobuy.com/signin.html?refer=' + // eslint-disable-line
encodeURIComponent(location.href);
}
if (res.code === 200) {
cache = res.data;
render(cache);
... ...