xiaogang 3 years ago
parent
commit
a3cb83e35d

+ 1 - 5
app/Admin/Actions/Users/UsersInfoForm.php

xqd
@@ -59,11 +59,7 @@ class UsersInfoForm extends Form implements LazyRenderable
         $this->text('drink', '喝酒');
         $this->text('smoke', '抽烟');
         $this->array('photo', function (Form $form) {
-            $form->image('url','图片')->disk('oss')->saveFullUrl()->uniqueName()->removable(false)->saving(
-                function ($res){
-                    dd($res);
-                }
-            );
+            $form->image('url','图片')->saveFullUrl()->uniqueName()->removable(false);
             $form->radio('state','阅后即焚')->options([0=>"否",1=>"是"])->default(0);
         })->saveAsJson()->label('相册');
         //$this->file('video', '视频')->saveAsJson();

+ 1 - 1
app/Http/Controllers/Api/UserController.php

xqd
@@ -92,7 +92,7 @@ class UserController extends Controller
                 throw new Exception("请上传视频");
             }
 
-            if(UserInfoModel::where(['nickname'=>$request->nickname])->where('user_id', '!=' , $user->id)->first()){
+            if(UserInfoModel::where(['nickname'=>$request->nickname])->where('user_id', '!=' , $user->id)->first() && User::query()->where(['id'=>$user->id,'is_distory'=>0])->first()){
                 throw new Exception("昵称已被使用");
             }
             //邀请码设置