浏览代码

1、企业修改头像
2、增加个人注册及个人中心、修改头像

sugangqiang 1 年之前
父节点
当前提交
4389b8c1b5

+ 8 - 2
app/common/api/MenuApi.php

@@ -257,14 +257,20 @@ class MenuApi {
 
     public static function getPersonMenuList($type) {
         $menus = [];
-        $menus[] = ["type" => [1], "code" => "grzx", "pcode" => "0", "name" => "个人中心", "url" => "/person/center_page", "icon" => "fa-user", "status" => 1];
+        $menus[] = ["type" => [1], "code" => "grzx", "pcode" => "0", "name" => "个人中心", "url" => "/person/index/center_page", "icon" => "fa-user", "status" => 1];
         $menus[] = ["type" => [1], "code" => "znjx", "pcode" => "0", "name" => "子女就学", "url" => "#", "icon" => "fa-graduation-cap", "status" => 1];
         $menus[] = ["type" => [1], "code" => "znzx", "pcode" => "znjx", "name" => "子女择校", "url" => "/person/education/choose", "icon" => "fa-thumbs-up", "status" => 1];
         foreach ($menus as $key => $menu) {
             if (!in_array($type, $menu["type"]) || ($menu["pcode"]) != "0" && $menu["url"] == "" || $menu["status"] == 0)
                 unset($menus[$key]);
         }
-        return self::buildMenu($menus);
+        $menus = self::buildMenu($menus);
+        for ($i = 0; $i < count($menus); $i++) {
+            $menu_items_count = count($menus[$i]["children"]);
+            if ($menu_items_count > 0 || ($menu_items_count == 0 && $menus[$i]["url"] != ""))
+                $tmp[] = $menus[$i];
+        }
+        return $tmp;
     }
 
 }

+ 32 - 7
app/common/api/MessageRecordApi.php

@@ -18,21 +18,46 @@ class MessageRecordApi {
         if ($name) {
             $where[] = ["name", "like", "%{$name}%"];
         }
-        if($phone){
+        if ($phone) {
             $where[] = ["phone", "like", "%{$phone}%"];
         }
-        if($type){
+        if ($type) {
             $where[] = ["type", "=", "{$type}"];
         }
-        if($state){
+        if ($state) {
             $where[] = ["type", "=", "{$state}"];
         }
         $count = MessageRecord::whereOr($where)->count();
         $list = MessageRecord::whereOr($where)
-            ->order(["createTime" => $order])
-            ->limit($offset, $limit)
-            ->select()->toArray();
+                        ->order(["createTime" => $order])
+                        ->limit($offset, $limit)
+                        ->select()->toArray();
         return ["total" => $count, "rows" => $list];
     }
-}
 
+    public static function checkVerificationCode($phone, $code) {
+        $response = new \stdClass();
+        $response->code = 500;
+        $codeResult = MessageRecord::where('smsType', 1)->where('phone', $phone)->order('createTime', 'desc')->find();
+
+        if (!$codeResult) {
+            $response->msg = "请先发送验证码";
+            return $response;
+        }
+        if (!$code) {
+            $response->msg = "请输入手机验证码";
+            return $response;
+        }
+        if ($codeResult["params"] != $code) {
+            $response->msg = "验证码错误";
+            return $response;
+        }
+        if (time() - strtotime($codeResult['createTime']) > 300) {
+            $response->msg = "验证码过期,请重新发送";
+            return $response;
+        }
+        $response->code = 200;
+        return $response;
+    }
+
+}

+ 42 - 8
app/common/controller/Auth.php

@@ -208,7 +208,11 @@ class Auth extends BaseController {
                     $response_object->msg = '请先发送验证码';
                     return \StrUtil::back($response_object, "Register.epCallBack");
                 }
-
+                if ($codeResult['params'] != $data["verificationCode"]) {
+                    $response_object->code = 500;
+                    $response_object->msg = '验证码错误';
+                    return \StrUtil::back($response_object, "Register.epCallBack");
+                }
                 if (time() - strtotime($codeResult['createTime']) > 300) {
                     $response_object->code = 500;
                     $response_object->msg = '验证码过期,请重新发送';
@@ -639,6 +643,7 @@ class Auth extends BaseController {
     public function person_register() {
         $source = intval($this->request['source']);
         $response_object = new \StdClass();
+        $response_object->code = 500;
         $data = [
             'username' => \StrUtil::getRequestDecodeParam($this->request, 'username'),
             'password' => \StrUtil::getRequestDecodeParam($this->request, 'password'),
@@ -646,23 +651,52 @@ class Auth extends BaseController {
             'idCard' => \StrUtil::getRequestDecodeParam($this->request, 'idCard'),
             'sex' => \StrUtil::getRequestDecodeParam($this->request, 'sex'),
             'phone' => \StrUtil::getRequestDecodeParam($this->request, 'phone'),
-            'verificationCode' => \StrUtil::getRequestDecodeParam($this->request, 'verificationCode'),
         ];
+        $verificationCode = \StrUtil::getRequestDecodeParam($this->request, 'verificationCode');
         try {
-            validate(Person::class)->batch(true)->check($data);
+            validate(Person::class)->batch(true)->scene('add')->check($data);
             //检验验证码
             $codeResult = MessageRecord::where('smsType', 1)->where('phone', $data['phone'])->order('createTime', 'desc')->find();
+
             if (!$codeResult) {
-                return json(['msg' => '请先发送验证码']);
+                throw new ValidateException("请先发送验证码");
+            }
+            if (!$verificationCode) {
+                throw new ValidateException("请输入手机验证码");
+            }
+            if ($codeResult["params"] != $verificationCode) {
+                throw new ValidateException("验证码错误");
+            }
+            if (time() - strtotime($codeResult['createTime']) > 300) {
+                throw new ValidateException("验证码过期,请重新发送");
             }
 
-            $info = Talent::where('idCard', $data['idCard'])->where('checkState', TalentState::CERTIFICATED)->findOrEmpty();
+            $info = Talent::where('card_number', $data['idCard'])->alias("ti")
+                            ->field("ti.*,e.type as enterpriseType")
+                            ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
+                            ->where('ti.checkState', TalentState::CERTIFICATED)->find();
             if (!$info) {
-                return json(['msg' => '人才库中不存在该证件号码,注册失败']);
+                throw new ValidateException("人才库中不存在该证件号码,注册失败");
+            }
+            if ($info["phone"] != $data["phone"]) {
+                throw new ValidateException("手机号码必须与人才库中一致,可联系企业经办人修改人才库手机号码");
             }
+            $data["id"] = getStringId();
+            $data["type"] = $info["enterpriseType"];
+            $data["createTime"] = date("Y-m-d H:i:s");
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            $data["password"] = md5($data["password"]);
+            $data["active"] = 1;
+            \app\admin\model\Person::insert($data);
+            $response_object->code = 200;
+            $response_object->msg = "注册成功";
+            return json($response_object);
         } catch (ValidateException $e) {
-            $error = $e->getError();
-            return json(['msg' => array_pop($error)]);
+            $response_object->msg = $e->getError();
+            return json($response_object);
+        } catch (\think\db\exception\DbException $e) {
+            $response_object->msg = $e->getMessage();
+            return json($response_object);
         }
     }
 

+ 20 - 13
app/common/validate/Person.php

@@ -11,10 +11,11 @@ class Person extends Validate {
         'username' => 'require|max:50|unique:un_person',
         'password' => 'require',
         'name' => 'require|max:100',
-        'idCard' => 'require|idCard|unique:un_person',
+        'idCard' => 'require|checkIdCard',
         'sex' => 'require',
         'phone' => 'require|mobile|unique:un_person',
-        'verificationCode' => 'require'
+        'address' => 'max:100',
+        'email' => 'email'
     ];
     protected $message = [
         'username.require' => '请填写账号!',
@@ -23,23 +24,29 @@ class Person extends Validate {
         'password.require' => '请填写密码!',
         'name.require' => '请输入姓名',
         'name.max' => '姓名最多100个字符!',
-        'idCard.require' => '请填写身份证!',
-        'idCard.idCard' => '请填写正确的身份证!',
-        'idCard.unique' => '该身份证已存在',
+        'idCard.require' => '请填写证件号码!',
         'sex.require' => '性别必须选择',
         'phone.require' => '请填写手机号',
         "phone.mobile" => "请填写正确的手机号",
-        'phone.unique' => '该手机号已存在',
-        'verificationCode.require' => '请输入手机验证码'
+        'phone.unique' => '该手机号已被注册',
+        'address.max' => '联系地址最多100个字符!',
+        'email.email' => '不是正确的邮箱格式'
     ];
 
-    protected function checkID($value,$rule,$data=[]){
-        $info = PersonModel::where('idCard',$value)->where('active',1)->where('id','<>',$data['id'])->find();
-        if($info){
-            return "该身份证已存在";
-        }else{
+    protected function checkIdCard($value, $rule, $data = []) {
+        if (!\app\common\api\IdCardApi::isValid($value) && !preg_match("/^([a-zA-z]|[0-9]){5,17}$/", $value) && !preg_match("/^[a-zA-Z0-9]{6,10}$/", $value) && !preg_match("/^([0-9]{8}|[0-9]{10})$/", $value))
+            return "请填写正确的证件号码!";
+        $info = PersonModel::where('idCard', $value)->where('active', 1)->where('id', '<>', $data['id'])->find();
+        if ($info) {
+            return "该证件号码已被注册";
+        } else {
             return true;
         }
     }
 
-}
+    protected $scene = [
+        'add' => ['username', 'password', 'name', 'idCard', 'sex', 'phone'],
+        'basic' => ['address'],
+    ];
+
+}

+ 47 - 0
app/enterprise/controller/Api.php

@@ -985,4 +985,51 @@ class Api extends EnterpriseController {
         }
     }
 
+    public function gotoChangeHeadPortraitPage() {
+        $uid = $this->user["uid"];
+        $userInfo = EnterpriseApi::getOne($uid);
+        return view("enterprise_change_head", ["headPortrait" => $userInfo["headPortrait"]]);
+    }
+
+    public function changeHeadPortrait() {
+        $response = new \stdClass();
+        $response->code = 500;
+
+        $uid = $this->user["uid"];
+        $userInfo = EnterpriseApi::getOne($uid);
+
+        if ($this->request->file()) {
+            $headPortrait = $this->request->file("headPortrait");
+            $upload = new \app\common\api\UploadApi();
+            $result = $upload->uploadOne($headPortrait, "image", "person/photo");
+            if ($result->code != 200) {
+                $response->msg = $result->msg;
+                return \StrUtil::back($response, "ech.callback");
+            }
+            if ($userInfo["headPortrait"]) {
+//如果新照片符合像素要求,则删除旧照片
+                $old_head_url = "storage/" . $userInfo ["headPortrait"];
+                if (file_exists($old_head_url))
+                    @unlink(
+                                    $old_head_url);
+            }
+            $data["id"] = $uid;
+            $data["headPortrait"] = $result->filepath;
+            $data["updateUser"] = $uid;
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            EnterpriseApi::updateById($data);
+
+            $user = new \app\common\api\UserApi($userInfo["username"], "", 2);
+            $user->setSession();
+
+            $response->code = 200;
+            $response->msg = "修改成功!";
+            $response->url = getStoragePath($result->filepath);
+            return \StrUtil::back($response, "ech.callback");
+        } else {
+            $response->msg = "没有上传新头像";
+            return \StrUtil::back($response, "ech.callback");
+        }
+    }
+
 }

+ 32 - 0
app/enterprise/view/api/enterprise_change_head.html

@@ -0,0 +1,32 @@
+{extend name="layout/content" /}
+{block name="content"}
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal" id="head_modify">
+            <div class="row">
+                <div class="col-sm-6" style="padding: 0px; height: 200px;">
+                    <div class="col-sm-8" style="height: 100%;">
+                        {if condition="!$headPortrait"}
+                        <img id="head_portrait" alt="" src="/static/img/photoGirl.gif" style="max-height: 200px; max-width:100%; bottom: 1px; position: absolute;">
+                        {else/}
+                        <img id="head_portrait" alt="" src="{$headPortrait|getStoragePath}" style="max-height: 200px; max-width:100%; bottom: 1px; position: absolute;">
+                        {/if}
+                    </div>
+                    <div class="col-sm-4" style="height: 100%;">
+                        <form target="hidden_frame" id="form_head" action="/enterprise/api/changeHeadPortrait" method="post" enctype="multipart/form-data">
+                            <input type="file" onchange="ech.fileChange()" id="headPortrait" name="headPortrait" style="display: none;"/>
+                        </form>
+                        &nbsp;&nbsp;&nbsp;&nbsp;<button onclick="ech.chageHead()" class="btn btn-sm btn-primary" style="bottom: 1px; position: absolute;">修改头像</button>
+                    </div>
+                </div>
+                <div class="col-sm-6" style="padding: 0px;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+<iframe style="display: none;" id="hidden_frame" name="hidden_frame"></iframe>
+<!--<script src="${ctxPath}/static/modular/gate/enterprise/enterprise_change_head.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/enterprise/enterprise_change_head.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 1 - 1
app/enterprise/view/layout/layout.html

@@ -58,7 +58,7 @@
                     area: ['830px', '500px'], //宽高
                     fix: false, //不固定
                     maxmin: true,
-                    content: basePath + '/api/enterpriseUser/gotoChangeHeadPortraitPage',
+                    content: basePath + '/enterprise/api/gotoChangeHeadPortraitPage',
                     btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
                     btn1: function (index, layero) {
                         layer.close(index);

+ 1 - 1
app/enterprise/view/layout/tab.html

@@ -8,7 +8,7 @@
                     <span onclick="gotoChangeHeadPortraitPage()"><img id="head_portrait" alt="image" class="img-circle"
                                {if condition="!$user['avatar']"}src="/static/img/photoGirl.jpg"
                                {else/}
-                                    src="{$user.avatar}"
+                                    src="{$user.avatar|getStoragePath}"
                                {/if}
                                width="64px" height="64px"/></span>
                     <a data-toggle="dropdown" class="dropdown-toggle" href="#">

+ 1 - 1
app/index/view/auth/login.html

@@ -75,7 +75,7 @@
                                 <option value="">--- 请选择用户类型 ---</option>
                                 <option value="1">管理员用户</option>
                                 <option value="2">机构用户</option>
-                                <!--<option value="3">个人用户</option>-->
+                                <option value="3">个人用户</option>
                             </select>
                         </div>
                         <div class="form-group">

+ 0 - 18
app/person/controller/CenterPage.php

@@ -1,18 +0,0 @@
-<?php
-
-namespace app\person\controller;
-
-use app\person\common\PersonController;
-
-/**
- * Description of CenterPageController
- *
- * @author sgq
- */
-class CenterPage extends PersonController {
-
-    public function index() {
-        return view();
-    }
-
-}

+ 15 - 0
app/person/controller/Index.php

@@ -3,6 +3,7 @@
 namespace app\person\controller;
 
 use app\person\common\PersonController;
+use app\admin\model\Person as PersonModel;
 
 /**
  * Description of Index
@@ -22,4 +23,18 @@ class Index extends PersonController {
         return view("", $vars);
     }
 
+    public function center_page() {
+        $uid = $this->user["uid"];
+        $person = PersonModel::where("id", $uid)->find();
+        if (!$person["active"]) {
+            $person["activeName"];
+        } else if ($person["active"] == 1) {
+            $person["activeName"] = "账号有效";
+            $person["activeMsg"] = "";
+        } else if ($person["active"] == 2) {
+            $person["activeName"] = "冻结/拉黑";
+        }
+        return view("", ["person" => $person]);
+    }
+
 }

+ 216 - 0
app/person/controller/UserInfo.php

@@ -0,0 +1,216 @@
+<?php
+
+namespace app\person\controller;
+
+use app\person\common\PersonController;
+use app\common\model\Person as PersonModel;
+use app\common\api\UserApi;
+
+/**
+ * Description of UserInfo
+ *
+ * @author sgq
+ */
+class UserInfo extends PersonController {
+
+    public function index() {
+        return view();
+    }
+
+    public function changeBasic() {
+        $uid = $this->user["uid"];
+        $response_object = new \StdClass();
+        $response_object->code = 500;
+        $data = [
+            //'name' => \StrUtil::getRequestDecodeParam($this->request, 'name'),
+            //'idCard' => \StrUtil::getRequestDecodeParam($this->request, 'idCard'),
+            //'sex' => \StrUtil::getRequestDecodeParam($this->request, 'sex'),
+            //'email' => \StrUtil::getRequestDecodeParam($this->request, 'email'),
+            'address' => \StrUtil::getRequestDecodeParam($this->request, 'address')
+        ];
+        try {
+            validate(\app\common\validate\Person::class)->batch(true)->scene('basic')->check($data);
+            $data["id"] = $uid;
+            $data["updateUser"] = $uid;
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            PersonModel::update($data);
+
+            $user = new UserApi($this->user["account"], "", 3);
+            $user->setSession();
+
+            $response_object->code = 200;
+            $response_object->msg = "修改完成!";
+            return json($response_object);
+        } catch (\Exception $ex) {
+            $response_object->msg = $ex->getMessage();
+            return json($response_object);
+        }
+    }
+
+    public function changePwd() {
+        $uid = $this->user["uid"];
+        $response_object = new \StdClass();
+        $response_object->code = 500;
+        $params = [
+            'password' => \StrUtil::getRequestDecodeParam($this->request, 'password'),
+            'newPassword' => \StrUtil::getRequestDecodeParam($this->request, 'newPassword'),
+            'newRePassword' => \StrUtil::getRequestDecodeParam($this->request, 'newRePassword')
+        ];
+        //新密码 与  原始密码不能为空
+        if (!$params["password"]) {
+            $response_object->msg = "请填写原密码!";
+            return json($response_object);
+        }
+        if (!$params["newPassword"]) {
+            $response_object->msg = "请填写新密码!";
+            return json($response_object);
+        }
+        if (!$params["newRePassword"]) {
+            $response_object->msg = "请填写重复新密码!";
+            return json($response_object);
+        }
+        if ($params["newPassword"] != $params["newRePassword"]) {
+            $response_object->msg = "两次输入的新密码不一致!";
+            return json($response_object);
+        }
+        if (!preg_match("/^(?=.*\\d)(?=.*[A-Za-z]).{8,}$/", $params["newPassword"])) {
+            $response_object->msg = "密码必须包含字母、数字、特殊符号且长度超过8位!";
+            return json($response_object);
+        }
+        $userInfo = PersonModel::where("id", $uid)->find();
+        if ($userInfo["password"] != md5($params ["password"])) {
+            $response_object->msg = "原密码错误!";
+            return json($response_object);
+        }
+        try {
+            $data["id"] = $uid;
+            $data["password"] = md5($params["newPassword"]);
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            PersonModel::update($data);
+
+            $user = new UserApi($userInfo["username"], "", 3);
+            $user->setSession();
+
+            $response_object->code = 200;
+            $response_object->msg = "修改成功!";
+            return json($response_object);
+        } catch (\Exception $e) {
+            $response_object->msg = $ex->getMessage();
+            return json($response_object);
+        }
+    }
+
+    public function changePhone() {
+        $uid = $this->user["uid"];
+        $response_object = new \StdClass();
+        $response_object->code = 500;
+        $params = [
+            'phone' => \StrUtil::getRequestDecodeParam($this->request, 'phone'),
+            'verificationCode' => \StrUtil::getRequestDecodeParam($this->request, 'verificationCode'),
+            'newPhone' => \StrUtil::getRequestDecodeParam($this->request, 'newPhone')
+        ];
+        //当前号码、验证码、新号码不能为空
+        if (!$params["phone"]) {
+            $response_object->msg = "当前号码不能为空!";
+            return json($response_object);
+        }
+        if (!$params["verificationCode"]) {
+            $response_object->msg = "请填写验证码!";
+            return json($response_object);
+        }
+        if (!$params["newPhone"]) {
+            $response_object->msg = "请填写新号码!";
+            return json($response_object);
+        }
+        //新号码格式必须正确
+        if (!preg_match("/^1\\d{10}$/", $params["newPhone"])) {
+            $response_object->msg = "新号码格式有误!";
+            return json($response_object);
+        }
+        //验证码验证
+        $codeVerify = \app\common\api\MessageRecordApi::checkVerificationCode($params["phone"], $params["verificationCode"]);
+        if ($codeVerify->code != 200) {
+            $response_object->msg = $codeVerify->msg;
+            return json($response_object);
+        }
+        try {
+            $userInfo = PersonModel::where("id", $uid)->find();
+            $where = [];
+            $where[] = ["card_number", "=", $userInfo["idCard"]];
+            $where[] = ["checkState", "=", \app\common\api\TalentState::CERTIFICATED];
+            $talentInfo = \app\enterprise\model\Talent::where($where)->order("createTime desc")->find();
+            //查询该证件号码和手机号是否在库
+            if (!$talentInfo) {
+                $response_object->msg = "人才库中不存在该证件号码,修改失败!";
+                return json($response_object);
+            }
+            if ($talentInfo["phone"] != $params["newPhone"]) {
+                $response_object->msg = "手机号码必须与人才库中一致,可联系企业经办人修改人才库手机号码后再行修改";
+                return json($response_object);
+            }
+            $data["id"] = $uid;
+            $data["phone"] = $params["newPhone"];
+            $data["updateUser"] = $uid;
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            PersonModel::update($data);
+
+            $user = new UserApi($userInfo["username"], "", 3);
+            $user->setSession();
+
+            $response_object->code = 200;
+            $response_object->msg = "修改成功!";
+            return json($response_object);
+        } catch (\Exception $e) {
+            $response_object->msg = $e->getMessage();
+            return json($response_object);
+        }
+    }
+
+    public function gotoChangeHeadPortraitPage() {
+        $uid = $this->user["uid"];
+        $userInfo = PersonModel::where("id", $uid)->find();
+        return view("person_change_head", ["headPortrait" => $userInfo["headPortrait"]]);
+    }
+
+    public function changeHeadPortrait() {
+        $response = new \stdClass();
+        $response->code = 500;
+
+        $uid = $this->user["uid"];
+        $userInfo = PersonModel::where("id", $uid)->find();
+
+        if ($this->request->file()) {
+            $headPortrait = $this->request->file("headPortrait");
+            $upload = new \app\common\api\UploadApi();
+            $result = $upload->uploadOne($headPortrait, "image", "person/photo");
+            if ($result->code != 200) {
+                $response->msg = $result->msg;
+                return \StrUtil::back($response, "ech.callback");
+            }
+            if ($userInfo["headPortrait"]) {
+//如果新照片符合像素要求,则删除旧照片
+                $old_head_url = "storage/" . $userInfo ["headPortrait"];
+                if (file_exists($old_head_url))
+                    @unlink(
+                                    $old_head_url);
+            }
+            $data["id"] = $uid;
+            $data["headPortrait"] = $result->filepath;
+            $data["updateUser"] = $uid;
+            $data["updateTime"] = date("Y-m-d H:i:s");
+            PersonModel::update($data);
+
+            $user = new UserApi($userInfo["username"], "", 3);
+            $user->setSession();
+
+            $response->code = 200;
+            $response->msg = "修改成功!";
+            $response->url = getStoragePath($result->filepath);
+            return \StrUtil::back($response, "ech.callback");
+        } else {
+            $response->msg = "没有上传新头像";
+            return \StrUtil::back($response, "ech.callback");
+        }
+    }
+
+}

+ 0 - 395
app/person/view/center_page/index.html

@@ -1,395 +0,0 @@
-{extend name="layout/content"}
-{block name="content"}
-<style type="text/css">
-    .spacing {
-        margin-bottom: 10px;
-        padding-right: 4px;
-        padding-left: 4px;
-    }
-    table {
-        word-wrap: break-word;
-        word-break: break-all
-    }
-
-    .layui-layer-btn .layui-layer-btn1 {
-        border-color: #009688;
-        background-color: #009688;
-        color: #fff;
-    }
-    .key{
-        width: 150px;
-        text-align: right;
-        background-color: #f0f9eb;
-    }
-    .value1{
-        width: 240px;
-    }
-</style>
-<div class="ibox float-e-margins">
-    <div class="ibox-title">
-        <h5>机构用户中心</h5>
-    </div>
-    <div class="ibox-content">
-        <div class="form-horizontal">
-            <div class="row">
-                <div class="col-sm-12">
-                    <div class="tabs-container">
-                        <ul class="nav nav-tabs">
-                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
-                            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">机构信息变更</a></li>
-                            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">修改密码</a></li>
-                            <!--              <li class="" ><a data-toggle="tab" href="#tab-4" aria-expanded="false">绑定聚才网账号</a></li>-->
-                        </ul>
-                        <div class="tab-content">
-                            <div id="tab-1" class="tab-pane active">
-                                <div class="panel-body">
-                                    <div class="panel panel-default">
-                                        <div class="panel-heading">{eq name="ep.special" value="0"}企业{else/}单位{/eq}信息</div>
-                                        <div class="panel-body">
-
-                                            <table style="width:100%" class="table table-bordered">
-                                                <tr>
-                                                    <td class="key">
-                                                        账号
-                                                    </td>
-                                                    <td class="value1">
-                                                        {$ep.username}
-                                                    </td>
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}名称
-                                                    </td>
-                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
-                                                        {$ep.name}
-                                                    </td>
-                                                    <td rowspan="4"  style="border: 1px solid #c0a16b">
-                                                        <label>{eq name="ep.special" value="0"}营业执照{else/}事业单位法人证或批文{/eq}</label>
-                                                        {if condition="$ep['imgurl']"}
-                                                        {if condition="$ep['imgurl_is_img'] eq 1"}
-                                                        <img onclick="Feng.showImg(this)" id="yyzz" src="{$ep.imgurl|getStoragePath}" style="max-height:60px">
-                                                        {else/}
-                                                        <img onclick="Feng.showPdf('{$ep.imgurl|getStoragePath}', 'imgurl')" src="/static/img/Pdf.png" style="max-height:60px">
-                                                        {/if}
-                                                        {/if}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-                                                    <td class="key">
-                                                        统一社会信用代码
-                                                    </td>
-                                                    <td>
-                                                        {$ep.idCard}
-                                                    </td>
-                                                    <td class="key">
-                                                        法人代表
-                                                    </td>
-                                                    <td>
-                                                        {$ep.legal}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-                                                    <td class="key">
-                                                        所属街道
-                                                    </td>
-                                                    <td>
-                                                        {$ep.streetName}
-                                                    </td>
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}电话
-                                                    </td>
-                                                    <td>
-                                                        {$ep.ephone}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}地址
-                                                    </td>
-                                                    <td colspan="3">
-                                                        {$ep.address}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}银行账号
-                                                    </td>
-                                                    <td>
-                                                        {$ep.bankCard}
-                                                    </td>
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}开户银行
-                                                    </td>
-                                                    <td style="border-right: 1px solid #c0a16b">
-                                                        {$ep.bank}
-                                                    </td>
-                                                    <td rowspan="2" style="border: 1px solid #c0a16b">
-                                                        <label>开户许可证/基本存款账户信息</label>
-                                                        {if condition="$ep['bankImg']"}
-                                                        {if condition="$ep['bankImg_is_img'] eq 1"}
-                                                        <img onclick="Feng.showImg(this)" id="bankImg" src="{$ep.bankImg|getStoragePath}" style="max-height:60px">
-                                                        {else/}
-                                                        <img onclick="Feng.showPdf('{$ep.bankImg|getStoragePath}', 'bankImg')" src="/static/img/Pdf.png" style="max-height:60px">
-                                                        {/if}
-                                                        {/if}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-                                                    <td class="key">
-                                                        {eq name="ep.special" value="0"}企业{else/}单位{/eq}开户银行网点
-                                                    </td>
-                                                    <td>
-                                                        {$ep.bankNetwork}
-                                                    </td>
-                                                    {eq name="ep.special" value="3"}
-                                                    <td class="key">机构标签</td>                                                            
-                                                    <td>{$ep.organizationTagName}</td>
-                                                    {/eq}
-                                                    {eq name="ep.special" value="1"}
-                                                    <td class="key">单位标签</td>                                                            
-                                                    <td>{$ep.institutionTagName}</td>
-                                                {/eq}
-                                                </tr>
-                                            </table>
-                                            {eq name="ep.special" value="0"}
-                                            <p>
-                                                申报类型:
-                                                {switch name="ep.type"}
-                                                {case value="1"}晋江市现代产业体系人才{if condition="$ep['agencyTypeName']"}({$ep.agencyTypeName}){/if}{/case}
-                                                {case value="2"}集成电路优秀人才{/case}
-                                                {/switch}
-                                                <input type="hidden" id="type" value="{$ep.type}">
-                                            </p>
-                                            {if condition="$ep['type'] eq 1"}
-                                            <table style="width:100%;table-layout:fixed;" class="table table-bordered">
-                                                {if condition="$ep['agencyType'] eq 1"}
-                                                <tr class="type1">
-                                                    <td  class="key">
-                                                        产业领域
-                                                    </td>
-                                                    <td class="value1">
-                                                        {$ep.industryFieldNewName}
-                                                    </td>
-                                                    <td  class="key">
-                                                        行业领域
-                                                    </td>
-                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
-                                                        {$ep.industryFieldOldName}
-                                                    </td>
-                                                    <td style="border: 1px solid #c0a16b">
-                                                        <label>行业领域佐证材料</label>
-                                                        {if condition="$ep['domainImg']"}
-                                                        {if condition="$ep['domainImg_is_img'] eq 1"}
-                                                        <img onclick="Feng.showImg(this)" id="domainImg" src="{$ep.domainImg|getStoragePath}" style="max-height:60px">
-                                                        {else/}
-                                                        <img onclick="Feng.showPdf('{$ep.domainImg|getStoragePath}', 'domainImg')" src="/static/img/Pdf.png" style="max-height:60px">
-                                                        {/if}
-                                                        {/if}
-                                                    </td>
-                                                </tr>
-                                                {/if}
-                                                <tr class="type1">
-                                                    <td  class="key">
-                                                        企业标签
-                                                    </td>
-                                                    <td>
-                                                        {$ep.enterpriseTagName}
-                                                    </td>
-                                                    <td  class="key">
-                                                        企业类型
-                                                    </td>
-                                                    <td style="border-right:1px solid #c0a16b;">
-                                                        {$ep.enterpriseTypeName}
-                                                    </td>
-                                                    <td style="border: 1px solid #c0a16b">
-                                                        <label>规上、高新技术、专精特新企业上传材料</label>
-                                                        {if condition="$ep['typeImg']"}
-                                                        {if condition="$ep['typeImg_is_img'] eq 1"}
-                                                        <img onclick="Feng.showImg(this)" id="domainImg" src="{$ep.typeImg|getStoragePath}" style="max-height:60px">
-                                                        {else/}
-                                                        <img onclick="Feng.showPdf('{$ep.typeImg|getStoragePath}', 'typeImg')" src="/static/img/Pdf.png" style="max-height:60px">
-                                                        {/if}
-                                                        {/if}
-                                                    </td>
-                                                </tr>
-                                            </table>
-                                            {/if}
-                                            {/eq}
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="panel-body">
-                                    <div class="panel panel-default">
-                                        <div class="panel-heading">人才联络员信息</div>
-                                        <div class="panel-body">
-                                            <table style="width:100%" class="table table-bordered">
-                                                <tr>
-                                                    <td class="key">
-                                                        姓名
-                                                    </td>
-                                                    <td class="value1">
-                                                        {$ep.agentName}
-                                                    </td>
-                                                    <td class="key">
-                                                        人才联络员电话
-                                                    </td>
-                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
-                                                        {$ep.agentPhone}
-                                                    </td>
-                                                    <td rowspan="2" style="border: 1px solid #c0a16b">
-                                                        <label>人才联络员信息备案表</label>
-                                                        {if condition="$ep['beian']"}
-                                                        {if condition="$ep['beian_is_img'] eq 1"}
-                                                        <img onclick="Feng.showImg(this)" id="domainImg" src="{$ep.beian|getStoragePath}" style="max-height:60px">
-                                                        {else/}
-                                                        <img onclick="Feng.showPdf('{$ep.beian|getStoragePath}', 'beian')" src="/static/img/Pdf.png" style="max-height:60px">
-                                                        {/if}
-                                                        {/if}
-                                                    </td>
-                                                </tr>
-                                                <tr>
-                                                    <td class="key">
-                                                        人才联络员邮箱
-                                                    </td>
-                                                    <td class="value1">
-                                                        {$ep.agentEmail}
-                                                    </td>
-                                                    <td colspan="2"></td>
-                                                </tr>
-
-                                            </table>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-
-                            <div id="tab-2" class="tab-pane">
-                                <br/>
-                                <div class="row">
-                                    <div class="hidden-xs" id="tableToolbar" role="group">
-                                        <button type="button" class="btn btn-sm btn-primary"
-                                                onclick="EnterpriseCenter.addEnterprisechangeRecord()"><i
-                                                class="fa fa-plus"></i>申请变更
-                                        </button>
-                                        <button type="button" class="btn btn-sm btn-primary"
-                                                onclick="EnterpriseCenter.updateEnterprisechangeRecord()"><i
-                                                class="fa fa-edit"></i>修改
-                                        </button>
-                                        <button type="button" class="btn btn-sm btn-primary"
-                                                onclick="EnterpriseCenter.showEnterprisechangeRecordDetail()"><i
-                                                class="fa fa-info"></i>查看详情
-                                        </button>
-                                    </div>
-                                    <table id="table">
-                                    </table>
-                                </div>
-                            </div>
-                            <div id="tab-3" class="tab-pane">
-                                <div class="panel-body" style="width:900px;">
-                                    <br/>
-                                    <div class="row">
-                                        <div class="col-sm-12 b-r">
-                                            <div class="rowGroup" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">原密码</label>
-                                                <div class="col-sm-10">
-                                                    <input type="password" class="form-control"
-                                                           autocomplete='new-password' name="password"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="hr-line-dashed"></div>
-                                    <div class="row">
-                                        <div class="col-sm-12 b-r">
-                                            <div class="rowGroup" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">新密码</label>
-                                                <div class="col-sm-10">
-                                                    <input type="password" class="form-control"
-                                                           autocomplete='new-password' name="newPassword"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="hr-line-dashed"></div>
-                                    <div class="row">
-                                        <div class="col-sm-12 b-r">
-                                            <div class="rowGroup" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">重复新密码</label>
-                                                <div class="col-sm-10">
-                                                    <input type="password" class="form-control"
-                                                           autocomplete='new-password' name="newRePassword"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <br/>
-                                    <div style="width:100%; text-align: center;">
-                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;"
-                                                onclick="EnterpriseCenter.changePwd()">确认修改
-                                        </button>
-                                    </div>
-                                </div>
-                            </div>
-                            <div id="tab-4" class="tab-pane">
-                                <div class="panel-body" style="width:900px;">
-                                    <br/>
-                                    <div class="row">
-                                        <div class="col-sm-12 ">
-                                            <div class="rowGroup" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">聚才网账号</label>
-                                                <div class="col-sm-10">
-                                                    <input type="text" class="form-control" id="username"
-                                                           name="username"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <br/>
-                                    <div class="row">
-                                        <div class="col-sm-12">
-                                            <div class="rowGroup" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">聚才网账号密码</label>
-                                                <div class="col-sm-10">
-                                                    <input type="password" class="form-control"
-                                                           autocomplete='new-password' id="password" name="password"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <br/>
-                                    <div class="row">
-                                        <div class="col-sm-12 ">
-                                            <div class="rowGroup form-inline" style="margin-bottom: 0px;">
-                                                <label class="col-sm-2 control-label">人才联络员手机验证码</label>
-                                                <div class="col-sm-10">
-                                                    <input autocomplete="off" type="text" style="width: 80%"
-                                                           class="form-control" id="verificationCode"
-                                                           name="verificationCode"/>
-                                                    <button id="enterprise_sms_btn"
-                                                            style="margin-bottom: 0px;width: 18%"
-                                                            onclick="EnterpriseCenter.getEnterpriseSms()" type="button"
-                                                            class="btn btn-sm btn-info">获取验证码
-                                                    </button>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <br/>
-                                    <div style="width:100%; text-align: center;">
-                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;"
-                                                onclick="EnterpriseCenter.bindJcAccount()">确认绑定
-                                        </button>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-<script type="text/javascript">
-    document.write('<script src="/static/modular/gate/enterprise/enterprise_center.js?v=' + (new Date()).getTime() + '"><\/script>');
-</script>
-<!--<script src='{$ctxPath}/static/modular/gate/enterprise/enterprise_center.js?v='></script>-->
-{/block}

+ 249 - 0
app/person/view/index/center_page.html

@@ -0,0 +1,249 @@
+{extend name="layout/content" /}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+        padding-right:4px;
+        padding-left: 4px;
+    }
+    .layui-layer-btn .layui-layer-btn1 {
+        border-color: #009688;
+        background-color: #009688;
+        color: #fff;
+    }
+</style>
+<div class="ibox float-e-margins">
+    <div class="ibox-title">
+        <h5>个人用户中心</h5>
+    </div>
+    <div class="ibox-content">
+       	<div class="form-horizontal">
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="tabs-container">
+                        <ul class="nav nav-tabs">
+                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
+                            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">修改密码</a></li>
+                            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">手机绑定</a></li>
+                            <li class="" style="pointer-events: none"><a data-toggle="tab" href="#tab-4" aria-expanded="false">绑定聚才网账号(暂未开放)</a></li>
+                        </ul>
+                        <div class="tab-content">
+                            <div id="tab-1" class="tab-pane active">
+                                <div class="panel-body" style="width:800px;">
+                                    <br/>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup">
+                                                <label class="col-sm-2 control-label spacing">账号</label>
+                                                <div class="col-sm-4 spacing">
+                                                    <input type="text" class="form-control" readonly="readonly" name="username" value="{$person.username}" />
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 control-label spacing">姓名</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" name="name" value="{$person.name}" style="pointer-events: none;background-color: #eee;"/>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 control-label spacing">性别</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <select class="form-control " id="sex" name="sex" style="pointer-events: none;background-color: #eee;">
+                                                            <option value="">--- 请选择 ---</option>
+                                                            <option value="1">男</option>
+                                                            <option value="2">女</option>
+                                                        </select>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 control-label spacing">身份证号</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" name="idCard" value="{$person.idCard}" readonly="readonly"/>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 control-label spacing">电话号码</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" readonly="readonly" name="phone" value="{$person.phone}" />
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 control-label spacing">联系地址</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" name="address" value="{$person.address}" />
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 spacing control-label">账号状态</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" readonly="readonly" name="activeName" value="{$person.activeName}" />
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="rowGroup">
+                                                <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                    <label class="col-sm-2 spacing control-label">冻结原因</label>
+                                                    <div class="col-sm-4 spacing">
+                                                        <input type="text" class="form-control" readonly="readonly" name="activeMsg" value="{$person.activeMsg}" />
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div style="width:100%; text-align: center;">
+                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;" onclick="UserCenter.changeBasic()">保存基础信息</button>
+                                    </div>
+                                </div>
+                            </div>
+                            <div id="tab-2" class="tab-pane">
+                                <div class="panel-body" style="width:800px;">
+                                    <br/>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">原密码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="password" autocomplete='new-password' class="form-control" id="password" name="password"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="hr-line-dashed"></div>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">新密码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="password" autocomplete='new-password' class="form-control" id="newPassword" name="newPassword"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="hr-line-dashed"></div>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">重复新密码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="password" autocomplete='new-password' class="form-control" id="newRePassword" name="newRePassword"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div style="width:100%; text-align: center;">
+                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;" onclick="UserCenter.changePwd()">确认修改</button>
+                                    </div>
+                                </div>
+                            </div>
+                            <div id="tab-3" class="tab-pane">
+                                <div class="panel-body" style="width:800px;">
+                                    <br/>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">当前号码</label>
+                                                <div class="col-sm-8">
+                                                    <input type="text" class="form-control" readonly="readonly" id="phone" name="phone" value="{$person.phone}"/>
+                                                </div>
+                                                <div class="col-sm-2">
+                                                    <button id="ps_sms_btn" onclick="UserCenter.getVerificationCode(this)" type="button" class="btn btn-info">获取验证码</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="hr-line-dashed"></div>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">手机验证码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control" name="verificationCode"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="hr-line-dashed"></div>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">新号码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control" name="newPhone"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div style="width:100%; text-align: center;">
+                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;" onclick="UserCenter.changePhone()">确认修改</button>
+                                    </div>
+                                </div>
+                            </div>
+                            <div id="tab-4" class="tab-pane">
+                                <div class="panel-body" style="width:900px;">
+                                    <br/>
+                                    <div class="row" >
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">聚才网账号</label>
+                                                <div class="col-sm-10">
+                                                    <input type="text" class="form-control" id="username" name="username"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div class="row">
+                                        <div class="col-sm-12">
+                                            <div class="rowGroup"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">聚才网账号密码</label>
+                                                <div class="col-sm-10">
+                                                    <input type="password" class="form-control" autocomplete='new-password' id="jcPassword" name="password"/>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div class="row">
+                                        <div class="col-sm-12 ">
+                                            <div class="rowGroup form-inline"  style="margin-bottom: 0px;">
+                                                <label class="col-sm-2 control-label">手机验证码</label>
+                                                <div class="col-sm-10">
+                                                    <input autocomplete="off" type="text" style="width: 80%" class="form-control" id="verificationCode" name="verificationCode"  />
+                                                    <button id="enterprise_sms_btn" style="margin-bottom: 0px;width: 18%" onclick="UserCenter.getVerificationCode(this)" type="button" class="btn btn-sm btn-info">获取验证码</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <br/>
+                                    <div style="width:100%; text-align: center;">
+                                        <button type="button" class="btn btn-w-m btn-primary" style="width:200px;" onclick="UserCenter.bindJcAccount()">确认绑定</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+       	</div>
+    </div>
+</div>
+<input type="text" id="sexTemp" value="{$person.sex}" style="display: none;" />
+<!--<script src="${ctxPath}/static/modular/gate/person/user_center.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/person/user_center.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 1 - 1
app/person/view/layout/layout.html

@@ -57,7 +57,7 @@
                     area: ['830px', '500px'], //宽高
                     fix: false, //不固定
                     maxmin: true,
-                    content: basePath + '/api/personalUser/gotoChangeHeadPortraitPage',
+                    content: basePath + '/person/userInfo/gotoChangeHeadPortraitPage',
                     btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
                     btn1: function (index, layero) {
                         layer.close(index);

+ 1 - 1
app/person/view/layout/tab.html

@@ -8,7 +8,7 @@
                     <span onclick="gotoChangeHeadPortraitPage()"><img id="head_portrait" alt="image" class="img-circle"
                                                                       {if condition="!$user['avatar']"}src="/static/img/photoGirl.jpg"
                                                                       {else/}
-                                                                      src="{$user.avatar}"
+                                                                      src="{$user.avatar|getStoragePath}"
                                                                       {/if}
                                                                       width="64px" height="64px"/></span>
                     <a data-toggle="dropdown" class="dropdown-toggle" href="#">

+ 32 - 0
app/person/view/user_info/person_change_head.html

@@ -0,0 +1,32 @@
+{extend name="layout/content" /}
+{block name="content"}
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <div class="form-horizontal" id="head_modify">
+            <div class="row">
+                <div class="col-sm-6" style="padding: 0px; height: 200px;">
+                    <div class="col-sm-8" style="height: 100%;">
+                        {if condition="!$headPortrait"}
+                        <img id="head_portrait" alt="" src="/static/img/girl.gif" style="max-height: 200px; max-width:100%; bottom: 1px; position: absolute;">
+                        {else/}
+                        <img id="head_portrait" alt="" src="{$headPortrait|getStoragePath}" style="max-height: 200px; max-width:100%; bottom: 1px; position: absolute;">
+                        {/if}
+                    </div>
+                    <div class="col-sm-4" style="height: 100%;">
+                        <form target="hidden_frame" id="form_head" action="/person/userInfo/changeHeadPortrait" method="post" enctype="multipart/form-data">
+                            <input type="file" onchange="ech.fileChange()" id="headPortrait" name="headPortrait" style="display: none;"/>
+                        </form>
+                        &nbsp;&nbsp;&nbsp;&nbsp;<button onclick="ech.chageHead()" class="btn btn-sm btn-primary" style="bottom: 1px; position: absolute;">修改头像</button>
+                    </div>
+                </div>
+                <div class="col-sm-6" style="padding: 0px;"></div>
+            </div>
+        </div>
+    </div>
+</div>
+<iframe style="display: none;" id="hidden_frame" name="hidden_frame"></iframe>
+<!--<script src="${ctxPath}/static/modular/gate/person/person_change_head.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/person/person_change_head.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 11 - 11
public/static/modular/gate/enterprise/enterprise_change_head.js

@@ -1,20 +1,20 @@
 var ech = {};
 
-ech.chageHead = function() {
-	$("#headPortrait").click();
+ech.chageHead = function () {
+    $("#headPortrait").click();
 };
 
-ech.fileChange = function() {
-	var fileInput = $("#headPortrait");
-	if(fileInput.val() != ""){
+ech.fileChange = function () {
+    var fileInput = $("#headPortrait");
+    if (fileInput.val() != "") {
         $("#form_head").submit();
     }
 };
 
-ech.callback = function(da) {
-	Feng.info(da.msg);
-	if (da.code == 200) {
-		$("#head_portrait").attr("src", da.obj.url);
-		$("#head_portrait" , parent.document).attr("src", da.obj.url);
-	}
+ech.callback = function (da) {
+    Feng.info(da.msg);
+    if (da.code == 200) {
+        $("#head_portrait").attr("src", da.url);
+        $("#head_portrait", parent.document).attr("src", da.url);
+    }
 };

+ 11 - 11
public/static/modular/gate/person/person_change_head.js

@@ -1,20 +1,20 @@
 var ech = {};
 
-ech.chageHead = function() {
-	$("#headPortrait").click();
+ech.chageHead = function () {
+    $("#headPortrait").click();
 };
 
-ech.fileChange = function() {
-	var fileInput = $("#headPortrait");
-	if(fileInput.val() != ""){
+ech.fileChange = function () {
+    var fileInput = $("#headPortrait");
+    if (fileInput.val() != "") {
         $("#form_head").submit();
     }
 };
 
-ech.callback = function(da) {
-	Feng.info(da.msg);
-	if (da.code == 200) {
-		$("#head_portrait").attr("src", da.obj.url);
-		$("#head_portrait" , parent.document).attr("src", da.obj.url);
-	}
+ech.callback = function (da) {
+    Feng.info(da.msg);
+    if (da.code == 200) {
+        $("#head_portrait").attr("src", da.url);
+        $("#head_portrait", parent.document).attr("src", da.url);
+    }
 };

+ 4 - 4
public/static/modular/gate/person/user_center.js

@@ -21,7 +21,7 @@ UserCenter.changeBasic = function() {
 		return;
 	}
 	var da = {"name":name, "sex":sex, "idCard":idCard, "address":address, "email":email};
-    var ajax = new $ax(Feng.ctxPath + "/api/personalUser/changeBasic", function(data){
+    var ajax = new $ax(Feng.ctxPath + "/person/userInfo/changeBasic", function(data){
         Feng.info(data.msg);
     },function(data){
         Feng.error("操作失败!" + data.responseJSON.message + "!");
@@ -51,7 +51,7 @@ UserCenter.changePwd = function() {
 		return;
 	}
 	var da = {"password":password, "newPassword":newPassword, "newRePassword":newRePassword};
-    var ajax = new $ax(Feng.ctxPath + "/api/personalUser/changePwd", function(data){
+    var ajax = new $ax(Feng.ctxPath + "/person/userInfo/changePwd", function(data){
         Feng.info(data.msg);
         if (data.code == 200) {
 			$("#password").val("");
@@ -82,7 +82,7 @@ UserCenter.changePhone = function() {
 		return;
 	}
 	var da = {"phone":phone, "verificationCode":verificationCode, "newPhone":newPhone};
-    var ajax = new $ax(Feng.ctxPath + "/api/personalUser/changePhone", function(data){
+    var ajax = new $ax(Feng.ctxPath + "/person/userInfo/changePhone", function(data){
         Feng.info(data.msg);
         if (data.code == 200) {
         	$("#tab-1").find("input[name='phone']").val(newPhone);
@@ -110,7 +110,7 @@ UserCenter.getVerificationCode = function(context) {
 	}
 	UserCenter.personBtnCountDown(context);
 	var da = {"phone":phone, "type":'2'};
-    var ajax = new $ax(Feng.ctxPath + "/api/common/verificationCode", function(data){
+    var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode", function(data){
         Feng.info(data.msg);
     },function(data){
         Feng.error("操作失败!" + data.responseJSON.message + "!");