Authored by hongweigao

对brandsAPI接口,做code判断

... ... @@ -90,12 +90,12 @@ const getBrandViewTop = channel => {
brandAds = [],
brandLogos = [];
if (res.data === 'false' || res.code !== 200 ) {
if (res.data === 'false' || res.code !== 200) {
return result;
}
// 头部10个品牌小图块 url
if (res.data && res.data instanceof Array && res.data[1].data && res.data[1].data.list) {
if (res.data && res.data instanceof Array && res.data[1].data && res.data[1].data.list) {
_.forEach(res.data[1].data.list, subValue => {
brandAds.push({
name: subValue.name,
... ... @@ -106,7 +106,7 @@ const getBrandViewTop = channel => {
}
// 头部品牌图块,广告位
if (res.data && res.data instanceof Array && res.data[0].data) {
if (res.data && res.data instanceof Array && res.data[0].data) {
_.forEach(res.data[0].data, (subValue, k) => {
let srcUrl;
... ... @@ -154,6 +154,7 @@ const getBrandViewList = (channel, start, length) => {
if (res.data === 'false' || res.code !== 200) {
return result;
}
// 品牌list A-Z 0-9
if (res.data && res.data.brands) {
... ... @@ -349,7 +350,7 @@ const getPlustarList = (brandType, gender) => {
brandsIds = [],
result = {brandsIds: [], data: {}};
if (list.data === 'false' || list.code !== 200 ) {
if (list.data === 'false' || list.code !== 200) {
return result;
}
if (list.data && list.data.data && list.data.data.list) {
... ...