lizhen_gitee 1 anno fa
parent
commit
246934577b
1 ha cambiato i file con 9 aggiunte e 5 eliminazioni
  1. 9 5
      application/api/controller/User.php

+ 9 - 5
application/api/controller/User.php

@@ -541,11 +541,6 @@ class User extends Api
         }
 
         Db::startTrans();
-        $update_rs = Db::name('user')->where('id',$this->auth->id)->update($data);
-        if($update_rs === false){
-            Db::rollback();
-            $this->error('修改资料失败');
-        }
 
         //task任务
         if(isset($data['tag_ids']) && isset($data['bio'])){
@@ -555,6 +550,15 @@ class User extends Api
                 Db::rollback();
                 $this->error('完成任务失败');
             }
+
+            $data['hide_is_finishinfo'] = 1;//完善资料了
+        }
+
+        //修改用户
+        $update_rs = Db::name('user')->where('id',$this->auth->id)->update($data);
+        if($update_rs === false){
+            Db::rollback();
+            $this->error('修改资料失败');
         }