浏览代码

强制https

sandm 2 年之前
父节点
当前提交
839e5c394f

+ 36 - 1
app/common/controller/Auth.php

@@ -134,10 +134,45 @@ class Auth extends BaseController
         if(empty($temp)){
         if(empty($temp)){
             return redirect("/");
             return redirect("/");
         }
         }
+        $ep = EnterpriseApi::getOne(session('temp')['uid']);
         if($this->request->isPost()){
         if($this->request->isPost()){
+            $response_object = new \StdClass();
+            $data = [
+                'name' => \StrUtil::getRequestDecodeParam($this->request,'name'),//单位名称
+                'idCard' => \StrUtil::getRequestDecodeParam($this->request,'idCard'),//统一社会信用代码
+                'agentName' => \StrUtil::getRequestDecodeParam($this->request,'agentName'),//人才联络员
+                'legal' => \StrUtil::getRequestDecodeParam($this->request,'legal'),//法人
+                'street' => \StrUtil::getRequestDecodeParam($this->request,'street'),//镇街
+                'address' => \StrUtil::getRequestDecodeParam($this->request,'address'),//地址
+                'type' => intval($this->request['type']),
+                'enterpriseTag' => \StrUtil::getRequestDecodeParam($this->request,'enterpriseTag'),//单位标签
+                'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request,'enterpriseType'),//单位类型
+                'agentEmail' => \StrUtil::getRequestDecodeParam($this->request,'agentEmail'),//邮箱
+                'ephone' => \StrUtil::getRequestDecodeParam($this->request,'ephone'),//单位电话
+                'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request,'industryFieldNew'),//产业领域
+                'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request,'industryFieldOld'),//行业领域
+                'bankCard' => \StrUtil::getRequestDecodeParam($this->request,'bankCard'),//银行
+                'bank' => \StrUtil::getRequestDecodeParam($this->request,'bank'),//开户行
+                'bankNetwork' => \StrUtil::getRequestDecodeParam($this->request,'bankNetwork')//网点
+            ];
+            try {
+                $data['id'] = $ep->id;
+                validate(\app\common\validate\Enterprise::class)->batch(true)->scene('check_common')->check($data);
+                $data['checkState'] = 1;
+                $ep->update($data);
 
 
+                $response_object->code = 200;
+                $response_object->msg = '修改成功';
+                return \StrUtil::back($response_object,"Register.epCallBack");
+
+            }catch (ValidateException $e){
+                $error = $e->getError();
+                $response_object->code = 500;
+                $response_object->msg = array_pop($error);
+                return \StrUtil::back($response_object,"Register.epCallBack");
+            }
         }
         }
-        $ep = EnterpriseApi::getOne(session('temp')['uid']);
+
         $msg = session('temp')['msg'];
         $msg = session('temp')['msg'];
         return view("",['msg' => $msg, 'ep' => $ep]);
         return view("",['msg' => $msg, 'ep' => $ep]);
     }
     }

+ 2 - 1
app/common/validate/Enterprise.php

@@ -70,6 +70,7 @@ class Enterprise extends Validate{
     protected $scene = [
     protected $scene = [
         'add'  =>  ['username','password','re_password','name','idCard','type','industryFieldNew','enterpriseTag','enterpriseType','agentName','agentPhone','verificationCode','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
         'add'  =>  ['username','password','re_password','name','idCard','type','industryFieldNew','enterpriseTag','enterpriseType','agentName','agentPhone','verificationCode','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
         'change' => ['name','idCard','industryFieldNew','enterpriseTag','enterpriseType','agentName','agentPhone','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
         'change' => ['name','idCard','industryFieldNew','enterpriseTag','enterpriseType','agentName','agentPhone','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
-        'changePwd' => ['password']
+        'changePwd' => ['password'],
+        'check_common' => ['name','idCard','industryFieldNew','enterpriseTag','enterpriseType','agentName','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
     ];
     ];
 }
 }

+ 1 - 1
app/enterprise/view/base/first.html

@@ -115,7 +115,7 @@
                                                 </td>
                                                 </td>
                                                 <td>
                                                 <td>
                                                     <div class="rowGroup">
                                                     <div class="rowGroup">
-                                                        <label class=" control-label spacing td-label"><span style="color: red">*证件号码</span></label>
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>证件号码</label>
                                                         <input class="form-control" id="card_number" name="card_number" value='{$row.card_number}'>
                                                         <input class="form-control" id="card_number" name="card_number" value='{$row.card_number}'>
                                                     </div>
                                                     </div>
                                                 </td>
                                                 </td>

+ 1 - 1
public/static/modular/gate/enterprise/enterprise_edit.js

@@ -147,7 +147,7 @@ Register.epCallBack = function(data) {
     Feng.info(data.msg);
     Feng.info(data.msg);
     if (data.code == 200) {
     if (data.code == 200) {
         setInterval(function () {
         setInterval(function () {
-            window.location.href=Feng.ctxPath + "/login.html";
+            window.location.href=Feng.ctxPath + "/";
         },3000);
         },3000);
     }
     }
 };
 };