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}
真实姓名: | +真实姓名{$ver_status}: | - + - + | @@ -79,10 +89,10 @@
身份证号码: | - + - + @@ -184,11 +194,11 @@ | |
电话: | - + - - + + | @@ -202,11 +212,11 @@ - - + + - - + +