Authored by 姜枫

fix bug 794

... ... @@ -148,14 +148,24 @@ const _editInfo = (uid, nickName, username, gender, birthday)=> {
* @private
*/
const _editUserContactInfo = (uid, areaCode, mobile, fullAddress, zipCode)=> {
return api.get('', {
let param = {
method: 'web.passport.modifyUserContacts',
uid: uid,
area_code: areaCode,
mobile: mobile,
full_address: fullAddress,
zip_code: zipCode
}).then(result => result);
uid: uid
};
if (mobile) {
param.mobile = mobile;
}
if (zipCode) {
param.zip_code = zipCode;
}
if (areaCode) {
param.area_code = areaCode;
}
if (fullAddress) {
param.full_address = fullAddress;
}
return api.get('', param).then(result => result);
};
/**
... ... @@ -170,7 +180,9 @@ const editUserInfo = (uid, info) => {
_editUserContactInfo(uid, info.area_code, info.mobile, info.full_address, info.zip_code)
];
return Promise.all(getData).then(result => result);
return Promise.all(getData).then(result => {
return result;
});
};
/**
... ...