取消测试的虚拟验证码

master
chenzhi 4 years ago
parent 95d9f45612
commit 7d8dca7421

@ -77,12 +77,9 @@ class PublicController extends \Think\Controller
public function cp_login($mobile = null, $verify = null) public function cp_login($mobile = null, $verify = null)
{ {
if (IS_POST) { if (IS_POST) {
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($mobile, $verify)) { if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误'); $this->error('验证码错误');
} }
}
$promote = M('promote_company', 'tab_')->where(['contact_phone' => $mobile])->find(); $promote = M('promote_company', 'tab_')->where(['contact_phone' => $mobile])->find();
if ($promote) { if ($promote) {
/* 记录登录SESSION和COOKIES */ /* 记录登录SESSION和COOKIES */

@ -366,12 +366,9 @@ class PaymentController extends BaseController
{ {
$mobile = $_REQUEST['mobile']; $mobile = $_REQUEST['mobile'];
$verify = $_REQUEST['verify']; $verify = $_REQUEST['verify'];
/* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($this->admininfo['mobile'], $verify)) { if (!$this->checksafecode($this->admininfo['mobile'], $verify)) {
$this->error('验证码错误'); $this->error('验证码错误');
} }
}
$dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]); $dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]);
if($dbres !== false){ if($dbres !== false){
$logout = U('Public/logout'); $logout = U('Public/logout');
@ -424,11 +421,9 @@ class PaymentController extends BaseController
{ {
$mobile = $this->admininfo['mobile']; $mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify']; $verify = $_REQUEST['verify'];
if($verify !== 'txsb0601'){
if (!A("Public")->checksafecode($mobile, $verify)) { if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]); $this->ajaxReturn(["error"=>"验证码错误"]);
} }
}
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]); $this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
} }
//执行打款 //执行打款
@ -440,15 +435,13 @@ class PaymentController extends BaseController
Vendor("Alipay2020/Fund"); Vendor("Alipay2020/Fund");
$fund = new \Fund(); $fund = new \Fund();
//
$dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find(); $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'],true); $company_info = json_decode($dbres['company_info'],true);
//TODO:未进行真实打款
if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){ if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){
//执行打款 //执行打款
$title = "测试-".$dbres['company_name']."结算"; $title = $dbres['company_name']."结算";
$amount = $dbres['statement_money']; $amount = $dbres['statement_money'];
$amount = 0.1;//测试金额为0
$payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title);
$resultCode = $payres->code; $resultCode = $payres->code;

@ -22,11 +22,9 @@ class PublicController extends \Think\Controller
//1.验证手机 //1.验证手机
$this->check_moblie($mobile); $this->check_moblie($mobile);
/* 检测验证码 TODO: */ /* 检测验证码 TODO: */
if($verify !== 'txsb0601'){
if (!$this->checksafecode($mobile, $verify)) { if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误'); $this->error('验证码错误');
} }
}
/* 记录登录SESSION和COOKIES */ /* 记录登录SESSION和COOKIES */
$cp_auth = array( $cp_auth = array(
'mobile' => $mobile 'mobile' => $mobile

Loading…
Cancel
Save