xxxrrrdddd 3 years ago
parent
commit
d4ce4d89df
3 changed files with 568 additions and 81 deletions
  1. 61 0
      application/api/controller/UserOrder.php
  2. 9 3
      application/api/library/ExceptionHandle.php
  3. 498 78
      public/api.html

+ 61 - 0
application/api/controller/UserOrder.php

@@ -3,10 +3,12 @@
 namespace app\api\controller;
 
 use app\common\controller\UserApi;
+use app\common\model\Payment;
 use app\service\Pet;
 use app\service\UserOrderService;
 use app\UserException;
 use app\validate\UserOrderValidate;
+use think\Db;
 use think\Exception;
 
 /**
@@ -120,4 +122,63 @@ class UserOrder extends UserApi
             $this->error($e->getMessage());
         }
     }
+    /**
+     * 提交订单
+     * @param array from_addr 必须,取宠地址信息
+     * @param string from_addr[longitude] 必须,取宠地址经度
+     * @param string from_addr[latitude] 必须,取宠地址纬度
+     * @param string from_addr[name] 必须,取宠人
+     * @param string from_addr[mobile] 必须,取宠手机号
+     * @param string from_addr[city] 必须,取宠城市
+     * @param string from_addr[address] 必须,取宠详细地址
+     * @param array to_addr 必须,收宠地址信息
+     * @param string to_addr[longitude] 必须,收宠地址经度
+     * @param string to_addr[latitude] 必须,收宠地址纬度
+     * @param string to_addr[name] 必须,收宠人
+     * @param string to_addr[mobile] 必须,收宠手机号
+     * @param string to_addr[city] 必须,收宠城市
+     * @param string to_addr[address] 必须,收宠详细地址
+     * @param string pick_up 0无1上门接2上门送4上门接送
+     * @param string agree_time 取宠时间
+     * @param string pet_category 宠物分类ID
+     * @param string num 宠物数量
+     * @param string weight 宠物重量
+     * @param string spec 宠物规格
+     * @param string piece 宠物件数
+     * @param string has_cage 有无宠具0无1有
+     * @param string remark 备注信息
+     * @param string images 照片
+     * @param string protect_id 安心保ID
+     * @param string coupon_id 优惠券ID
+     * @param string freight fast快车air空运special专车
+     * @param string pay_type 1余额2微信
+     *
+     * @ApiReturnParams (name=total_amount,type=string,description=总价)
+     */
+    public function submit(UserOrderService $userOrder){
+        $data=input();
+        $this->validate($data,UserOrderValidate::class);
+        $user=$this->auth->getUser();
+        $this->validate($data,UserOrderValidate::$freight);
+        $this->validate($data,[
+            'pay_type'=>['require','in:1,2'],
+        ]);
+        Db::startTrans();
+        $data=$userOrder->setUser($user)
+            ->import($data)
+            ->setCoupon($data['coupon_id']??null)
+            ->prepare();
+        $data['user_id']=$user['id'];
+        $data['no']=order_no();
+        $order=new \app\common\model\UserOrder();
+        $order->allowField(true)->save($data);
+        if($order['pay_type']==1){
+            $params='';
+            $user->money(bcsub(0,$order['real_amount'],2),$user['id'],"订单[{$order['no']}]付款");
+        }else {
+            $params = Payment::pay($user, $order['real_amount'], UserOrder::class, 'payed', ['id' => $order['id']]);
+        }
+        Db::commit();
+        $this->success('',$params);
+    }
 }

+ 9 - 3
application/api/library/ExceptionHandle.php

@@ -2,6 +2,7 @@
 
 namespace app\api\library;
 
+use app\UserException;
 use Exception;
 use think\exception\Handle;
 
@@ -14,7 +15,7 @@ class ExceptionHandle extends Handle
     public function render(Exception $e)
     {
         // 在生产环境下返回code信息
-        if (!\think\Config::get('app_debug')) {
+        //if (!\think\Config::get('app_debug')) {
             $statuscode = $code = 500;
             $msg = 'An error occurred';
             // 验证异常
@@ -27,11 +28,16 @@ class ExceptionHandle extends Handle
             if ($e instanceof \think\exception\HttpException) {
                 $statuscode = $code = $e->getStatusCode();
             }
+            if($e instanceof UserException){
+                $code=0;
+                $msg=$e->getMessage();
+                $statuscode=200;
+            }
             return json(['code' => $code, 'msg' => $msg, 'time' => time(), 'data' => null], $statuscode);
-        }
+        //}
 
         //其它此交由系统处理
-        return parent::render($e);
+        //return parent::render($e);
     }
 
 }

+ 498 - 78
public/api.html

@@ -250,31 +250,35 @@
                                                                     <span class="label label-success pull-right noneedlogin">登</span>
                                                             </span>
                         </a>
+                                                <a href="javascript:;" data-id="24" class="list-group-item">提交订单                            <span class="tag">
+                                                                    <span class="label label-success pull-right noneedlogin">登</span>
+                                                            </span>
+                        </a>
                                             </div>
                                         <a href="#验证接口" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">验证接口  <i class="fa fa-caret-down"></i></a>
                     <div class="child collapse" id="验证接口">
-                                                <a href="javascript:;" data-id="24" class="list-group-item">检测邮箱                            <span class="tag">
+                                                <a href="javascript:;" data-id="25" class="list-group-item">检测邮箱                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="25" class="list-group-item">检测用户名                            <span class="tag">
+                                                <a href="javascript:;" data-id="26" class="list-group-item">检测用户名                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="26" class="list-group-item">检测昵称                            <span class="tag">
+                                                <a href="javascript:;" data-id="27" class="list-group-item">检测昵称                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="27" class="list-group-item">检测手机                            <span class="tag">
+                                                <a href="javascript:;" data-id="28" class="list-group-item">检测手机                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="28" class="list-group-item">检测手机                            <span class="tag">
+                                                <a href="javascript:;" data-id="29" class="list-group-item">检测手机                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="29" class="list-group-item">检测邮箱                            <span class="tag">
+                                                <a href="javascript:;" data-id="30" class="list-group-item">检测邮箱                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="30" class="list-group-item">检测手机验证码                            <span class="tag">
+                                                <a href="javascript:;" data-id="31" class="list-group-item">检测手机验证码                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="31" class="list-group-item">检测邮箱验证码                            <span class="tag">
+                                                <a href="javascript:;" data-id="32" class="list-group-item">检测邮箱验证码                            <span class="tag">
                                                             </span>
                         </a>
                                             </div>
@@ -4028,13 +4032,11 @@
                         </div>
                     </div>
                 </div>
-                                <h2>验证接口</h2>
-                <hr>
                                 <div class="panel panel-default">
                     <div class="panel-heading" id="heading-24">
                         <h4 class="panel-title">
-                            <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion24" href="#collapseOne24"> 检测邮箱 <span class="text-muted">/api/validate/check_email_available</span></a>
+                            <span class="label label-success">GET</span>
+                            <a data-toggle="collapse" data-parent="#accordion24" href="#collapseOne24"> 提交订单 <span class="text-muted">/api/user_order/submit</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne24" class="panel-collapse collapse">
@@ -4052,7 +4054,7 @@
 
                                 <div class="tab-pane active" id="info24">
                                     <div class="well">
-                                        检测邮箱                                    </div>
+                                        提交订单                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -4060,7 +4062,7 @@
                                                 <tbody>
                                                 <tr>
                                                     <td>登录</td>
-                                                    <td></td>
+                                                    <td></td>
                                                 </tr>
                                                 <tr>
                                                     <td>鉴权</td>
@@ -4090,16 +4092,172 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>email</td>
+                                                        <td>from_addr</td>
+                                                        <td>array</td>
+                                                        <td>是</td>
+                                                        <td>必须,取宠地址信息</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>from_addr[longitude]</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>邮箱</td>
+                                                        <td>必须,取宠地址经度</td>
                                                     </tr>
                                                                                                         <tr>
-                                                        <td>id</td>
+                                                        <td>from_addr[latitude]</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>排除会员ID</td>
+                                                        <td>必须,取宠地址纬度</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>from_addr[name]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,取宠人</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>from_addr[mobile]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,取宠手机号</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>from_addr[city]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,取宠城市</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>from_addr[address]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,取宠详细地址</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr</td>
+                                                        <td>array</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠地址信息</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[longitude]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠地址经度</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[latitude]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠地址纬度</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[name]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠人</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[mobile]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠手机号</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[city]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠城市</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>to_addr[address]</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>必须,收宠详细地址</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>pick_up</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>0无1上门接2上门送4上门接送</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>agree_time</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>取宠时间</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>pet_category</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>宠物分类ID</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>num</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>宠物数量</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>weight</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>宠物重量</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>spec</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>宠物规格</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>piece</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>宠物件数</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>has_cage</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>有无宠具0无1有</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>remark</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>备注信息</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>images</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>照片</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>protect_id</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>安心保ID</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>coupon_id</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>优惠券ID</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>freight</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>fast快车air空运special专车</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>pay_type</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>1余额2微信</td>
                                                     </tr>
                                                                                                     </tbody>
                                             </table>
@@ -4122,14 +4280,118 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_available" method="POST" name="form24" id="form24">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/user_order/submit" method="get" name="form24" id="form24">
                                                                                                                 <div class="form-group">
-                                                            <label class="control-label" for="email">email</label>
-                                                            <input type="string" class="form-control input-sm" id="email" required placeholder="邮箱" name="email">
+                                                            <label class="control-label" for="from_addr">from_addr</label>
+                                                            <input type="array" class="form-control input-sm" id="from_addr" required placeholder="必须,取宠地址信息" name="from_addr">
                                                         </div>
                                                                                                                 <div class="form-group">
-                                                            <label class="control-label" for="id">id</label>
-                                                            <input type="string" class="form-control input-sm" id="id" required placeholder="排除会员ID" name="id">
+                                                            <label class="control-label" for="from_addr[longitude]">from_addr[longitude]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[longitude]" required placeholder="必须,取宠地址经度" name="from_addr[longitude]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="from_addr[latitude]">from_addr[latitude]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[latitude]" required placeholder="必须,取宠地址纬度" name="from_addr[latitude]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="from_addr[name]">from_addr[name]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[name]" required placeholder="必须,取宠人" name="from_addr[name]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="from_addr[mobile]">from_addr[mobile]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[mobile]" required placeholder="必须,取宠手机号" name="from_addr[mobile]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="from_addr[city]">from_addr[city]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[city]" required placeholder="必须,取宠城市" name="from_addr[city]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="from_addr[address]">from_addr[address]</label>
+                                                            <input type="string" class="form-control input-sm" id="from_addr[address]" required placeholder="必须,取宠详细地址" name="from_addr[address]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr">to_addr</label>
+                                                            <input type="array" class="form-control input-sm" id="to_addr" required placeholder="必须,收宠地址信息" name="to_addr">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[longitude]">to_addr[longitude]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[longitude]" required placeholder="必须,收宠地址经度" name="to_addr[longitude]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[latitude]">to_addr[latitude]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[latitude]" required placeholder="必须,收宠地址纬度" name="to_addr[latitude]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[name]">to_addr[name]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[name]" required placeholder="必须,收宠人" name="to_addr[name]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[mobile]">to_addr[mobile]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[mobile]" required placeholder="必须,收宠手机号" name="to_addr[mobile]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[city]">to_addr[city]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[city]" required placeholder="必须,收宠城市" name="to_addr[city]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="to_addr[address]">to_addr[address]</label>
+                                                            <input type="string" class="form-control input-sm" id="to_addr[address]" required placeholder="必须,收宠详细地址" name="to_addr[address]">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="pick_up">pick_up</label>
+                                                            <input type="string" class="form-control input-sm" id="pick_up" required placeholder="0无1上门接2上门送4上门接送" name="pick_up">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="agree_time">agree_time</label>
+                                                            <input type="string" class="form-control input-sm" id="agree_time" required placeholder="取宠时间" name="agree_time">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="pet_category">pet_category</label>
+                                                            <input type="string" class="form-control input-sm" id="pet_category" required placeholder="宠物分类ID" name="pet_category">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="num">num</label>
+                                                            <input type="string" class="form-control input-sm" id="num" required placeholder="宠物数量" name="num">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="weight">weight</label>
+                                                            <input type="string" class="form-control input-sm" id="weight" required placeholder="宠物重量" name="weight">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="spec">spec</label>
+                                                            <input type="string" class="form-control input-sm" id="spec" required placeholder="宠物规格" name="spec">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="piece">piece</label>
+                                                            <input type="string" class="form-control input-sm" id="piece" required placeholder="宠物件数" name="piece">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="has_cage">has_cage</label>
+                                                            <input type="string" class="form-control input-sm" id="has_cage" required placeholder="有无宠具0无1有" name="has_cage">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="remark">remark</label>
+                                                            <input type="string" class="form-control input-sm" id="remark" required placeholder="备注信息" name="remark">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="images">images</label>
+                                                            <input type="string" class="form-control input-sm" id="images" required placeholder="照片" name="images">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="protect_id">protect_id</label>
+                                                            <input type="string" class="form-control input-sm" id="protect_id" required placeholder="安心保ID" name="protect_id">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="coupon_id">coupon_id</label>
+                                                            <input type="string" class="form-control input-sm" id="coupon_id" required placeholder="优惠券ID" name="coupon_id">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="freight">freight</label>
+                                                            <input type="string" class="form-control input-sm" id="freight" required placeholder="fast快车air空运special专车" name="freight">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="pay_type">pay_type</label>
+                                                            <input type="string" class="form-control input-sm" id="pay_type" required placeholder="1余额2微信" name="pay_type">
                                                         </div>
                                                                                                                 <div class="form-group form-group-submit">
                                                             <button type="submit" class="btn btn-success send" rel="24">提交</button>
@@ -4152,7 +4414,22 @@
                                             <div class="panel panel-default">
                                                 <div class="panel-heading"><strong>返回参数</strong></div>
                                                 <div class="panel-body">
-                                                                                                        无
+                                                                                                        <table class="table table-hover">
+                                                        <thead>
+                                                            <tr>
+                                                                <th>名称</th>
+                                                                <th>类型</th>
+                                                                <th>描述</th>
+                                                            </tr>
+                                                        </thead>
+                                                        <tbody>
+                                                                                                                        <tr>
+                                                                <td>total_amount</td>
+                                                                <td>string</td>
+                                                                <td>总价</td>
+                                                            </tr>
+                                                                                                                    </tbody>
+                                                    </table>
                                                                                                     </div>
                                             </div>
                                         </div>
@@ -4171,11 +4448,13 @@
                         </div>
                     </div>
                 </div>
+                                <h2>验证接口</h2>
+                <hr>
                                 <div class="panel panel-default">
                     <div class="panel-heading" id="heading-25">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion25" href="#collapseOne25"> 检测用户名 <span class="text-muted">/api/validate/check_username_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion25" href="#collapseOne25"> 检测邮箱 <span class="text-muted">/api/validate/check_email_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne25" class="panel-collapse collapse">
@@ -4193,7 +4472,7 @@
 
                                 <div class="tab-pane active" id="info25">
                                     <div class="well">
-                                        检测用户名                                    </div>
+                                        检测邮箱                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -4231,10 +4510,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>username</td>
+                                                        <td>email</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>用户名</td>
+                                                        <td>邮箱</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -4263,10 +4542,10 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_username_available" method="POST" name="form25" id="form25">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_available" method="POST" name="form25" id="form25">
                                                                                                                 <div class="form-group">
-                                                            <label class="control-label" for="username">username</label>
-                                                            <input type="string" class="form-control input-sm" id="username" required placeholder="用户名" name="username">
+                                                            <label class="control-label" for="email">email</label>
+                                                            <input type="string" class="form-control input-sm" id="email" required placeholder="邮箱" name="email">
                                                         </div>
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="id">id</label>
@@ -4316,7 +4595,7 @@
                     <div class="panel-heading" id="heading-26">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion26" href="#collapseOne26"> 检测昵称 <span class="text-muted">/api/validate/check_nickname_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion26" href="#collapseOne26"> 检测用户名 <span class="text-muted">/api/validate/check_username_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne26" class="panel-collapse collapse">
@@ -4334,7 +4613,7 @@
 
                                 <div class="tab-pane active" id="info26">
                                     <div class="well">
-                                        检测昵称                                    </div>
+                                        检测用户名                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -4372,10 +4651,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>nickname</td>
+                                                        <td>username</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>昵称</td>
+                                                        <td>用户名</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -4404,10 +4683,10 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_nickname_available" method="POST" name="form26" id="form26">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_username_available" method="POST" name="form26" id="form26">
                                                                                                                 <div class="form-group">
-                                                            <label class="control-label" for="nickname">nickname</label>
-                                                            <input type="string" class="form-control input-sm" id="nickname" required placeholder="昵称" name="nickname">
+                                                            <label class="control-label" for="username">username</label>
+                                                            <input type="string" class="form-control input-sm" id="username" required placeholder="用户名" name="username">
                                                         </div>
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="id">id</label>
@@ -4457,7 +4736,7 @@
                     <div class="panel-heading" id="heading-27">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion27" href="#collapseOne27"> 检测手机 <span class="text-muted">/api/validate/check_mobile_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion27" href="#collapseOne27"> 检测昵称 <span class="text-muted">/api/validate/check_nickname_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne27" class="panel-collapse collapse">
@@ -4475,7 +4754,7 @@
 
                                 <div class="tab-pane active" id="info27">
                                     <div class="well">
-                                        检测手机                                    </div>
+                                        检测昵称                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -4513,10 +4792,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>mobile</td>
+                                                        <td>nickname</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>手机号</td>
+                                                        <td>昵称</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -4545,10 +4824,10 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_available" method="POST" name="form27" id="form27">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_nickname_available" method="POST" name="form27" id="form27">
                                                                                                                 <div class="form-group">
-                                                            <label class="control-label" for="mobile">mobile</label>
-                                                            <input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
+                                                            <label class="control-label" for="nickname">nickname</label>
+                                                            <input type="string" class="form-control input-sm" id="nickname" required placeholder="昵称" name="nickname">
                                                         </div>
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="id">id</label>
@@ -4598,7 +4877,7 @@
                     <div class="panel-heading" id="heading-28">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion28" href="#collapseOne28"> 检测手机 <span class="text-muted">/api/validate/check_mobile_exist</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion28" href="#collapseOne28"> 检测手机 <span class="text-muted">/api/validate/check_mobile_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne28" class="panel-collapse collapse">
@@ -4659,6 +4938,12 @@
                                                         <td>是</td>
                                                         <td>手机号</td>
                                                     </tr>
+                                                                                                        <tr>
+                                                        <td>id</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>排除会员ID</td>
+                                                    </tr>
                                                                                                     </tbody>
                                             </table>
                                                                                     </div>
@@ -4680,11 +4965,15 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_exist" method="POST" name="form28" id="form28">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_available" method="POST" name="form28" id="form28">
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="mobile">mobile</label>
                                                             <input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
                                                         </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="id">id</label>
+                                                            <input type="string" class="form-control input-sm" id="id" required placeholder="排除会员ID" name="id">
+                                                        </div>
                                                                                                                 <div class="form-group form-group-submit">
                                                             <button type="submit" class="btn btn-success send" rel="28">提交</button>
                                                             <button type="reset" class="btn btn-info" rel="28">重置</button>
@@ -4729,7 +5018,7 @@
                     <div class="panel-heading" id="heading-29">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion29" href="#collapseOne29"> 检测邮箱 <span class="text-muted">/api/validate/check_email_exist</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion29" href="#collapseOne29"> 检测手机 <span class="text-muted">/api/validate/check_mobile_exist</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne29" class="panel-collapse collapse">
@@ -4747,7 +5036,7 @@
 
                                 <div class="tab-pane active" id="info29">
                                     <div class="well">
-                                        检测邮箱                                    </div>
+                                        检测手机                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -4788,7 +5077,7 @@
                                                         <td>mobile</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>邮箱</td>
+                                                        <td>手机号</td>
                                                     </tr>
                                                                                                     </tbody>
                                             </table>
@@ -4811,10 +5100,10 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_exist" method="POST" name="form29" id="form29">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_exist" method="POST" name="form29" id="form29">
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="mobile">mobile</label>
-                                                            <input type="string" class="form-control input-sm" id="mobile" required placeholder="邮箱" name="mobile">
+                                                            <input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
                                                         </div>
                                                                                                                 <div class="form-group form-group-submit">
                                                             <button type="submit" class="btn btn-success send" rel="29">提交</button>
@@ -4860,7 +5149,7 @@
                     <div class="panel-heading" id="heading-30">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion30" href="#collapseOne30"> 检测手机验证码 <span class="text-muted">/api/validate/check_sms_correct</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion30" href="#collapseOne30"> 检测邮箱 <span class="text-muted">/api/validate/check_email_exist</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne30" class="panel-collapse collapse">
@@ -4878,6 +5167,137 @@
 
                                 <div class="tab-pane active" id="info30">
                                     <div class="well">
+                                        检测邮箱                                    </div>
+                                    <div class="panel panel-default">
+                                        <div class="panel-heading"><strong>权限</strong></div>
+                                        <div class="panel-body">
+                                            <table class="table table-hover">
+                                                <tbody>
+                                                <tr>
+                                                    <td>登录</td>
+                                                    <td>否</td>
+                                                </tr>
+                                                <tr>
+                                                    <td>鉴权</td>
+                                                    <td>否</td>
+                                                </tr>
+                                                </tbody>
+                                            </table>
+                                        </div>
+                                    </div>
+                                    <div class="panel panel-default">
+                                        <div class="panel-heading"><strong>Headers</strong></div>
+                                        <div class="panel-body">
+                                                                                        无
+                                                                                    </div>
+                                    </div>
+                                    <div class="panel panel-default">
+                                        <div class="panel-heading"><strong>参数</strong></div>
+                                        <div class="panel-body">
+                                                                                        <table class="table table-hover">
+                                                <thead>
+                                                    <tr>
+                                                        <th>名称</th>
+                                                        <th>类型</th>
+                                                        <th>必选</th>
+                                                        <th>描述</th>
+                                                    </tr>
+                                                </thead>
+                                                <tbody>
+                                                                                                        <tr>
+                                                        <td>mobile</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>邮箱</td>
+                                                    </tr>
+                                                                                                    </tbody>
+                                            </table>
+                                                                                    </div>
+                                    </div>
+                                    <div class="panel panel-default">
+                                        <div class="panel-heading"><strong>正文</strong></div>
+                                        <div class="panel-body">
+                                            无                                        </div>
+                                    </div>
+                                </div><!-- #info -->
+
+                                <div class="tab-pane" id="sandbox30">
+                                    <div class="row">
+                                        <div class="col-md-12">
+                                                                                        <div class="panel panel-default">
+                                                <div class="panel-heading"><strong>参数</strong>
+                                                <div class="pull-right">
+                                                    <a href="javascript:" class="btn btn-xs btn-info btn-append">追加</a>
+                                                </div>
+                                                </div>
+                                                <div class="panel-body">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_exist" method="POST" name="form30" id="form30">
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="mobile">mobile</label>
+                                                            <input type="string" class="form-control input-sm" id="mobile" required placeholder="邮箱" name="mobile">
+                                                        </div>
+                                                                                                                <div class="form-group form-group-submit">
+                                                            <button type="submit" class="btn btn-success send" rel="30">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="30">重置</button>
+                                                        </div>
+                                                    </form>
+                                                </div>
+                                            </div>
+                                            <div class="panel panel-default">
+                                                <div class="panel-heading"><strong>响应输出</strong></div>
+                                                <div class="panel-body">
+                                                    <div class="row">
+                                                        <div class="col-md-12" style="overflow-x:auto">
+                                                            <pre id="response_headers30"></pre>
+                                                            <pre id="response30"></pre>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="panel panel-default">
+                                                <div class="panel-heading"><strong>返回参数</strong></div>
+                                                <div class="panel-body">
+                                                                                                        无
+                                                                                                    </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div><!-- #sandbox -->
+
+                                <div class="tab-pane" id="sample30">
+                                    <div class="row">
+                                        <div class="col-md-12">
+                                            <pre id="sample_response30">无</pre>
+                                        </div>
+                                    </div>
+                                </div><!-- #sample -->
+
+                            </div><!-- .tab-content -->
+                        </div>
+                    </div>
+                </div>
+                                <div class="panel panel-default">
+                    <div class="panel-heading" id="heading-31">
+                        <h4 class="panel-title">
+                            <span class="label label-primary">POST</span>
+                            <a data-toggle="collapse" data-parent="#accordion31" href="#collapseOne31"> 检测手机验证码 <span class="text-muted">/api/validate/check_sms_correct</span></a>
+                        </h4>
+                    </div>
+                    <div id="collapseOne31" class="panel-collapse collapse">
+                        <div class="panel-body">
+
+                            <!-- Nav tabs -->
+                            <ul class="nav nav-tabs" id="doctab31">
+                                <li class="active"><a href="#info31" data-toggle="tab">基础信息</a></li>
+                                <li><a href="#sandbox31" data-toggle="tab">在线测试</a></li>
+                                <li><a href="#sample31" data-toggle="tab">返回示例</a></li>
+                            </ul>
+
+                            <!-- Tab panes -->
+                            <div class="tab-content">
+
+                                <div class="tab-pane active" id="info31">
+                                    <div class="well">
                                         检测手机验证码                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
@@ -4944,7 +5364,7 @@
                                     </div>
                                 </div><!-- #info -->
 
-                                <div class="tab-pane" id="sandbox30">
+                                <div class="tab-pane" id="sandbox31">
                                     <div class="row">
                                         <div class="col-md-12">
                                                                                         <div class="panel panel-default">
@@ -4954,7 +5374,7 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_sms_correct" method="POST" name="form30" id="form30">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_sms_correct" method="POST" name="form31" id="form31">
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="mobile">mobile</label>
                                                             <input type="string" class="form-control input-sm" id="mobile" required placeholder="手机号" name="mobile">
@@ -4968,8 +5388,8 @@
                                                             <input type="string" class="form-control input-sm" id="event" required placeholder="事件" name="event">
                                                         </div>
                                                                                                                 <div class="form-group form-group-submit">
-                                                            <button type="submit" class="btn btn-success send" rel="30">提交</button>
-                                                            <button type="reset" class="btn btn-info" rel="30">重置</button>
+                                                            <button type="submit" class="btn btn-success send" rel="31">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="31">重置</button>
                                                         </div>
                                                     </form>
                                                 </div>
@@ -4979,8 +5399,8 @@
                                                 <div class="panel-body">
                                                     <div class="row">
                                                         <div class="col-md-12" style="overflow-x:auto">
-                                                            <pre id="response_headers30"></pre>
-                                                            <pre id="response30"></pre>
+                                                            <pre id="response_headers31"></pre>
+                                                            <pre id="response31"></pre>
                                                         </div>
                                                     </div>
                                                 </div>
@@ -4995,10 +5415,10 @@
                                     </div>
                                 </div><!-- #sandbox -->
 
-                                <div class="tab-pane" id="sample30">
+                                <div class="tab-pane" id="sample31">
                                     <div class="row">
                                         <div class="col-md-12">
-                                            <pre id="sample_response30">无</pre>
+                                            <pre id="sample_response31">无</pre>
                                         </div>
                                     </div>
                                 </div><!-- #sample -->
@@ -5008,26 +5428,26 @@
                     </div>
                 </div>
                                 <div class="panel panel-default">
-                    <div class="panel-heading" id="heading-31">
+                    <div class="panel-heading" id="heading-32">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion31" href="#collapseOne31"> 检测邮箱验证码 <span class="text-muted">/api/validate/check_ems_correct</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion32" href="#collapseOne32"> 检测邮箱验证码 <span class="text-muted">/api/validate/check_ems_correct</span></a>
                         </h4>
                     </div>
-                    <div id="collapseOne31" class="panel-collapse collapse">
+                    <div id="collapseOne32" class="panel-collapse collapse">
                         <div class="panel-body">
 
                             <!-- Nav tabs -->
-                            <ul class="nav nav-tabs" id="doctab31">
-                                <li class="active"><a href="#info31" data-toggle="tab">基础信息</a></li>
-                                <li><a href="#sandbox31" data-toggle="tab">在线测试</a></li>
-                                <li><a href="#sample31" data-toggle="tab">返回示例</a></li>
+                            <ul class="nav nav-tabs" id="doctab32">
+                                <li class="active"><a href="#info32" data-toggle="tab">基础信息</a></li>
+                                <li><a href="#sandbox32" data-toggle="tab">在线测试</a></li>
+                                <li><a href="#sample32" data-toggle="tab">返回示例</a></li>
                             </ul>
 
                             <!-- Tab panes -->
                             <div class="tab-content">
 
-                                <div class="tab-pane active" id="info31">
+                                <div class="tab-pane active" id="info32">
                                     <div class="well">
                                         检测邮箱验证码                                    </div>
                                     <div class="panel panel-default">
@@ -5095,7 +5515,7 @@
                                     </div>
                                 </div><!-- #info -->
 
-                                <div class="tab-pane" id="sandbox31">
+                                <div class="tab-pane" id="sandbox32">
                                     <div class="row">
                                         <div class="col-md-12">
                                                                                         <div class="panel panel-default">
@@ -5105,7 +5525,7 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_ems_correct" method="POST" name="form31" id="form31">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_ems_correct" method="POST" name="form32" id="form32">
                                                                                                                 <div class="form-group">
                                                             <label class="control-label" for="email">email</label>
                                                             <input type="string" class="form-control input-sm" id="email" required placeholder="邮箱" name="email">
@@ -5119,8 +5539,8 @@
                                                             <input type="string" class="form-control input-sm" id="event" required placeholder="事件" name="event">
                                                         </div>
                                                                                                                 <div class="form-group form-group-submit">
-                                                            <button type="submit" class="btn btn-success send" rel="31">提交</button>
-                                                            <button type="reset" class="btn btn-info" rel="31">重置</button>
+                                                            <button type="submit" class="btn btn-success send" rel="32">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="32">重置</button>
                                                         </div>
                                                     </form>
                                                 </div>
@@ -5130,8 +5550,8 @@
                                                 <div class="panel-body">
                                                     <div class="row">
                                                         <div class="col-md-12" style="overflow-x:auto">
-                                                            <pre id="response_headers31"></pre>
-                                                            <pre id="response31"></pre>
+                                                            <pre id="response_headers32"></pre>
+                                                            <pre id="response32"></pre>
                                                         </div>
                                                     </div>
                                                 </div>
@@ -5146,10 +5566,10 @@
                                     </div>
                                 </div><!-- #sandbox -->
 
-                                <div class="tab-pane" id="sample31">
+                                <div class="tab-pane" id="sample32">
                                     <div class="row">
                                         <div class="col-md-12">
-                                            <pre id="sample_response31">无</pre>
+                                            <pre id="sample_response32">无</pre>
                                         </div>
                                     </div>
                                 </div><!-- #sample -->
@@ -5167,7 +5587,7 @@
 
                 </div>
                 <div class="col-md-6" align="right">
-                    Generated on 2021-09-23 17:18:29 <a href="./" target="_blank">宠365</a>
+                    Generated on 2021-09-24 11:15:43 <a href="./" target="_blank">宠365</a>
                 </div>
             </div>