master
ELF 4 years ago
parent e441f030c0
commit 9d041f7c8a

@ -177,17 +177,16 @@ class SafeController extends BaseController{
//修改用户信息
public function modifyBaseInfo() {
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
$loginPromote = $this->getLoginPromote();
$id = $loginPromote['id'];
if(empty($loginPromote['second_pwd'])) {
$this->display('Public/setSafePwd');
exit;
}
$metaTitle = '基础信息';
$modelList = ['基础信息', $metaTitle];
$this->verifyPasswordView($modelList);
$ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true);
if($ver_status[0] == 1) {
if($loginPromote['ver_status'] == 1) {
//return $this->display('editModify');
$this->redirect('editModify');
exit;
@ -265,12 +264,12 @@ class SafeController extends BaseController{
return false;
}
if(empty($bank_account)) {
$this->error("银行户名不能为空");
$this->error("银行户名不能为空");
return false;
}
$bank_account_pattern = "/^[\x{4e00}-\x{9fa5}]{2,}$/u";
if (!preg_match($bank_account_pattern, $bank_account)) {
$this->error('银行卡开户人姓名错误');
$this->error('银行账户名格式错误');
return false;
}
if(empty($bank_card)) {
@ -323,6 +322,14 @@ class SafeController extends BaseController{
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
if ($loginPromote['level'] == 1 && $loginPromote['company_id'] > 0 && $loginPromote['withdraw_done'] == 1) {
M('promote_company', 'tab_')->where(['id' => $loginPromote['company_id']])->update([
'alipay_account' => $alipayaccount,
'ali_user' => $alipayrealname,
]);
}
recordPromoteLogs('安全管理','修改用户信息');
$this->success("更新信息成功");
}else {
@ -330,8 +337,7 @@ class SafeController extends BaseController{
}
}else {
$id = get_PID();
} else {
$result = M("promote","tab_")->where(['id'=>$id])->select();
$promoteInfo = $result[0];
$idcarpic = $promoteInfo['idcarpic'];
@ -383,8 +389,6 @@ class SafeController extends BaseController{
$this->assign("promoteCompany",$promoteCompany);
$this->assign("ver_status",$promoteInfo['ver_status']);
$this->assign('promoteinfo', $promoteInfo);
}
$this->display();
}
@ -407,6 +411,7 @@ class SafeController extends BaseController{
}
public function edit() {
$loginPromote = $this->getLoginPromote();
$id = get_pid();
$tel = $_REQUEST["tel"];
$address1 = $_REQUEST["address"];
@ -522,12 +527,20 @@ class SafeController extends BaseController{
$agreementpic ? $data['anothpic'] = $agreementpic : null;
$id = get_pid();
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
recordPromoteLogs('安全管理','二次修改信息');
$this->success("更新信息成功",U('modifyBaseInfo'));
}else {
$this->error("更新信息失败");
if($updateRs) {
if ($loginPromote['level'] == 1 && $loginPromote['company_id'] > 0 && $loginPromote['withdraw_done'] == 1) {
M('promote_company', 'tab_')->where(['id' => $loginPromote['company_id']])->update([
'alipay_account' => $alipayaccount,
'ali_user' => $alipayrealname,
]);
}
recordPromoteLogs('安全管理','二次修改信息');
$this->success("更新信息成功",U('modifyBaseInfo'));
}else {
$this->error("更新信息失败");
}
}
public function ajaxEdit() {

Loading…
Cancel
Save