|
@@ -148,14 +148,24 @@ const _editInfo = (uid, nickName, username, gender, birthday)=> { |
|
@@ -148,14 +148,24 @@ const _editInfo = (uid, nickName, username, gender, birthday)=> { |
148
|
* @private
|
148
|
* @private
|
149
|
*/
|
149
|
*/
|
150
|
const _editUserContactInfo = (uid, areaCode, mobile, fullAddress, zipCode)=> {
|
150
|
const _editUserContactInfo = (uid, areaCode, mobile, fullAddress, zipCode)=> {
|
151
|
- return api.get('', {
|
151
|
+ let param = {
|
152
|
method: 'web.passport.modifyUserContacts',
|
152
|
method: 'web.passport.modifyUserContacts',
|
153
|
- uid: uid,
|
|
|
154
|
- area_code: areaCode,
|
|
|
155
|
- mobile: mobile,
|
|
|
156
|
- full_address: fullAddress,
|
|
|
157
|
- zip_code: zipCode
|
|
|
158
|
- }).then(result => result);
|
153
|
+ uid: uid
|
|
|
154
|
+ };
|
|
|
155
|
+
|
|
|
156
|
+ if (mobile) {
|
|
|
157
|
+ param.mobile = mobile;
|
|
|
158
|
+ }
|
|
|
159
|
+ if (zipCode) {
|
|
|
160
|
+ param.zip_code = zipCode;
|
|
|
161
|
+ }
|
|
|
162
|
+ if (areaCode) {
|
|
|
163
|
+ param.area_code = areaCode;
|
|
|
164
|
+ }
|
|
|
165
|
+ if (fullAddress) {
|
|
|
166
|
+ param.full_address = fullAddress;
|
|
|
167
|
+ }
|
|
|
168
|
+ return api.get('', param).then(result => result);
|
159
|
};
|
169
|
};
|
160
|
|
170
|
|
161
|
/**
|
171
|
/**
|
|
@@ -170,7 +180,9 @@ const editUserInfo = (uid, info) => { |
|
@@ -170,7 +180,9 @@ const editUserInfo = (uid, info) => { |
170
|
_editUserContactInfo(uid, info.area_code, info.mobile, info.full_address, info.zip_code)
|
180
|
_editUserContactInfo(uid, info.area_code, info.mobile, info.full_address, info.zip_code)
|
171
|
];
|
181
|
];
|
172
|
|
182
|
|
173
|
- return Promise.all(getData).then(result => result);
|
183
|
+ return Promise.all(getData).then(result => {
|
|
|
184
|
+ return result;
|
|
|
185
|
+ });
|
174
|
};
|
186
|
};
|
175
|
|
187
|
|
176
|
/**
|
188
|
/**
|