作者 王晓刚
1 个管道 的构建 通过 耗费 12 秒

短信验证码

... ... @@ -127,7 +127,7 @@ if(!function_exists('send_sms')){
//todo 短信账号密码
require_once EXTEND_PATH . 'nsms/nsms.php';
$url = "http://www.ztsms.cn/sendNSms.do";
$username = 'mzhongjie';
$username = 'gongpinda';
$password = 'Cxz307312';
$sendAPI = new \sendAPI($url, $username, $password);
$sendAPI->data = $data;/*初始化数据包*/
... ...
... ... @@ -216,11 +216,11 @@ class User extends Frontend
'productid' => '887361',//产品id
'xh' => ''//小号
);
/*$result2 = send_sms($content);
$result2 = send_sms($content);
if (substr($result2, 0, strpos($result2, ',')) != "1") {
Db::rollback();
$this->error('发送失败');
}*/
}
Db::commit();
$this->success('SUCCESS','',['code'=>$code]);
}
... ... @@ -271,11 +271,11 @@ class User extends Frontend
'productid' => '887361',//产品id
'xh' => ''//小号
);
/*$result2 = send_sms($content);
$result2 = send_sms($content);
if (substr($result2, 0, strpos($result2, ',')) != "1") {
Db::rollback();
$this->error('发送失败');
}*/
}
Db::commit();
$this->success('SUCCESS','',['code'=>$code]);
}
... ... @@ -339,10 +339,10 @@ class User extends Frontend
}
// $token = generate_user_token($result1);
// session('token',$token);
/*$this->auth->direct($result1);
$this->auth->direct($result1);
$token = $this->auth->getToken();
session('token',$token);
Cookie::set('token',$token);*/
Cookie::set('token',$token);
Db::commit();
$this->success('SUCCESS','user/login_view');
}
... ...