Showing
1 changed file
with
10 additions
and
7 deletions
@@ -71,15 +71,18 @@ exports.callLogin = function(user, password, res) { | @@ -71,15 +71,18 @@ exports.callLogin = function(user, password, res) { | ||
71 | if (data && data.length > 0) { | 71 | if (data && data.length > 0) { |
72 | userInfo.auth.shopName = data[0].name; | 72 | userInfo.auth.shopName = data[0].name; |
73 | userInfo.auth.shopId = data[0].id; | 73 | userInfo.auth.shopId = data[0].id; |
74 | - } | 74 | + //设置店铺列表 |
75 | + userInfo.shopList = data; | ||
75 | 76 | ||
76 | - //设置店铺列表 | ||
77 | - userInfo.shopList = data; | 77 | + res.json({ |
78 | + code: 20003, | ||
79 | + data: userInfo | ||
80 | + }); | ||
81 | + }else{ | ||
82 | + res.json(errorMessage); | ||
83 | + } | ||
78 | 84 | ||
79 | - res.json({ | ||
80 | - code: 20003, | ||
81 | - data: userInfo | ||
82 | - }); | 85 | + |
83 | }); | 86 | }); |
84 | } | 87 | } |
85 | }); | 88 | }); |
-
Please register or login to post a comment