ads.js
449 Bytes
/**
* Created by yoho on 2016/11/8.
*/
'use strict';
const helpers = global.yoho.helpers;
const crypto = global.yoho.crypto;
exports.index = (req, res) => {
let quhUnion = crypto.encryption('', decodeURI(req.query._QYH_UNION));
res.cookie('_QYH_UNION', quhUnion, {
domain: 'yohobuy.com',
expires: new Date(Date.now() + 24 * 60 * 60 * 1000)
});
return res.redirect(req.query.target || helpers.urlFormat('/'));
};