Authored by shuaiguo

Merge branch 'hotfix/login_logic' into 'master'

Hotfix/login logic

login logic

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