linwu 5 ay önce
ebeveyn
işleme
6dde27e242

+ 26 - 3
app/mobile/controller/Human.php

@@ -15,12 +15,12 @@ class Human extends MobileBaseController
 {
     protected function initialize()
     {
-        $open_id = session('mobile.human.open_id');
+        /*$open_id = session('mobile.human.open_id');
         if (empty($open_id)) {
             session('mobile.human.back_url', request()->url(true));
             $response = redirect('https://www.jucai.gov.cn/api/auth/wechat_auth?url=' . urlencode(url('/mobile/login/humanLogin')));
             throw new \think\exception\HttpResponseException($response);
-        }
+        }*/
     }
 
     /**
@@ -92,6 +92,9 @@ class Human extends MobileBaseController
         if (!empty($institution)) {
             if ($institution['status'] != HumanInstitutionApplyModel::STATUS_PASS) {
                 $msg = HumanInstitutionApplyModel::STATUS[$institution['status']];
+                if (!empty($institution['comment'])) {
+                    $msg .= ':' . $institution['comment'];
+                }
             } else {
                 return redirect(url('human/enterpriseList'));
             }
@@ -100,6 +103,9 @@ class Human extends MobileBaseController
         if (!empty($enterprise)) {
             if ($enterprise['status'] != HumanEnterpriseApplyModel::STATUS_PASS) {
                 $msg = HumanEnterpriseApplyModel::STATUS[$institution['status']];
+                if (!empty($enterprise['comment'])) {
+                    $msg .= ':' . $enterprise['comment'];
+                }
             } else {
                 return redirect(url('human/institutionList'));
             }
@@ -108,6 +114,23 @@ class Human extends MobileBaseController
         return view('', ['msg' => $msg]);
     }
 
+    public function resetApply()
+    {
+        $open_id = session('mobile.human.open_id');
+
+        $institution = HumanInstitutionApplyModel::where('open_id', $open_id)->find();
+        if (!empty($institution)) {
+            $institution->delete();
+        }
+
+        $enterprise = HumanEnterpriseApplyModel::where('open_id', $open_id)->find();
+        if (!empty($enterprise)) {
+            $enterprise->delete();
+        }
+
+        return redirect(url('human/index'));
+    }
+
     /**
      * 列表
      */
@@ -233,7 +256,7 @@ class Human extends MobileBaseController
             $msg = '签到成功';
         }
 
-        return view('',['msg' => $msg]);
+        return view('', ['msg' => $msg]);
     }
 
     private function _formValidate()

+ 11 - 1
app/mobile/view/human/tips.html

@@ -29,6 +29,14 @@
         display: block;
         margin: 0 auto;
     }
+
+    .apply {
+        margin-top: 10px;
+        text-align: center;
+    }
+    .apply a {
+        color: var(--red);
+    }
 </style>
 {/block}
 {block name="body"}
@@ -44,7 +52,9 @@
 <div style="width:100%;height:46px;"></div>
 <h3 class="msg">{$msg}</h3>
 <p class="tips">如有疑问,请加下方工作人员微信</p>
-<img src="/static/mobile/images/wechat_qrcode.jpg" class="wechat" alt="">
+<img src="/static/mobile/images/wechat_qrcode.jpg" class="wechat" alt="">、
+<p class="apply"><a href="{:url('human/resetApply')}">重新报名</a></p>
+
 {/block}
 {block name="script"}
 <script>