...
|
...
|
@@ -60,15 +60,20 @@ const shop = { |
|
|
q.page = q.page || 1;
|
|
|
|
|
|
ShopData.getShopHeadData(domain, uid).then(result => {
|
|
|
|
|
|
data.banner = result;
|
|
|
q.brand = result.brandId;
|
|
|
q.shop_id = result.shopId;
|
|
|
nav.push({
|
|
|
name: result.name
|
|
|
});
|
|
|
if (result.brandId) {
|
|
|
q.brand = result.brandId;
|
|
|
q.shop_id = result.shopId;
|
|
|
nav.push({
|
|
|
name: result.name
|
|
|
});
|
|
|
} else {
|
|
|
res.status(404);
|
|
|
return Promise.reject('brand not found');
|
|
|
}
|
|
|
}).then(() => {
|
|
|
return Search.queryProductOfBrand(q).then(result => {
|
|
|
|
|
|
if (result && result.code === 200 && result.data) {
|
|
|
let ret = camelCase(result.data);
|
|
|
|
...
|
...
|
@@ -94,7 +99,7 @@ const shop = { |
|
|
order: q.order
|
|
|
}));
|
|
|
} else {
|
|
|
return Promise.reject('query product error');
|
|
|
return Promise.reject('query shop index error');
|
|
|
}
|
|
|
});
|
|
|
}).catch(next);
|
...
|
...
|
|