Authored by wenjiekong

修改

... ... @@ -40,10 +40,18 @@ const getUserLikeBrand = (uid) => {
});
};
const getTipConfig = (uid) => {
return api.get('', {
method: 'app.resources.config.clientInitConfig',
uid: uid
});
};
module.exports = {
getUserInfo,
getUserContactInfo,
getProviceCityInfo,
getUserHabitsInfo,
getUserLikeBrand
getUserLikeBrand,
getTipConfig
};
... ...
... ... @@ -231,6 +231,7 @@ const getUserInfo = (channel, uid) => {
return api.all([
headerModel.requestHeaderData(channel),
userApi.getUserInfo(uid),
userApi.getTipConfig(uid),
userApi.getUserContactInfo(uid),
userApi.getUserHabitsInfo(uid),
userApi.getUserLikeBrand(uid)
... ... @@ -356,6 +357,10 @@ const getUserInfo = (channel, uid) => {
}
if (result[2].code === 200) {
finalResult.isShowTip = parseInt(result[2].data.config.sn, 10);
}
if (result[3].code === 200) {
let contactInfo = result[2].data || '',
areaCode = contactInfo.areaCode || '';
... ... @@ -414,7 +419,7 @@ const getUserInfo = (channel, uid) => {
};
}
if (result[3].code === 200) {
if (result[4].code === 200) {
let habitsInfo = result[3].data || '',
dressHabitArr,
shoppingHabitArr;
... ... @@ -453,16 +458,17 @@ const getUserInfo = (channel, uid) => {
};
}
if (result[4].code === 200) {
if (result[5].code === 200) {
// let brandInfo = result[4].data || '';
// finalResult.favorite = {
// subTitle: '喜爱品牌',
// submitId: 'favorite-brand',
finalResult.favorite = {
subTitle: '喜爱品牌',
submitId: 'favorite-brand'
// likebrand: (substr($userLikeBrandInfo['likeBrandStr'], 0, 1) == ',') ?
// $userLikeBrandInfo['likeBrandStr'] : ',' . $userLikeBrandInfo['likeBrandStr'],
// favoriteBrands: $userLikeBrandInfo['favBrands'],
// hotBrands: $userLikeBrandInfo['hotBrands'],
// }
};
}
finalResult.headerData = headerData;
... ...