Browse Source

用户资料枚举

lizhen_gitee 3 months ago
parent
commit
8a0c36ad50

+ 6 - 6
application/admin/lang/zh-cn/agent/user.php

@@ -51,12 +51,12 @@ return [
     'Latitude'            => '纬度',
     'Cityname'            => '即时城市名',
     'Photo_images'        => '相册',
-    'Education_id'        => '学历id',
-    'Hobby_ids'           => '爱好ids',
-    'Job_id'              => '职业id',
-    'Marital_id'          => '婚恋id',
-    'Tag_ids'             => '标签ids',
-    'Wages_id'            => '收入id',
+    'Education'        => '学历',
+    'Hobby'           => '爱好',
+    'Job'              => '职业',
+    'Marital'          => '婚恋',
+    'Tag'             => '标签',
+    'Wages'            => '收入',
     'Hometown_cityid'     => '家乡城市id',
     'Open_match_video'    => '匹配视频开关',
     'Open_match_video 1'  => '开',

+ 6 - 6
application/admin/lang/zh-cn/ghuser.php

@@ -50,12 +50,12 @@ return [
     'Latitude'              => '纬度',
     'Cityname'              => '即时城市名',
     'Photo_images'          => '相册',
-    'Education_id'          => '学历id',
-    'Hobby_ids'             => '爱好ids',
-    'Job_id'                => '职业id',
-    'Marital_id'            => '婚恋id',
-    'Tag_ids'               => '标签ids',
-    'Wages_id'              => '收入id',
+    'Education'          => '学历',
+    'Hobby'             => '爱好',
+    'Job'                => '职业',
+    'Marital'            => '婚恋',
+    'Tag'               => '标签',
+    'Wages'              => '收入',
     'Hometown_cityid'       => '家乡城市id',
     'Open_match_video'      => '匹配视频开关',
     'Open_match_video 1'    => '开',

+ 6 - 6
application/admin/lang/zh-cn/user/user.php

@@ -52,12 +52,12 @@ return [
     'Latitude'            => '纬度',
     'Cityname'            => '即时城市名',
     'Photo_images'        => '相册',
-    'Education_id'        => '学历id',
-    'Hobby_ids'           => '爱好ids',
-    'Job_id'              => '职业id',
-    'Marital_id'          => '婚恋id',
-    'Tag_ids'             => '标签ids',
-    'Wages_id'            => '收入id',
+    'Education'        => '学历',
+    'Hobby'           => '爱好',
+    'Job'              => '职业',
+    'Marital'          => '婚恋',
+    'Tag'             => '标签',
+    'Wages'            => '收入',
     'Hometown_cityid'     => '家乡城市id',
     'Open_match_video'    => '匹配视频开关',
     'Open_match_video 1'  => '开',

+ 11 - 34
application/common/library/Auth.php

@@ -55,12 +55,12 @@ class Auth
         'cityname',
         'photo_images',
 
-        'education_id',
-        'hobby_ids',
-        'job_id',
-        'marital_id',
-        'tag_ids',
-        'wages_id',
+        'education',
+        'hobby',
+        'job',
+        'marital',
+        'tag',
+        'wages',
 
         'hometown_cityid',
         'hide_is_finishinfo',
@@ -69,9 +69,9 @@ class Auth
         'wechat_account',
         'secretvideo_status',
 
-        'character_id',
-        'constellation_id',
-        'stature_id',
+        'character',
+        'constellation',
+        'stature',
         'is_appointment',
 
         'chat_price',
@@ -79,7 +79,7 @@ class Auth
         'video_price',
 
         'greet_voice','is_kefu',
-        'greet_chat', 'is_recommend', 'is_cohabit', 'live_id', 'is_house', 'car_id', 'chest_id', 'waist'
+        'greet_chat', 'is_recommend', 'is_cohabit', 'live', 'is_house', 'car', 'chest', 'waist'
     ];
 
     public function __construct($options = [])
@@ -720,29 +720,6 @@ class Auth
 
         $userinfo = array_merge($userinfo,$new_data);
         //枚举
-        $userinfo['education'] = Db::name('enum_education')->where('id',$this->education_id)->value('name');
-        $userinfo['education'] = $userinfo['education'] ? : '';
-
-        $userinfo['hobby'] = Db::name('enum_hobby')->where('id','IN',$this->hobby_ids)->field(['id','name'])->select();
-        $userinfo['job'] = Db::name('enum_job')->where('id',$this->job_id)->value('name');
-        $userinfo['job'] = $userinfo['job'] ? : '';
-        $userinfo['marital'] = Db::name('enum_marital')->where('id',$this->marital_id)->value('name');
-        $userinfo['marital'] = $userinfo['marital'] ? : '';
-        $userinfo['tag'] = Db::name('enum_tag')->where('id','IN',$this->tag_ids)->field(['id','name'])->select();
-        $userinfo['wages'] = Db::name('enum_wages')->where('id',$this->wages_id)->value('name');
-        $userinfo['wages'] = $userinfo['wages'] ? : '';
-        $userinfo['character'] = Db::name('enum_character')->where('id',$this->character_id)->value('name');
-        $userinfo['character'] = $userinfo['character'] ? : '';
-        $userinfo['constellation'] = Db::name('enum_constellation')->where('id',$this->constellation_id)->value('name');
-        $userinfo['constellation'] = $userinfo['constellation'] ? : '';
-        $userinfo['stature'] = Db::name('enum_stature')->where('id',$this->stature_id)->value('name');
-        $userinfo['stature'] = $userinfo['stature'] ? : '';
-        $userinfo['live'] = Db::name('enum_live')->where('id',$this->live_id)->value('name');
-        $userinfo['live'] = $userinfo['live'] ? : '';
-        $userinfo['car'] = Db::name('enum_car')->where('id',$this->car_id)->value('name');
-        $userinfo['car'] = $userinfo['car'] ? : '';
-        $userinfo['chest'] = Db::name('enum_chest')->where('id',$this->chest_id)->value('name');
-        $userinfo['chest'] = $userinfo['chest'] ? : '';
 
         //家乡
         $userinfo['hometown_city'] = Db::name('area')->where('id',$this->hometown_cityid)->value('name');
@@ -781,7 +758,7 @@ class Auth
         if ($userinfo['gender'] != -1) {
             $userinfo['info_completion'] = 10;
         }
-        $field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation_id','bio','audio_bio','photo_images','hometown_cityid','job_id','education_id','wages_id','character_id','stature_id','weight','height','marital_id',/*'is_appointment',*/'hobby_ids','tag_ids'];
+        $field_array = ['avatar','nickname',/*'gender',*/'birthday','constellation_id','bio','audio_bio','photo_images','hometown_cityid','job','education','wages','character','stature','weight','height','marital',/*'is_appointment',*/'hobby','tag'];
         foreach ($field_array as &$v) {
             if ($userinfo[$v]) {
                 $userinfo['info_completion'] += 5;