|
@@ -533,6 +533,16 @@ class Base
|
|
|
|
|
|
public function mcode($mobile, $code = false)
|
|
|
{
|
|
|
+ if (Dever::project('sms')) {
|
|
|
+ $send['skin'] = 'code';
|
|
|
+ $send['mobile'] = $mobile;
|
|
|
+ if ($code) {
|
|
|
+ $send['code'] = $code;
|
|
|
+ return Dever::load('sms/api.checkCode', $send);
|
|
|
+ } else {
|
|
|
+ return Dever::load('sms/api.sendCode', $send);
|
|
|
+ }
|
|
|
+ }
|
|
|
$day = date('Ymd', time());
|
|
|
|
|
|
|
|
@@ -591,16 +601,6 @@ class Base
|
|
|
|
|
|
public function send($mobile, $code, $id = false)
|
|
|
{
|
|
|
- if (Dever::project('sms')) {
|
|
|
- $send['skin'] = 'code';
|
|
|
- $send['mobile'] = $mobile;
|
|
|
- $send['param'] = array
|
|
|
- (
|
|
|
- 'code' => $code
|
|
|
- );
|
|
|
- $send['param'] = Dever::json_encode($send['param']);
|
|
|
- return Dever::load('sms/api.send', $send);
|
|
|
- }
|
|
|
$url = Dever::config('base', 'project')->mobileCode['url'];
|
|
|
|
|
|
if (!$url) {
|