|
@@ -60,13 +60,13 @@ class Base
|
|
$check = Dever::load('passport/code-check', $param);
|
|
$check = Dever::load('passport/code-check', $param);
|
|
|
|
|
|
if ($check) {
|
|
if ($check) {
|
|
- if (time() - $check['cdate'] < Dever::config('base', 'passport')->mobileCode['time']) {
|
|
|
|
|
|
+ if (time() - $check['cdate'] < Dever::config('base', 'project')->mobileCode['time']) {
|
|
Dever::alert('请不要在一分钟之内申请多次验证码,请您稍后再试');
|
|
Dever::alert('请不要在一分钟之内申请多次验证码,请您稍后再试');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- $total = Dever::config('base', 'passport')->mobileCode['total'];
|
|
|
|
|
|
+ $total = Dever::config('base', 'project')->mobileCode['total'];
|
|
if ($info >= $total) {
|
|
if ($info >= $total) {
|
|
Dever::alert('很抱歉,您已经申请获取验证码超过' . $total . '次,今天您已经无法获取验证码了,请您明天再来');
|
|
Dever::alert('很抱歉,您已经申请获取验证码超过' . $total . '次,今天您已经无法获取验证码了,请您明天再来');
|
|
}
|
|
}
|
|
@@ -82,7 +82,7 @@ class Base
|
|
|
|
|
|
# 发送验证码到手机上
|
|
# 发送验证码到手机上
|
|
//$text = '您好,您的验证码为' . $code->mcode . ',十分钟之内有效。';
|
|
//$text = '您好,您的验证码为' . $code->mcode . ',十分钟之内有效。';
|
|
- $text = str_replace('{code}', $code->mcode, Dever::config('base', 'passport')->mobileCode['msg']);
|
|
|
|
|
|
+ $text = str_replace('{code}', $code->mcode, Dever::config('base', 'project')->mobileCode['msg']);
|
|
|
|
|
|
# 启动发送
|
|
# 启动发送
|
|
$this->send($mobile, $text, $id);
|
|
$this->send($mobile, $text, $id);
|
|
@@ -94,12 +94,15 @@ class Base
|
|
|
|
|
|
private function send($mobile, $content, $id)
|
|
private function send($mobile, $content, $id)
|
|
{
|
|
{
|
|
- $url = Dever::config('base', 'passport')->mobileCode['url'];
|
|
|
|
|
|
+ $url = Dever::config('base', 'project')->mobileCode['url'];
|
|
|
|
|
|
- if (Dever::config('base', 'passport')->mobileCode['signType'] == 1) {
|
|
|
|
- $content = Dever::config('base', 'passport')->mobileCode['sign'] . $content;
|
|
|
|
|
|
+ if (!$url) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (Dever::config('base', 'project')->mobileCode['signType'] == 1) {
|
|
|
|
+ $content = Dever::config('base', 'project')->mobileCode['sign'] . $content;
|
|
} else {
|
|
} else {
|
|
- $content .= Dever::config('base', 'passport')->mobileCode['sign'];
|
|
|
|
|
|
+ $content .= Dever::config('base', 'project')->mobileCode['sign'];
|
|
}
|
|
}
|
|
|
|
|
|
$param['phone'] = $mobile;
|
|
$param['phone'] = $mobile;
|
|
@@ -140,7 +143,7 @@ class Base
|
|
protected function save($user)
|
|
protected function save($user)
|
|
{
|
|
{
|
|
if (is_numeric($user)) {
|
|
if (is_numeric($user)) {
|
|
- $user = Dever::load('service/company-one', $user);
|
|
|
|
|
|
+ $user = Dever::load('passport/user-one', $user);
|
|
}
|
|
}
|
|
|
|
|
|
if ($user && is_array($user)) {
|
|
if ($user && is_array($user)) {
|
|
@@ -153,6 +156,10 @@ class Base
|
|
|
|
|
|
$user['signature'] = Dever::login($user['id']);
|
|
$user['signature'] = Dever::login($user['id']);
|
|
|
|
|
|
|
|
+ if (Dever::config('base', 'project')->regAction) {
|
|
|
|
+ Dever::load(Dever::config('base', 'project')->regAction, $user);
|
|
|
|
+ }
|
|
|
|
+
|
|
return $user;
|
|
return $user;
|
|
}
|
|
}
|
|
}
|
|
}
|