master
cody 4 months ago
commit d72d748f89

@ -312,12 +312,20 @@ class UserController extends CommonController
$messages = [ $messages = [
'mobile.required' => '手机号必填', 'mobile.required' => '手机号必填',
'mobile.numeric' => '手机号格式错误', 'mobile.numeric' => '手机号格式错误',
<<<<<<< HEAD
// 'code' => '验证码必填', // 'code' => '验证码必填',
=======
'code' => '验证码必填',
>>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769
'is_bind' => '是否绑定必填', 'is_bind' => '是否绑定必填',
]; ];
$validator = Validator::make($all, [ $validator = Validator::make($all, [
'mobile' => 'required|numeric', 'mobile' => 'required|numeric',
<<<<<<< HEAD
// 'code' => 'required', // 'code' => 'required',
=======
'code' => 'required',
>>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769
'is_bind' => 'required', 'is_bind' => 'required',
], $messages); ], $messages);
if ($validator->fails()) { if ($validator->fails()) {
@ -361,19 +369,32 @@ class UserController extends CommonController
$messages = [ $messages = [
'mobile.required' => '手机号必填', 'mobile.required' => '手机号必填',
'mobile.numeric' => '手机号格式错误', 'mobile.numeric' => '手机号格式错误',
<<<<<<< HEAD
// 'code' => '验证码必填', // 'code' => '验证码必填',
]; ];
$validator = Validator::make($all, [ $validator = Validator::make($all, [
'mobile' => 'required|numeric', 'mobile' => 'required|numeric',
// 'code' => 'required', // 'code' => 'required',
=======
'code' => '验证码必填',
];
$validator = Validator::make($all, [
'mobile' => 'required|numeric',
'code' => 'required',
>>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769
], $messages); ], $messages);
if ($validator->fails()) { if ($validator->fails()) {
return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]); return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
} }
$key = 'sms_' . $all['mobile']; $key = 'sms_' . $all['mobile'];
$check = Cache::get($key); $check = Cache::get($key);
<<<<<<< HEAD
// if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']); // if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']);
// if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']); // if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']);
=======
if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']);
if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']);
>>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769
// 判断手机号是否存在 // 判断手机号是否存在
$hasMobile = User::where('mobile', $all['mobile'])->first(); $hasMobile = User::where('mobile', $all['mobile'])->first();
if ($hasMobile) { if ($hasMobile) {

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
# 定义1个变量变量是git裸仓库名字例如/www/git/demo.git # 定义1个变量变量是git裸仓库名字例如/www/git/demo.git
<<<<<<< HEAD
GIT_REPO_NAME="/www/git/wx.sstbc.com.git" GIT_REPO_NAME="/www/git/wx.sstbc.com.git"
=======
GIT_REPO_NAME="/data/git/wx.sstbc.com.git"
>>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769
#检测系统里是否存在用户名是git的用户如果不存在就创建一个并且设置密码为git@2023 #检测系统里是否存在用户名是git的用户如果不存在就创建一个并且设置密码为git@2023
if ! id -u git > /dev/null 2>&1; then if ! id -u git > /dev/null 2>&1; then

Loading…
Cancel
Save