wesmiler пре 2 година
родитељ
комит
048cc23aee

+ 1 - 1
app/Http/Validator/MemberValidator.php

@@ -57,7 +57,7 @@ class MemberValidator extends BaseValidator
         'recharge'=> ['usdt'],
         'recharge'=> ['usdt'],
         'transfer'=> ['money','coin_type','to_user_id'],
         'transfer'=> ['money','coin_type','to_user_id'],
         'withdraw'=> ['money','coin_type'],
         'withdraw'=> ['money','coin_type'],
-        'trade'=> ['email','pay_password','code'],
+        'trade'=> ['pay_password','code'],
         'modify_email'=> ['email','new_email'],
         'modify_email'=> ['email','new_email'],
         'modify'=> ['nickname','gender'],
         'modify'=> ['nickname','gender'],
         'wallet'=> ['email','trc_url','code']
         'wallet'=> ['email','trc_url','code']

+ 4 - 0
app/Services/Api/MemberService.php

@@ -689,6 +689,10 @@ class MemberService extends BaseService
         $password = isset($params['password']) ? $params['password'] : '';
         $password = isset($params['password']) ? $params['password'] : '';
         $payPassword = isset($params['pay_password']) ? $params['pay_password'] : '';
         $payPassword = isset($params['pay_password']) ? $params['pay_password'] : '';
         $scene = isset($params['scene'])? trim($params['scene']) : '';
         $scene = isset($params['scene'])? trim($params['scene']) : '';
+        if(empty($email) && empty($mobile)){
+            $this->error = 1064;
+            return false;
+        }
 
 
         // 用户验证
         // 用户验证
         $info = $this->model->with(['parent'])->where(['id' => $userId, 'mark' => 1])->select(['id','pay_password','parent_id','code', 'status'])->first();
         $info = $this->model->with(['parent'])->where(['id' => $userId, 'mark' => 1])->select(['id','pay_password','parent_id','code', 'status'])->first();

+ 1 - 0
resources/lang/zh-cn/api.php

@@ -63,6 +63,7 @@ return [
     '1061' => '手机验证码已失效或错误',
     '1061' => '手机验证码已失效或错误',
     '1062' => '手机验证码错误',
     '1062' => '手机验证码错误',
     '1063' => '手机验证码发送成功',
     '1063' => '手机验证码发送成功',
+    '1064' => '请选择邮箱验证或手机号验证',
 
 
     // 登录注册
     // 登录注册
     '2001'=> '账号非法或未注册',
     '2001'=> '账号非法或未注册',