Authored by shuaiguo

Merge branch 'hotfix/login_logic' into 'master'

Hotfix/login logic

login logic

See merge request !104
{
"name": "yoho-shop-manage",
"version": "1.0.43",
"version": "1.0.44",
"description": "",
"main": "app.js",
"scripts": {
... ...
... ... @@ -51,7 +51,7 @@ module.exports = (req, res, next) => {
shopsId: currentShop.shopsId,
shopId: currentShop.shopsId,
shop: currentShop.shopsId,
supplierId: currentShop.shopsBrands.length ? _.first(currentShop.shopsBrands).supplierId : 0,
supplierId: currentShop.shopsBrands.length ? (req.user.supplier_id ? req.user.supplier_id : _.first(currentShop.shopsBrands).supplierId) : 0,
platform_id: config.platform,
userId: req.user.uid
};
... ...