...
|
...
|
@@ -244,7 +244,17 @@ const myDetails = (uid) => { |
|
|
if (uid) {
|
|
|
return api.all([_detailInfo(uid), _getCode(uid)]).then(result => {
|
|
|
if (result[0].data) {
|
|
|
result[0].data.gender = (result[0].data.gender === '1' ? '男' : '女');
|
|
|
let thisGender = result[0].data.gender;
|
|
|
|
|
|
result[0].data.gender = (thisGender === '1' ? '男' : '女');
|
|
|
result[0].data.otherGender = (thisGender === '1' ? '女' : '男');
|
|
|
if (result[0].data.gender === '男') {
|
|
|
result[0].data.genderId = 1;
|
|
|
result[0].data.otherGenderId = 2;
|
|
|
} else {
|
|
|
result[0].data.genderId = 2;
|
|
|
result[0].data.otherGenderId = 1;
|
|
|
}
|
|
|
result[0].data.qrcodeLink = helpers.urlFormat('/home/user/qrcode', {
|
|
|
token: _.get(result[0], 'data.uid', null) ?
|
|
|
crypto.encryption('yoho9646yoho9646', _.get(result, 'data.uid', null) + '') : '',
|
...
|
...
|
@@ -499,6 +509,18 @@ const getPreferential = (params) => { |
|
|
});
|
|
|
};
|
|
|
|
|
|
const modify = (params) => {
|
|
|
return api.get('', {
|
|
|
method: 'app.passport.modifyBase',
|
|
|
uid: params.uid,
|
|
|
nick_name: params.nickName,
|
|
|
gender: params.gender,
|
|
|
birthday: params.birthday
|
|
|
}).then((result) => {
|
|
|
return result;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
index,
|
|
|
myDetails,
|
...
|
...
|
@@ -507,4 +529,5 @@ module.exports = { |
|
|
getGrade,
|
|
|
getPreferential,
|
|
|
getGradeGrade,
|
|
|
modify
|
|
|
}; |
...
|
...
|
|