diff --git a/Application/Home/Controller/FileController.class.php b/Application/Home/Controller/FileController.class.php index 83138e02f..e784ea258 100644 --- a/Application/Home/Controller/FileController.class.php +++ b/Application/Home/Controller/FileController.class.php @@ -27,7 +27,7 @@ class FileController extends HomeController { C('DOWNLOAD_UPLOAD_DRIVER'), C("UPLOAD_{$file_driver}_CONFIG") ); - + /* 记录附件信息 */ if($info){ $return['data'] = think_encrypt(json_encode($info['download'])); @@ -62,7 +62,7 @@ class FileController extends HomeController { $return = array('status' => 1, 'info' => '上传成功', 'data' => ''); /* 调用文件上传组件上传文件 */ - $Picture = D('Picture'); + $Picture = D('Picture'); $pic_driver = C('PICTURE_UPLOAD_DRIVER'); $info = $Picture->upload( $_FILES, @@ -70,17 +70,20 @@ class FileController extends HomeController { C('PICTURE_UPLOAD_DRIVER'), C("UPLOAD_{$pic_driver}_CONFIG") ); //TODO:上传到远程服务器 - - /* 记录图片信息 */ - if($info){ + /* 记录图片信息 */ + if ($info) { $return['status'] = 1; - $return = array_merge($info['download'], $return); + if (empty($info['download'])) { + $file = $info['file']; + } else { + $file = $info['download']; + } + $return = array_merge($file, $return); } else { $return['status'] = 0; - $return['info'] = $Picture->getError(); + $return['info'] = $Picture->getError(); } - ob_clean(); - /* 返回JSON数据 */ + /* 返回JSON数据 */ $this->ajaxReturn($return); } } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 1229e40d9..1d11552d8 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -156,8 +156,8 @@ class SafeController extends BaseController{ if($_POST) { $id = get_pid(); $ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true); - if($ver_status !== 0) { - return $this->success('认证',U('editModify')); + if($ver_status[0] == 1) { + $this->success('认证',U('editModify')); } $username = $_REQUEST['username']; //真实姓名 $id_card = $_REQUEST["id_card"]; //身份证号码 @@ -312,8 +312,13 @@ class SafeController extends BaseController{ if(!empty(json_decode($address))) { $addressArr = explode(',', json_decode($address)[0]); $promoteInfo['addressdata'] = $addressArr; + $this->assign('addr',json_decode($address)[1]); + }else { + $this->assign('addr','未填写地址'); } $promoteInfo['address'] = json_decode($address); + + $this->assign("ver_status",$promoteInfo['ver_status']); $this->assign('promoteinfo', $promoteInfo); @@ -331,6 +336,8 @@ class SafeController extends BaseController{ $promoteInfo['valuedata'][$key] = $value; } } + $address = json_decode($rs['address'],false)[1]; + $this->assign('addr',$address); $this->assign('ver_status',$rs['ver_status']); $this->assign('rs',$rs); $this->assign('promoteInfo',$promoteInfo); @@ -339,14 +346,18 @@ class SafeController extends BaseController{ } public function edit() { + $id = get_pid(); $tel = $_REQUEST["tel"]; - $address = $_REQUEST["address"]; + $address1 = $_REQUEST["address"]; $email = $_REQUEST["email"]; $account_type = $_REQUEST["account_type"]; $bank = $_REQUEST["bank"]; $agreementpic = $_REQUEST["agreementpic"]; + $Res = M("promote","tab_")->field('address')->where(['id'=>$id])->find(); + $address = json_decode($Res['address'],false); + $address[1] = $address1; $data['mobile_phone'] = $tel; - $data['address'] = $address; + $data['address'] = json_encode($address,TRUE); $data['email'] = $email; $data['account_type'] = $account_type; $data['bank_card'] = $bank; @@ -372,7 +383,7 @@ class SafeController extends BaseController{ $this->assign('bank_card',$rs['bank_card']); $res = [ 'tel'=> $rs['mobile_phone'], - 'address'=> $rs['address'], + 'address'=> json_decode($rs['address'],false)[1], 'email'=> $rs['email'], 'account_type'=> $rs['account_type'], 'bank_card'=> $rs['bank_card'], diff --git a/Application/Home/View/default/Safe/editModify.html b/Application/Home/View/default/Safe/editModify.html index 7aeac9759..d767abb7b 100644 --- a/Application/Home/View/default/Safe/editModify.html +++ b/Application/Home/View/default/Safe/editModify.html @@ -144,7 +144,7 @@ 电话: {$tel}
- 联系地址: {$rs['address']} + 联系地址: {$addr}
邮箱: {$rs['email']} @@ -177,10 +177,17 @@ var address = res.address var email = res.email var account_type = res.account_type + if(account_type == 1) { + var complany = 'checked'; + var personal = ''; + }else { + var complany = ''; + var personal = 'checked'; + } var bank_card = res.bank_card var complanystatus = res.complanystatus var personalstatus = res.personalstatus - console.log(res) + layer.open({ type: 1 ,title: false //不显示标题栏 @@ -199,7 +206,7 @@ +'' +' 邮箱:' +'' - +' 账户类型:公司个人' + +' 账户类型:公司个人' +'' +' 开户银行:' +'' @@ -210,12 +217,15 @@ +'
*须补充修改协议(联系平台签署)
' +'' +'' - +' ' + +' ' +'
' // ,content:content }) + $("#btn").click(function() { + window.location.href = "{:U('safe/editModify')}" + }) var uploaderImgagreementpic = WebUploader.create({ // 选完文件后,是否自动上传。 auto: true, diff --git a/Application/Home/View/default/Safe/modifyBaseInfo.html b/Application/Home/View/default/Safe/modifyBaseInfo.html index 95fc7f4c5..d47fbff1f 100644 --- a/Application/Home/View/default/Safe/modifyBaseInfo.html +++ b/Application/Home/View/default/Safe/modifyBaseInfo.html @@ -54,6 +54,16 @@ 正在审核中,请耐心等待~加急,请联系您的平台对接人员 + +
+ 认证审核成功 +
+ + +
+ 认证审核失败 +
+
@@ -66,12 +76,12 @@ - + @@ -79,10 +89,10 @@ @@ -202,11 +212,11 @@       - - + + - - + +
真实姓名:真实姓名{$ver_status}: - + - +
身份证号码: - + - + @@ -184,11 +194,11 @@
电话: - + - - + +