|
@@ -4,7 +4,7 @@ namespace app\api\controller\company;
|
|
|
|
|
|
use app\common\controller\Apic;
|
|
|
use think\Db;
|
|
|
-
|
|
|
+use app\common\library\Sms;
|
|
|
/**
|
|
|
* 银行卡
|
|
|
*/
|
|
@@ -21,6 +21,18 @@ class Userbank extends Apic
|
|
|
|
|
|
//提现账号添加
|
|
|
public function bankadd() {
|
|
|
+
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置银行卡');
|
|
|
+ }
|
|
|
+ //验证手机和验证码
|
|
|
+ $captcha = input('captcha', '', 'trim'); //账户真实姓名
|
|
|
+ if (!Sms::check($this->auth->mobile, $captcha, 'mobilelogin')) {
|
|
|
+ $this->error('验证码错误');
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
$bank_account = input('bank_account', '', 'trim'); //账户真实姓名
|
|
|
$bank_card = input('bank_card', '', 'trim'); //卡号或账号
|
|
|
$bank_name = input('bank_name', '', 'trim'); //银行名称
|
|
@@ -62,6 +74,18 @@ class Userbank extends Apic
|
|
|
|
|
|
//提现账号编辑
|
|
|
public function bankedit(){
|
|
|
+
|
|
|
+ //验证
|
|
|
+ if($this->auth->type != 1){
|
|
|
+ $this->error('只有门店老板才能设置银行卡');
|
|
|
+ }
|
|
|
+ //验证手机和验证码
|
|
|
+ $captcha = input('captcha', '', 'trim'); //账户真实姓名
|
|
|
+ if (!Sms::check($this->auth->mobile, $captcha, 'mobilelogin')) {
|
|
|
+ $this->error('验证码错误');
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
$id = input('id', 0, 'intval'); //账号id
|
|
|
$bank_account = input('bank_account', '', 'trim'); //账户真实姓名
|
|
|
$bank_card = input('bank_card', '', 'trim'); //卡号或账号
|