|
...
|
...
|
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Bside; |
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Logic\Bside\ComLogic;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\Validator;
|
|
|
|
|
|
|
|
/***
|
|
...
|
...
|
@@ -18,22 +19,19 @@ class ComController extends BaseController |
|
|
|
* @method
|
|
|
|
*/
|
|
|
|
public function login(){
|
|
|
|
//当前为账号密码登录
|
|
|
|
if($this->param['login_method'] == 1){
|
|
|
|
$rules = [
|
|
|
|
$rules = [
|
|
|
|
'account'=>'required|string|max:32',
|
|
|
|
'password'=>'required|string|min:6',
|
|
|
|
];
|
|
|
|
//验证的提示信息
|
|
|
|
$message = [
|
|
|
|
'account.required'=>'标题必须填写',
|
|
|
|
'account.string'=>'标题中含有非法文字',
|
|
|
|
'password.required'=>'内容必须填写',
|
|
|
|
'password.string'=>'内容中含有非法文字',
|
|
|
|
'account.max' => 'account不大于32字符.',
|
|
|
|
'password.min' => 'password不小于6字符.',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
$message = [
|
|
|
|
'mobile.required'=>'标题必须填写',
|
|
|
|
'mobile.string'=>'标题中含有非法文字',
|
|
|
|
'password.required'=>'内容必须填写',
|
|
|
|
'password.string'=>'内容中含有非法文字',
|
|
|
|
'mobile.max' => 'account不大于32字符.',
|
|
|
|
'password.min' => 'password不小于6字符.',
|
|
|
|
];
|
|
|
|
$validate = Validator::make($this->param, $rules, $message);
|
|
|
|
if($validate->errors()->first()){
|
|
|
|
return $this->success($validate->errors(),Code::USER_PARAMS_ERROE);
|
...
|
...
|
|