xxxrrrdddd 3 years ago
parent
commit
b1911035f2

+ 41 - 1
application/api/controller/User.php

@@ -5,6 +5,7 @@ namespace app\api\controller;
 use app\common\controller\Api;
 use app\common\library\Ems;
 use app\common\library\Sms;
+use fast\Mini;
 use fast\Random;
 use think\Config;
 use think\Validate;
@@ -14,7 +15,7 @@ use think\Validate;
  */
 class User extends Api
 {
-    protected $noNeedLogin = ['login', 'mobilelogin', 'register', 'resetpwd', 'changeemail', 'changemobile', 'third'];
+    protected $noNeedLogin = ['login', 'mobilelogin', 'register', 'resetpwd', 'changeemail', 'changemobile', 'third','userminilogin','minilogin'];
     protected $noNeedRight = '*';
 
     public function _initialize()
@@ -341,4 +342,43 @@ class User extends Api
             $this->error($this->auth->getError());
         }
     }
+
+    /**
+     * 小程序登录
+     * @ApiMethod (POST)
+     * @param string code 小程序code
+     * @param string nickName 昵称
+     * @param string avatarUrl 头像
+     * @param string gender 性别
+     * @param string encryptedData 获取手机号用的
+     * @param string iv 获取手机号用的
+     * @param string type 1用户端2配送端
+     */
+    public function minilogin(){
+        $data=input();
+        $this->validate($data,[
+            'code'=>'require',
+            'type'=>'require|in:1,2',
+        ]);
+        $session=Mini::mini($data['type'])->auth->session($data['code']);
+        $user=\app\admin\model\User::where('openid',$session['openid'])->where('type',1)->find();
+        if(!$user){
+            $decryptedData = Mini::mini($data['type'])->encryptor->decryptData($session, $data['iv'], $data['encryptedData']);
+            $ret = $this->auth->register(session_create_id(), '', '', $decryptedData['phoneNumber'], [
+                'openid'=>$session['openid'],
+                'type'=>1,
+                'unionid'=>$session['unionid'],
+            ]);
+            if ($ret) {
+                $data = ['userinfo' => $this->auth->getUserinfo()];
+                $this->success(__('Sign up successful'), $data);
+            } else {
+                $this->error($this->auth->getError());
+            }
+        }
+
+        $this->auth->direct($user['id']);
+        $data = ['userinfo' => $this->auth->getUserinfo()];
+        $this->success(__('successful'), $data);
+    }
 }

+ 1 - 1
application/common/controller/Api.php

@@ -28,7 +28,7 @@ class Api
     /**
      * @var bool 验证失败是否抛出异常
      */
-    protected $failException = false;
+    protected $failException = true;
 
     /**
      * @var bool 是否批量验证

+ 2 - 2
application/common/library/Auth.php

@@ -138,7 +138,7 @@ class Auth
             $this->setError('Username already exist');
             return false;
         }
-        if (User::getByNickname($username)) {
+        /*if (User::getByNickname($username)) {
             $this->setError('Nickname already exist');
             return false;
         }
@@ -149,7 +149,7 @@ class Auth
         if ($mobile && User::getByMobile($mobile)) {
             $this->setError('Mobile already exist');
             return false;
-        }
+        }*/
 
         $ip = request()->ip();
         $time = time();

+ 63 - 0
extend/fast/Mini.php

@@ -0,0 +1,63 @@
+<?php
+
+namespace fast;
+
+use EasyWeChat\Factory;
+
+/**
+ * 版本检测和对比
+ */
+class Mini
+{
+    public static function mini($client){
+        static $app=[];
+        if(!isset($app[$client])) {
+            if($client==1) {
+                $config = [
+                    'app_id' => config('site.user_appid'),
+                    'secret' => config('site.user_appsecret'),
+                    // 下面为可选项
+                    // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
+                    'response_type' => 'array',
+                    'log' => [
+                        'level' => 'debug',
+                        'file' => RUNTIME_PATH . '/wechat_user.log',
+                    ],
+                ];
+            }else{
+                $config = [
+                    'app_id' => config('site.sender_appid'),
+                    'secret' => config('site.sender_appserret'),
+                    // 下面为可选项
+                    // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
+                    'response_type' => 'array',
+                    'log' => [
+                        'level' => 'debug',
+                        'file' => RUNTIME_PATH . '/wechat_sender.log',
+                    ],
+                ];
+            }
+            $app[$client]=Factory::miniProgram($config);
+        }
+        return $app[$client];
+    }
+    public static function payment($client='user'){
+        static $app=[];
+        if(!isset($app[$client])) {
+            $config = [
+                'app_id' => config('site.user_appid'),
+                'secret' => config('site.user_appsecret'),
+                // 下面为可选项
+                // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
+                'response_type' => 'array',
+                'log' => [
+                    'level' => 'debug',
+                    'file' => RUNTIME_PATH . '/wechat_user.log',
+                ],
+            ];
+            $app[$client]=Factory::payment($config);
+        }
+        return $app[$client];
+    }
+
+}

+ 269 - 75
public/api.html

@@ -233,31 +233,34 @@
                                                 <a href="javascript:;" data-id="18" class="list-group-item">重置密码                            <span class="tag">
                                                             </span>
                         </a>
+                                                <a href="javascript:;" data-id="19" class="list-group-item">小程序登录                            <span class="tag">
+                                                            </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="19" class="list-group-item">检测邮箱                            <span class="tag">
+                                                <a href="javascript:;" data-id="20" class="list-group-item">检测邮箱                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="20" class="list-group-item">检测用户名                            <span class="tag">
+                                                <a href="javascript:;" data-id="21" class="list-group-item">检测用户名                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="21" class="list-group-item">检测昵称                            <span class="tag">
+                                                <a href="javascript:;" data-id="22" class="list-group-item">检测昵称                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="22" class="list-group-item">检测手机                            <span class="tag">
+                                                <a href="javascript:;" data-id="23" class="list-group-item">检测手机                            <span class="tag">
                                                             </span>
                         </a>
-                                                <a href="javascript:;" data-id="23" class="list-group-item">检测手机                            <span class="tag">
+                                                <a href="javascript:;" data-id="24" class="list-group-item">检测手机                            <span class="tag">
                                                             </span>
                         </a>
-                                                <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>
                                             </div>
@@ -2895,13 +2898,11 @@
                         </div>
                     </div>
                 </div>
-                                <h2>验证接口</h2>
-                <hr>
                                 <div class="panel panel-default">
                     <div class="panel-heading" id="heading-19">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion19" href="#collapseOne19"> 检测邮箱 <span class="text-muted">/api/validate/check_email_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion19" href="#collapseOne19"> 小程序登录 <span class="text-muted">/api/user/minilogin</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne19" class="panel-collapse collapse">
@@ -2919,7 +2920,7 @@
 
                                 <div class="tab-pane active" id="info19">
                                     <div class="well">
-                                        检测邮箱                                    </div>
+                                        小程序登录                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -2957,16 +2958,46 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>email</td>
+                                                        <td>code</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>邮箱</td>
+                                                        <td>小程序code</td>
                                                     </tr>
                                                                                                         <tr>
-                                                        <td>id</td>
+                                                        <td>nickName</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>排除会员ID</td>
+                                                        <td>昵称</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>avatarUrl</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>头像</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>gender</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>性别</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>encryptedData</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>获取手机号用的</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>iv</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>获取手机号用的</td>
+                                                    </tr>
+                                                                                                        <tr>
+                                                        <td>type</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>1用户端2配送端</td>
                                                     </tr>
                                                                                                     </tbody>
                                             </table>
@@ -2989,14 +3020,34 @@
                                                 </div>
                                                 </div>
                                                 <div class="panel-body">
-                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_available" method="POST" name="form19" id="form19">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/minilogin" method="POST" name="form19" id="form19">
                                                                                                                 <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="code">code</label>
+                                                            <input type="string" class="form-control input-sm" id="code" required placeholder="小程序code" name="code">
                                                         </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="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="avatarUrl">avatarUrl</label>
+                                                            <input type="string" class="form-control input-sm" id="avatarUrl" required placeholder="头像" name="avatarUrl">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="gender">gender</label>
+                                                            <input type="string" class="form-control input-sm" id="gender" required placeholder="性别" name="gender">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="encryptedData">encryptedData</label>
+                                                            <input type="string" class="form-control input-sm" id="encryptedData" required placeholder="获取手机号用的" name="encryptedData">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="iv">iv</label>
+                                                            <input type="string" class="form-control input-sm" id="iv" required placeholder="获取手机号用的" name="iv">
+                                                        </div>
+                                                                                                                <div class="form-group">
+                                                            <label class="control-label" for="type">type</label>
+                                                            <input type="string" class="form-control input-sm" id="type" required placeholder="1用户端2配送端" name="type">
                                                         </div>
                                                                                                                 <div class="form-group form-group-submit">
                                                             <button type="submit" class="btn btn-success send" rel="19">提交</button>
@@ -3038,11 +3089,13 @@
                         </div>
                     </div>
                 </div>
+                                <h2>验证接口</h2>
+                <hr>
                                 <div class="panel panel-default">
                     <div class="panel-heading" id="heading-20">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion20" href="#collapseOne20"> 检测用户名 <span class="text-muted">/api/validate/check_username_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion20" href="#collapseOne20"> 检测邮箱 <span class="text-muted">/api/validate/check_email_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne20" class="panel-collapse collapse">
@@ -3060,7 +3113,7 @@
 
                                 <div class="tab-pane active" id="info20">
                                     <div class="well">
-                                        检测用户名                                    </div>
+                                        检测邮箱                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -3098,10 +3151,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>username</td>
+                                                        <td>email</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>用户名</td>
+                                                        <td>邮箱</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -3130,10 +3183,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="form20" id="form20">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_email_available" method="POST" name="form20" id="form20">
                                                                                                                 <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>
@@ -3183,7 +3236,7 @@
                     <div class="panel-heading" id="heading-21">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion21" href="#collapseOne21"> 检测昵称 <span class="text-muted">/api/validate/check_nickname_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion21" href="#collapseOne21"> 检测用户名 <span class="text-muted">/api/validate/check_username_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne21" class="panel-collapse collapse">
@@ -3201,7 +3254,7 @@
 
                                 <div class="tab-pane active" id="info21">
                                     <div class="well">
-                                        检测昵称                                    </div>
+                                        检测用户名                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -3239,10 +3292,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>nickname</td>
+                                                        <td>username</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>昵称</td>
+                                                        <td>用户名</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -3271,10 +3324,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="form21" id="form21">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_username_available" method="POST" name="form21" id="form21">
                                                                                                                 <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>
@@ -3324,7 +3377,7 @@
                     <div class="panel-heading" id="heading-22">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion22" href="#collapseOne22"> 检测手机 <span class="text-muted">/api/validate/check_mobile_available</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion22" href="#collapseOne22"> 检测昵称 <span class="text-muted">/api/validate/check_nickname_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne22" class="panel-collapse collapse">
@@ -3342,7 +3395,7 @@
 
                                 <div class="tab-pane active" id="info22">
                                     <div class="well">
-                                        检测手机                                    </div>
+                                        检测昵称                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
                                         <div class="panel-body">
@@ -3380,10 +3433,10 @@
                                                 </thead>
                                                 <tbody>
                                                                                                         <tr>
-                                                        <td>mobile</td>
+                                                        <td>nickname</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>手机号</td>
+                                                        <td>昵称</td>
                                                     </tr>
                                                                                                         <tr>
                                                         <td>id</td>
@@ -3412,10 +3465,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="form22" id="form22">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_nickname_available" method="POST" name="form22" id="form22">
                                                                                                                 <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>
@@ -3465,7 +3518,7 @@
                     <div class="panel-heading" id="heading-23">
                         <h4 class="panel-title">
                             <span class="label label-primary">POST</span>
-                            <a data-toggle="collapse" data-parent="#accordion23" href="#collapseOne23"> 检测手机 <span class="text-muted">/api/validate/check_mobile_exist</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion23" href="#collapseOne23"> 检测手机 <span class="text-muted">/api/validate/check_mobile_available</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne23" class="panel-collapse collapse">
@@ -3526,6 +3579,12 @@
                                                         <td>是</td>
                                                         <td>手机号</td>
                                                     </tr>
+                                                                                                        <tr>
+                                                        <td>id</td>
+                                                        <td>string</td>
+                                                        <td>是</td>
+                                                        <td>排除会员ID</td>
+                                                    </tr>
                                                                                                     </tbody>
                                             </table>
                                                                                     </div>
@@ -3547,11 +3606,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="form23" id="form23">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_available" method="POST" name="form23" id="form23">
                                                                                                                 <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="23">提交</button>
                                                             <button type="reset" class="btn btn-info" rel="23">重置</button>
@@ -3596,7 +3659,7 @@
                     <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_exist</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion24" href="#collapseOne24"> 检测手机 <span class="text-muted">/api/validate/check_mobile_exist</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne24" class="panel-collapse collapse">
@@ -3614,7 +3677,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">
@@ -3655,7 +3718,7 @@
                                                         <td>mobile</td>
                                                         <td>string</td>
                                                         <td>是</td>
-                                                        <td>邮箱</td>
+                                                        <td>手机号</td>
                                                     </tr>
                                                                                                     </tbody>
                                             </table>
@@ -3678,10 +3741,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="form24" id="form24">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_mobile_exist" method="POST" name="form24" id="form24">
                                                                                                                 <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="24">提交</button>
@@ -3727,7 +3790,7 @@
                     <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_sms_correct</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion25" href="#collapseOne25"> 检测邮箱 <span class="text-muted">/api/validate/check_email_exist</span></a>
                         </h4>
                     </div>
                     <div id="collapseOne25" class="panel-collapse collapse">
@@ -3745,6 +3808,137 @@
 
                                 <div class="tab-pane active" id="info25">
                                     <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="sandbox25">
+                                    <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="form25" id="form25">
+                                                                                                                <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="25">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="25">重置</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_headers25"></pre>
+                                                            <pre id="response25"></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="sample25">
+                                    <div class="row">
+                                        <div class="col-md-12">
+                                            <pre id="sample_response25">无</pre>
+                                        </div>
+                                    </div>
+                                </div><!-- #sample -->
+
+                            </div><!-- .tab-content -->
+                        </div>
+                    </div>
+                </div>
+                                <div class="panel panel-default">
+                    <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_sms_correct</span></a>
+                        </h4>
+                    </div>
+                    <div id="collapseOne26" class="panel-collapse collapse">
+                        <div class="panel-body">
+
+                            <!-- Nav tabs -->
+                            <ul class="nav nav-tabs" id="doctab26">
+                                <li class="active"><a href="#info26" data-toggle="tab">基础信息</a></li>
+                                <li><a href="#sandbox26" data-toggle="tab">在线测试</a></li>
+                                <li><a href="#sample26" data-toggle="tab">返回示例</a></li>
+                            </ul>
+
+                            <!-- Tab panes -->
+                            <div class="tab-content">
+
+                                <div class="tab-pane active" id="info26">
+                                    <div class="well">
                                         检测手机验证码                                    </div>
                                     <div class="panel panel-default">
                                         <div class="panel-heading"><strong>权限</strong></div>
@@ -3811,7 +4005,7 @@
                                     </div>
                                 </div><!-- #info -->
 
-                                <div class="tab-pane" id="sandbox25">
+                                <div class="tab-pane" id="sandbox26">
                                     <div class="row">
                                         <div class="col-md-12">
                                                                                         <div class="panel panel-default">
@@ -3821,7 +4015,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="form25" id="form25">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_sms_correct" method="POST" name="form26" id="form26">
                                                                                                                 <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">
@@ -3835,8 +4029,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="25">提交</button>
-                                                            <button type="reset" class="btn btn-info" rel="25">重置</button>
+                                                            <button type="submit" class="btn btn-success send" rel="26">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="26">重置</button>
                                                         </div>
                                                     </form>
                                                 </div>
@@ -3846,8 +4040,8 @@
                                                 <div class="panel-body">
                                                     <div class="row">
                                                         <div class="col-md-12" style="overflow-x:auto">
-                                                            <pre id="response_headers25"></pre>
-                                                            <pre id="response25"></pre>
+                                                            <pre id="response_headers26"></pre>
+                                                            <pre id="response26"></pre>
                                                         </div>
                                                     </div>
                                                 </div>
@@ -3862,10 +4056,10 @@
                                     </div>
                                 </div><!-- #sandbox -->
 
-                                <div class="tab-pane" id="sample25">
+                                <div class="tab-pane" id="sample26">
                                     <div class="row">
                                         <div class="col-md-12">
-                                            <pre id="sample_response25">无</pre>
+                                            <pre id="sample_response26">无</pre>
                                         </div>
                                     </div>
                                 </div><!-- #sample -->
@@ -3875,26 +4069,26 @@
                     </div>
                 </div>
                                 <div class="panel panel-default">
-                    <div class="panel-heading" id="heading-26">
+                    <div class="panel-heading" id="heading-27">
                         <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_ems_correct</span></a>
+                            <a data-toggle="collapse" data-parent="#accordion27" href="#collapseOne27"> 检测邮箱验证码 <span class="text-muted">/api/validate/check_ems_correct</span></a>
                         </h4>
                     </div>
-                    <div id="collapseOne26" class="panel-collapse collapse">
+                    <div id="collapseOne27" class="panel-collapse collapse">
                         <div class="panel-body">
 
                             <!-- Nav tabs -->
-                            <ul class="nav nav-tabs" id="doctab26">
-                                <li class="active"><a href="#info26" data-toggle="tab">基础信息</a></li>
-                                <li><a href="#sandbox26" data-toggle="tab">在线测试</a></li>
-                                <li><a href="#sample26" data-toggle="tab">返回示例</a></li>
+                            <ul class="nav nav-tabs" id="doctab27">
+                                <li class="active"><a href="#info27" data-toggle="tab">基础信息</a></li>
+                                <li><a href="#sandbox27" data-toggle="tab">在线测试</a></li>
+                                <li><a href="#sample27" data-toggle="tab">返回示例</a></li>
                             </ul>
 
                             <!-- Tab panes -->
                             <div class="tab-content">
 
-                                <div class="tab-pane active" id="info26">
+                                <div class="tab-pane active" id="info27">
                                     <div class="well">
                                         检测邮箱验证码                                    </div>
                                     <div class="panel panel-default">
@@ -3962,7 +4156,7 @@
                                     </div>
                                 </div><!-- #info -->
 
-                                <div class="tab-pane" id="sandbox26">
+                                <div class="tab-pane" id="sandbox27">
                                     <div class="row">
                                         <div class="col-md-12">
                                                                                         <div class="panel panel-default">
@@ -3972,7 +4166,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="form26" id="form26">
+                                                    <form enctype="application/x-www-form-urlencoded" role="form" action="/api/validate/check_ems_correct" method="POST" name="form27" id="form27">
                                                                                                                 <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">
@@ -3986,8 +4180,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="26">提交</button>
-                                                            <button type="reset" class="btn btn-info" rel="26">重置</button>
+                                                            <button type="submit" class="btn btn-success send" rel="27">提交</button>
+                                                            <button type="reset" class="btn btn-info" rel="27">重置</button>
                                                         </div>
                                                     </form>
                                                 </div>
@@ -3997,8 +4191,8 @@
                                                 <div class="panel-body">
                                                     <div class="row">
                                                         <div class="col-md-12" style="overflow-x:auto">
-                                                            <pre id="response_headers26"></pre>
-                                                            <pre id="response26"></pre>
+                                                            <pre id="response_headers27"></pre>
+                                                            <pre id="response27"></pre>
                                                         </div>
                                                     </div>
                                                 </div>
@@ -4013,10 +4207,10 @@
                                     </div>
                                 </div><!-- #sandbox -->
 
-                                <div class="tab-pane" id="sample26">
+                                <div class="tab-pane" id="sample27">
                                     <div class="row">
                                         <div class="col-md-12">
-                                            <pre id="sample_response26">无</pre>
+                                            <pre id="sample_response27">无</pre>
                                         </div>
                                     </div>
                                 </div><!-- #sample -->
@@ -4034,7 +4228,7 @@
 
                 </div>
                 <div class="col-md-6" align="right">
-                    Generated on 2021-09-22 08:56:06 <a href="./" target="_blank">宠365</a>
+                    Generated on 2021-09-22 11:04:35 <a href="./" target="_blank">宠365</a>
                 </div>
             </div>