|
@@ -228,7 +228,7 @@ class User extends Api
|
|
|
*/
|
|
|
public function profile()
|
|
|
{
|
|
|
- $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education','hobby','job','marital','tag','wages','hometown_cityid','hide_is_finishinfo',/*'wechat_account',*/'character','constellation','stature','is_appointment', 'greet_voice', 'greet_chat', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'];
|
|
|
+ $field_array = ['nickname','introcode',/*'gender',*/'birthday','height','weight','bio','audio_bio','avatar','photo_images','education','hobby','job','marital','tag','wages','hometown_cityid','hide_is_finishinfo',/*'wechat_account',*/'character','constellation','stature','is_appointment', 'greet_voice', 'greet_chat', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'];
|
|
|
|
|
|
$data = [];
|
|
|
foreach($field_array as $key => $field){
|
|
@@ -1239,8 +1239,8 @@ class User extends Api
|
|
|
$nickname = input('nickname', '', 'trim'); //昵称
|
|
|
$birthday = input('birthday', '', 'strtotime'); //生日
|
|
|
$hometown_cityid = input('hometown_cityid', '', 'trim'); //城市id
|
|
|
- $job_id = input('job_id', '', 'trim'); //职业id
|
|
|
- $character_id = input('character_id', '', 'trim'); //性格id
|
|
|
+ $hobby = input('hobby', '', 'trim'); //爱好
|
|
|
+ $marital = input('marital', '', 'trim'); //婚姻
|
|
|
$introcode = input('introcode', '', 'trim'); //邀请码
|
|
|
|
|
|
$data = [];
|
|
@@ -1263,19 +1263,11 @@ class User extends Api
|
|
|
}
|
|
|
$data['hometown_cityid'] = $hometown_cityid;
|
|
|
}
|
|
|
- if ($job_id) {
|
|
|
- $count = Db::name('enum_job')->where('id', $job_id)->count('id');
|
|
|
- if (!$count) {
|
|
|
- $this->error('职业不存在');
|
|
|
- }
|
|
|
- $data['job_id'] = $job_id;
|
|
|
+ if ($hobby) {
|
|
|
+ $data['hobby'] = $hobby;
|
|
|
}
|
|
|
- if ($character_id) {
|
|
|
- $count = Db::name('enum_character')->where('id', $character_id)->count('id');
|
|
|
- if (!$count) {
|
|
|
- $this->error('性格不存在');
|
|
|
- }
|
|
|
- $data['character_id'] = $character_id;
|
|
|
+ if ($marital) {
|
|
|
+ $data['marital'] = $marital;
|
|
|
}
|
|
|
if ($introcode && !$this->auth->intro_uid) {
|
|
|
|