|
@@ -388,17 +388,6 @@ class User extends Api
|
|
|
$this->error('没有任何改变');
|
|
|
}
|
|
|
|
|
|
- //默认头像
|
|
|
- //现在没头像,也没穿头像,但是却传了性别
|
|
|
- /*if($this->auth->avatar == config('site.domain_cdnurl').'/avatar.png' && isset($data['gender']) && $data['avatar'] == config('site.domain_cdnurl').'/avatar.png'){
|
|
|
- if($data['gender'] == 1){
|
|
|
- $data['avatar'] = 'https://meet-1251365327.cos.ap-beijing.myqcloud.com/uploads/20220314/f9277fba97fd76d9ecfc63b506a3674a.png';
|
|
|
- }else{
|
|
|
- $data['avatar'] = 'https://meet-1251365327.cos.ap-beijing.myqcloud.com/uploads/20220314/5030460c05c86774f60123ffea7b78a1.png';
|
|
|
- }
|
|
|
- }*/
|
|
|
- //默认头像
|
|
|
-
|
|
|
Db::startTrans();
|
|
|
$update_rs = Db::name('user')->where('id',$this->auth->id)->update($data);
|
|
|
if($update_rs === false){
|
|
@@ -408,39 +397,14 @@ class User extends Api
|
|
|
|
|
|
//tag任务赠送金币
|
|
|
//上传头像加5金币
|
|
|
- /*if(isset($data['avatar'])){
|
|
|
+ if(isset($data['avatar'])&& $data['avatar'] != config('site.domain_cdnurl').'/avatar.png'){
|
|
|
$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'])){
|
|
|
- $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){
|
|
|
- $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();
|
|
|
- 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();
|