Authored by 周奇琪

切换店铺的代理

... ... @@ -8,16 +8,16 @@ module.exports = {
authService.callLogin(user,password,res);
},
'/index/ajaxshop':function(req,res) {
var shopId = req.query.shops_id;
var shopId = Number(req.query.shops_id);
var cookie = req.session.gray;
//设置当前的店铺信息
if(req.session.user && req.session.user.auth) {
req.session.user.auth.shopId = shopId;
_.forEach(req.session.shopList,function(v,k) {
_.forEach(req.session.user.shopList,function(v,k) {
if(v.id === shopId) {
req.session.user.shopName = v.name;
}
req.session.user.auth.shopName = v.name;
req.session.user.auth.shopId = shopId;
};
});
}
... ...
... ... @@ -26,7 +26,7 @@ exports.change = function (shopId,cookie,callback) {
'headers':{
'cookie':cookie
},
'url':oldService.changeShops+'shops_id='+shopId
'url':oldService.changeShops+'?shops_id='+shopId
},callback);
}
... ...
... ... @@ -3,6 +3,6 @@ module.exports = {
login: oldSerDomain + '/account/api/v1/profile/login',
getResourceByPid: oldSerDomain + '/account/api/v1/profile/getResourceByPid',
getAllResByWebsite: oldSerDomain + '/account/api/v1/resources/getAllResByWebsite',
getShopList: 'http://172.16.8.204:8080/platform/ShopsRest/queryShopsByAdminPid',
getShopList: 'http://172.16.6.236:8080/platform/ShopsRest/queryShopsByAdminPid',
changeShops:'http://shops.yohobuy.com/index/ajaxshop'
};
\ No newline at end of file
... ...