Authored by 张孝茹

from

@@ -23,6 +23,7 @@ const thirdAccount = require('../data/third-account.json'); @@ -23,6 +23,7 @@ const thirdAccount = require('../data/third-account.json');
23 const auth = require('../models/auth-helper'); 23 const auth = require('../models/auth-helper');
24 24
25 const loginPage = `${config.siteUrl}/signin.html`; 25 const loginPage = `${config.siteUrl}/signin.html`;
  26 +const FROM = require('../../../config/from');
26 27
27 function doPassportCallback(openId, nickname, sourceType, req, res) { 28 function doPassportCallback(openId, nickname, sourceType, req, res) {
28 let shoppingKey = cookie.getShoppingKey(req); 29 let shoppingKey = cookie.getShoppingKey(req);
@@ -152,7 +153,7 @@ const common = { @@ -152,7 +153,7 @@ const common = {
152 153
153 let from = req.query.from; 154 let from = req.query.from;
154 155
155 - if (from) { 156 + if (from && FROM[from]) {
156 res.cookie('from', from, { 157 res.cookie('from', from, {
157 domain: 'yohobuy.com', 158 domain: 'yohobuy.com',
158 expires: new Date(Date.now() + 10 * 60 * 1000) 159 expires: new Date(Date.now() + 10 * 60 * 1000)
@@ -23,7 +23,7 @@ class PhoneService { @@ -23,7 +23,7 @@ class PhoneService {
23 area: param.area, 23 area: param.area,
24 code: param.code, 24 code: param.code,
25 shopping_key: param.shopping_key, 25 shopping_key: param.shopping_key,
26 - business_line: FROM[param.from] ? FROM[param.from].business_line : 'Yoho!Buy' 26 + business_line: FROM[param.from].business_line
27 }); 27 });
28 } 28 }
29 29