|
@@ -122,9 +122,9 @@ class User extends Api
|
|
|
|
|
|
} else {
|
|
|
$extend = [
|
|
|
- 'register_from' => input('register_from',''),
|
|
|
+// 'register_from' => input('register_from',''),
|
|
|
];
|
|
|
- $ret = $this->auth->register($mobile, Random::alnum(), '', $mobile, $extend);
|
|
|
+ $ret = $this->auth->register('', '', '', $mobile, $extend);
|
|
|
|
|
|
}
|
|
|
if ($ret) {
|
|
@@ -554,12 +554,12 @@ class User extends Api
|
|
|
*/
|
|
|
public function profile()
|
|
|
{
|
|
|
- $field_array = ['nickname','introcode','gender','birthday','height','weight','bio','audio_bio','avatar','photo_images','education_id','hobby_ids','job_id','marital_id','tag_ids','wages_id','hometown_cityid','hide_is_finishinfo','wechat_account'];
|
|
|
+ $field_array = ['nickname','introcode','gender','birthday','attribute','shoesize','height','weight','bio','audio_bio','avatar','photo_images','tag_ids','hide_is_finishinfo','wechat_account'];
|
|
|
|
|
|
$data = [];
|
|
|
foreach($field_array as $key => $field){
|
|
|
|
|
|
- if(!input('?'.$field)){
|
|
|
+ if(!request()->has($field,'post')){
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -581,9 +581,7 @@ class User extends Api
|
|
|
if(isset($data['avatar'])){
|
|
|
//$data['real_status'] = -1; //或许应该改成0。性别不能改所以不需要
|
|
|
}
|
|
|
- if(isset($data['hobby_ids'])){
|
|
|
- $data['hobby_ids'] = implode(',',explode(',',$data['hobby_ids']));
|
|
|
- }
|
|
|
+
|
|
|
if(isset($data['tag_ids'])){
|
|
|
$data['tag_ids'] = implode(',',explode(',',$data['tag_ids']));
|
|
|
}
|
|
@@ -620,39 +618,39 @@ class User extends Api
|
|
|
|
|
|
//tag任务赠送金币
|
|
|
//上传头像加5金币
|
|
|
- if(isset($data['avatar'])){
|
|
|
+ /*if(isset($data['avatar'])){
|
|
|
$task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,1);
|
|
|
if($task_rs === false){
|
|
|
Db::rollback();
|
|
|
$this->error('完成任务赠送奖励失败');
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
//上传本人语音介绍 10金币
|
|
|
- if(isset($data['audio_bio'])){
|
|
|
+ /*if(isset($data['audio_bio'])){
|
|
|
$task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,6);
|
|
|
if($task_rs === false){
|
|
|
Db::rollback();
|
|
|
$this->error('完成任务赠送奖励失败');
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
//上传本人五张照片 10金币
|
|
|
- if(isset($data['photo_images']) && count(explode(',',$data['photo_images'])) >= 5){
|
|
|
+ /*if(isset($data['photo_images']) && count(explode(',',$data['photo_images'])) >= 5){
|
|
|
$task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,8);
|
|
|
if($task_rs === false){
|
|
|
Db::rollback();
|
|
|
$this->error('完成任务赠送奖励失败');
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
//所有资料完成
|
|
|
- $user_info = Db::name('user')->where('id',$this->auth->id)->find();
|
|
|
+ /*$user_info = Db::name('user')->where('id',$this->auth->id)->find();
|
|
|
if($user_info['avatar'] && $user_info['nickname'] && $user_info['mobile'] && $user_info['audio_bio'] && $user_info['photo_images']){
|
|
|
$task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,5);
|
|
|
if($task_rs === false){
|
|
|
Db::rollback();
|
|
|
$this->error('完成任务赠送奖励失败');
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
Db::commit();
|
|
|
$this->success();
|
|
@@ -976,8 +974,8 @@ class User extends Api
|
|
|
$this->error(__('Invalid parameters'));
|
|
|
}
|
|
|
//退出im
|
|
|
- $tenIm = new Tenim();
|
|
|
- $tenIm->loginoutim($this->auth->id);
|
|
|
+// $tenIm = new Tenim();
|
|
|
+// $tenIm->loginoutim($this->auth->id);
|
|
|
|
|
|
Db::name('user')->where('id',$this->auth->id)->update(['status'=>-1]);
|
|
|
|