xiaogang 4 rokov pred
rodič
commit
a631ba0641

+ 3 - 0
app/Http/Controllers/Api/UserController.php

xqd
@@ -88,6 +88,9 @@ class UserController extends Controller
             if ($validator->fails()) {
                 throw new Exception($validator->messages()->first());
             }
+            if($user->sex==2 && empty($request->video)){
+                throw new Exception("请上传视频");
+            }
 
             if(UserInfoModel::where(['nickname'=>$request->nickname])->where('user_id', '!=' , $user->id)->first()){
                 throw new Exception("昵称已被使用");