Authored by wenjiekong

测试修改编辑个人资料

... ... @@ -203,11 +203,6 @@ const formatDate = (y, m, d) => {
return y + '-' + m + '-' + d;
};
const isEmpty = (value) => {
return (Array.isArray(value) && value.length === 0) ||
(Object.prototype.isPrototypeOf(value) && Object.keys(value).length === 0);
};
const getHotBrands = (brandList) => {
let hotBrands = [],
i = 20;
... ... @@ -420,11 +415,11 @@ const getUserInfo = (channel, uid) => {
areaOpts = [{value: 0, text: '请选择区县'}];
if (areaCodeStr.length < 2) {
proviceOpts = yield getProviceCityInfo(0);
proviceOpts = yield getProviceCityInfo(0);
}
if (areaCodeStr.length >= 2) {
proviceOpts = yield getProviceCityInfo(0, areaCodeStr.substr(0, 2));
proviceOpts = yield getProviceCityInfo(0, areaCodeStr.substr(0, 2));
}
if (areaCodeStr.length >= 4) {
... ... @@ -510,7 +505,7 @@ const getUserInfo = (channel, uid) => {
if (habitsInfo.dress) {
dressArr = habitsInfo.dress.split(',');
for (let value of dressHabitArr) {
for (var i = 0; i < dressArr.length; i++) {
for (let i = 0; i < dressArr.length; i++) {
if (value.value === parseInt(dressArr[i], 0)) {
value.isChecked = true;
}
... ... @@ -541,7 +536,7 @@ const getUserInfo = (channel, uid) => {
let hotBrands = getHotBrands(brandList);
if (likeBrandStr !== '') {
if (likeBrandStr !== '') {
let brandArr = likeBrandStr.split(',');
for (let i = 0; i < brandArr.length; i++) {
... ... @@ -616,8 +611,8 @@ const editUserContactInfo = (req, uid) => {
data: ''
};
return respData;
}
}
respData = yield userApi.editUserContactInfo(contactInfo);
return respData;
})();
... ... @@ -648,7 +643,7 @@ const editUserHabitsInfo = (req, uid) => {
return respData;
}
respData = yield userApi.editUserHabitsInfo(habitsInfo);
return respData;
... ... @@ -671,7 +666,7 @@ const editUserLikeBrand = (req, uid) => {
return respData;
}
respData = yield userApi.editUserLikeBrand(uid, brand);
return respData;
... ... @@ -687,7 +682,7 @@ const isBrandName = (req) => {
brandName = _.trim(req.body.brandName),
brandInfo = {},
flag = false;
if (!brandName) {
return {
code: 400,
... ...