作者 郭盛
1 个管道 的构建 通过 耗费 2 秒

新赠擅长领域模块

<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020/1/9
* Time: 17:14
*/
namespace app\api\controller;
use app\common\controller\Api;
use think\Db;
use think\Validate;
/**
* 老师接口
*/
class Teacher extends Api
{
/**
* @ApiTitle (新赠擅长领域)
* @ApiSummary (新赠擅长领域)
* @ApiMethod (POST)
* @ApiRoute (/api/teacher/index)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="contype_id", type="int", required=true, description="咨询分类ID")
* @ApiParams (name="money", type="string", required=true, description="资讯价格")
* @ApiParams (name="content", type="string", required=true, description="领域优势内容")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id':擅长领域ID
}
})
*/
public function index()
{
$param = $this->request->param();
$param['user_id'] = $this->getUserId();
$validate = new Validate([
'contype_id' => 'require',
'money' => 'require',
'content' => 'require',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$info = Db::name('territory')
->where('user_id',$param['user_id'])
->where('contype_id',$param['contype_id'])
->find();
if(!empty($info)){
$this->error('该标签您已经添加过了');
}
$param['createtime'] = time();
$param['updatetime'] = time();
$data = Db::name('territory')->insertGetId($param);
$res['id'] = $data;
if(!empty($data)){
$this->success('success',$res);
}else{
$this->error('sql执行失败');
}
}
/**
* @ApiTitle (擅长领域详情)
* @ApiSummary (擅长领域详情)
* @ApiMethod (POST)
* @ApiRoute (/api/teacher/info)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="id", type="int", required=true, description="擅长领域ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id'://擅长领域ID
'contype_id'://资讯分类ID
'money'://金额
'content'://简介
}
})
*/
public function info()
{
$user_id = $this->getUserId();
$id = $this->request->param('id');
if(empty($id)){
$this->error('缺少必要参数');
}
$data = Db::name('territory')
->field('createtime,updatetime,user_id',true)
->where('id',$id)
->find();
$this->success('success',$data);
}
/**
* @ApiTitle (编辑擅长领域)
* @ApiSummary (编辑擅长领域)
* @ApiMethod (POST)
* @ApiRoute (/api/teacher/upd)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="id", type="int", required=true, description="擅长领域ID")
* @ApiParams (name="contype_id", type="int", required=true, description="咨询分类ID")
* @ApiParams (name="money", type="string", required=true, description="资讯价格")
* @ApiParams (name="content", type="string", required=true, description="领域优势内容")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id':擅长领域ID
}
})
*/
public function upd()
{
$user_id = $this->getUserId();
$param = $this->request->param();
if(empty($param['id'])){
$this->error('缺少必要参数');
}
$validate = new Validate([
'contype_id' => 'require',
'money' => 'require',
'content' => 'require',
]);
if (!$validate->check($param)) {
$this->error($validate->getError());
}
$param['updatetime'] = time();
$info = Db::name('territory')
->where('id',$param['id'])
->update($param);
if(empty($info)){
$this->error('sql执行错误');
}else{
$this->success('SUCCESS');
}
}
/**
* @ApiTitle (删除擅长领域)
* @ApiSummary (删除擅长领域)
* @ApiMethod (POST)
* @ApiRoute (/api/teacher/del)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="id", type="int", required=true, description="擅长领域ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
}
})
*/
public function del()
{
$user_id = $this->getUserId();
$id = $this->request->param('id');
if(empty($id)){
$this->error('缺少必要参数');
}
$data = Db::name('territory')
->where('id',$id)
->delete();
if(empty($data)){
$this->error('sql运行失败');
}else{
$this->success('success');
}
}
}
\ No newline at end of file
... ...
... ... @@ -352,7 +352,7 @@ class Api
protected function getUserId()
{
if (empty($this->userId)) {
$this->success('');
$this->error('用户未登录');
}
$user = Db::name('user')->where(['id'=>$this->userId])->find();
if($user['status'] != 'normal'){
... ...
... ... @@ -160,13 +160,20 @@
<a href="javascript:;" data-id="7" class="list-group-item">发送验证码</a>
<a href="javascript:;" data-id="8" class="list-group-item">检测验证码</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="9" class="list-group-item">新赠擅长领域</a>
<a href="javascript:;" data-id="10" class="list-group-item">擅长领域详情</a>
<a href="javascript:;" data-id="11" class="list-group-item">编辑擅长领域</a>
<a href="javascript:;" data-id="12" class="list-group-item">删除擅长领域</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="9" class="list-group-item">获取sessionKey和openid</a>
<a href="javascript:;" data-id="10" class="list-group-item"></a>
<a href="javascript:;" data-id="11" class="list-group-item">小程序登录注册</a>
<a href="javascript:;" data-id="12" class="list-group-item">通过code获取token</a>
<a href="javascript:;" data-id="13" class="list-group-item"></a>
<a href="javascript:;" data-id="13" class="list-group-item">获取sessionKey和openid</a>
<a href="javascript:;" data-id="14" class="list-group-item"></a>
<a href="javascript:;" data-id="15" class="list-group-item">小程序登录注册</a>
<a href="javascript:;" data-id="16" class="list-group-item">通过code获取token</a>
<a href="javascript:;" data-id="17" class="list-group-item"></a>
</div>
</div>
</div>
... ... @@ -1003,7 +1010,8 @@
"data": {
"id": //id,
"title"://标题,
"type" ://类型(1经营管理2职业发展</pre>
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1264,13 +1272,13 @@
</div>
</div>
</div>
<h2>登录接口</h2>
<h2>老师接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-9">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion9" href="#collapseOne9"> 获取sessionKey和openid <span class="text-muted">/api/user/getSessionKey</span></a>
<a data-toggle="collapse" data-parent="#accordion9" href="#collapseOne9"> 新赠擅长领域 <span class="text-muted">/api/teacher/index</span></a>
</h4>
</div>
<div id="collapseOne9" class="panel-collapse collapse">
... ... @@ -1288,11 +1296,28 @@
<div class="tab-pane active" id="info9">
<div class="well">
获取sessionKey和openid </div>
新赠擅长领域 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</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>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -1309,10 +1334,22 @@
</thead>
<tbody>
<tr>
<td>code</td>
<td>contype_id</td>
<td>int</td>
<td></td>
<td>咨询分类ID</td>
</tr>
<tr>
<td>money</td>
<td>string</td>
<td></td>
<td>小程序code</td>
<td>资讯价格</td>
</tr>
<tr>
<td>content</td>
<td>string</td>
<td></td>
<td>领域优势内容</td>
</tr>
</tbody>
</table>
... ... @@ -1329,12 +1366,31 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getSessionKey" method="POST" name="form9" id="form9">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/teacher/index" method="POST" name="form9" id="form9">
<div class="form-group">
<label class="control-label" for="code">code</label>
<input type="string" class="form-control input-sm" id="code" required placeholder="小程序code" name="code">
<label class="control-label" for="contype_id">contype_id</label>
<input type="int" class="form-control input-sm" id="contype_id" required placeholder="咨询分类ID" name="contype_id">
</div>
<div class="form-group">
<label class="control-label" for="money">money</label>
<input type="string" class="form-control input-sm" id="money" required placeholder="资讯价格" name="money">
</div>
<div class="form-group">
<label class="control-label" for="content">content</label>
<input type="string" class="form-control input-sm" id="content" required placeholder="领域优势内容" name="content">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="9">提交</button>
... ... @@ -1368,14 +1424,13 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response9">{
"code": 1,
"msg": "获取成功",
"time": "1553839125",
"data": {
"session_key": "session_key",//token
"openid": "openid",//openid
},
}</pre>
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id':擅长领域ID
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1387,8 +1442,8 @@
<div class="panel panel-default">
<div class="panel-heading" id="heading-10">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion10" href="#collapseOne10"> <span class="text-muted">/api/user/http_get</span></a>
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion10" href="#collapseOne10"> 擅长领域详情 <span class="text-muted">/api/teacher/info</span></a>
</h4>
</div>
<div id="collapseOne10" class="panel-collapse collapse">
... ... @@ -1406,17 +1461,51 @@
<div class="tab-pane active" id="info10">
<div class="well">
</div>
擅长领域详情 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</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>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</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>id</td>
<td>int</td>
<td></td>
<td>擅长领域ID</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -1430,11 +1519,23 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/http_get" method="get" name="form10" id="form10">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/teacher/info" method="POST" name="form10" id="form10">
<div class="form-group">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="擅长领域ID" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="10">提交</button>
... ... @@ -1467,7 +1568,17 @@
<div class="tab-pane" id="sample10">
<div class="row">
<div class="col-md-12">
<pre id="sample_response10"></pre>
<pre id="sample_response10">{
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id'://擅长领域ID
'contype_id'://资讯分类ID
'money'://金额
'content'://简介
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1480,7 +1591,7 @@
<div class="panel-heading" id="heading-11">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion11" href="#collapseOne11"> 小程序登录注册 <span class="text-muted">/api/user/login</span></a>
<a data-toggle="collapse" data-parent="#accordion11" href="#collapseOne11"> 编辑擅长领域 <span class="text-muted">/api/teacher/upd</span></a>
</h4>
</div>
<div id="collapseOne11" class="panel-collapse collapse">
... ... @@ -1498,11 +1609,28 @@
<div class="tab-pane active" id="info11">
<div class="well">
小程序登录注册 </div>
编辑擅长领域 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</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>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -1519,28 +1647,28 @@
</thead>
<tbody>
<tr>
<td>openid</td>
<td>string</td>
<td>id</td>
<td>int</td>
<td></td>
<td>openid</td>
<td>擅长领域ID</td>
</tr>
<tr>
<td>session_key</td>
<td>string</td>
<td>contype_id</td>
<td>int</td>
<td></td>
<td>session_key</td>
<td>咨询分类ID</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>money</td>
<td>string</td>
<td></td>
<td>encrypted_data</td>
<td>资讯价格</td>
</tr>
<tr>
<td>iv</td>
<td>content</td>
<td>string</td>
<td></td>
<td>iv</td>
<td>领域优势内容</td>
</tr>
</tbody>
</table>
... ... @@ -1557,24 +1685,35 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/login" method="POST" name="form11" id="form11">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/teacher/upd" method="POST" name="form11" id="form11">
<div class="form-group">
<label class="control-label" for="openid">openid</label>
<input type="string" class="form-control input-sm" id="openid" required placeholder="openid" name="openid">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="擅长领域ID" name="id">
</div>
<div class="form-group">
<label class="control-label" for="session_key">session_key</label>
<input type="string" class="form-control input-sm" id="session_key" required placeholder="session_key" name="session_key">
<label class="control-label" for="contype_id">contype_id</label>
<input type="int" class="form-control input-sm" id="contype_id" required placeholder="咨询分类ID" name="contype_id">
</div>
<div class="form-group">
<label class="control-label" for="encrypted_data">encrypted_data</label>
<input type="string" class="form-control input-sm" id="encrypted_data" required placeholder="encrypted_data" name="encrypted_data">
<label class="control-label" for="money">money</label>
<input type="string" class="form-control input-sm" id="money" required placeholder="资讯价格" name="money">
</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="iv" name="iv">
<label class="control-label" for="content">content</label>
<input type="string" class="form-control input-sm" id="content" required placeholder="领域优势内容" name="content">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="11">提交</button>
... ... @@ -1608,13 +1747,13 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response11">{
"code": 1,
"msg": "登陆成功",
"time": "1553839125",
"data": {
"token": "token",//登录唯一标识
},
}</pre>
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id':擅长领域ID
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1627,7 +1766,7 @@
<div class="panel-heading" id="heading-12">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion12" href="#collapseOne12"> 通过code获取token <span class="text-muted">/api/user/getToken</span></a>
<a data-toggle="collapse" data-parent="#accordion12" href="#collapseOne12"> 删除擅长领域 <span class="text-muted">/api/teacher/del</span></a>
</h4>
</div>
<div id="collapseOne12" class="panel-collapse collapse">
... ... @@ -1645,11 +1784,28 @@
<div class="tab-pane active" id="info12">
<div class="well">
通过code获取token </div>
删除擅长领域 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</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>token</td>
<td>string</td>
<td></td>
<td>请求的Token</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
... ... @@ -1666,10 +1822,10 @@
</thead>
<tbody>
<tr>
<td>code</td>
<td>string</td>
<td>id</td>
<td>int</td>
<td></td>
<td>code</td>
<td>擅长领域ID</td>
</tr>
</tbody>
</table>
... ... @@ -1686,12 +1842,23 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
<div class="headers">
<div class="form-group">
<label class="control-label" for="token">token</label>
<input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getToken" method="POST" name="form12" id="form12">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/teacher/del" method="POST" name="form12" id="form12">
<div class="form-group">
<label class="control-label" for="code">code</label>
<input type="string" class="form-control input-sm" id="code" required placeholder="code" name="code">
<label class="control-label" for="id">id</label>
<input type="int" class="form-control input-sm" id="id" required placeholder="擅长领域ID" name="id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="12">提交</button>
... ... @@ -1725,13 +1892,12 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response12">{
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
"data": {
"token": "token",//登录唯一标识
},
}</pre>
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1740,11 +1906,13 @@
</div>
</div>
</div>
<h2>登录接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-13">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion13" href="#collapseOne13"> <span class="text-muted">/api/user/member</span></a>
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion13" href="#collapseOne13"> 获取sessionKey和openid <span class="text-muted">/api/user/getSessionKey</span></a>
</h4>
</div>
<div id="collapseOne13" class="panel-collapse collapse">
... ... @@ -1762,7 +1930,7 @@
<div class="tab-pane active" id="info13">
<div class="well">
</div>
获取sessionKey和openid </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
<div class="panel-body">
... ... @@ -1772,25 +1940,43 @@
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
</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="sandbox13">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/member" method="get" name="form13" id="form13">
<div class="form-group">
<table class="table table-hover">
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必选</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>string</td>
<td></td>
<td>小程序code</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="sandbox13">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getSessionKey" method="POST" name="form13" id="form13">
<div class="form-group">
<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">
<button type="submit" class="btn btn-success send" rel="13">提交</button>
... ... @@ -1823,7 +2009,463 @@
<div class="tab-pane" id="sample13">
<div class="row">
<div class="col-md-12">
<pre id="sample_response13"></pre>
<pre id="sample_response13">{
"code": 1,
"msg": "获取成功",
"time": "1553839125",
"data": {
"session_key": "session_key",//token
"openid": "openid",//openid
},
}</pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-14">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion14" href="#collapseOne14"> <span class="text-muted">/api/user/http_get</span></a>
</h4>
</div>
<div id="collapseOne14" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab14">
<li class="active"><a href="#info14" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox14" data-toggle="tab">在线测试</a></li>
<li><a href="#sample14" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info14">
<div class="well">
</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">
</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="sandbox14">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/http_get" method="get" name="form14" id="form14">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="14">提交</button>
<button type="reset" class="btn btn-info" rel="14">重置</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_headers14"></pre>
<pre id="response14"></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="sample14">
<div class="row">
<div class="col-md-12">
<pre id="sample_response14"></pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-15">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion15" href="#collapseOne15"> 小程序登录注册 <span class="text-muted">/api/user/login</span></a>
</h4>
</div>
<div id="collapseOne15" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab15">
<li class="active"><a href="#info15" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox15" data-toggle="tab">在线测试</a></li>
<li><a href="#sample15" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info15">
<div class="well">
小程序登录注册 </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>openid</td>
<td>string</td>
<td></td>
<td>openid</td>
</tr>
<tr>
<td>session_key</td>
<td>string</td>
<td></td>
<td>session_key</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>string</td>
<td></td>
<td>encrypted_data</td>
</tr>
<tr>
<td>iv</td>
<td>string</td>
<td></td>
<td>iv</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="sandbox15">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/login" method="POST" name="form15" id="form15">
<div class="form-group">
<label class="control-label" for="openid">openid</label>
<input type="string" class="form-control input-sm" id="openid" required placeholder="openid" name="openid">
</div>
<div class="form-group">
<label class="control-label" for="session_key">session_key</label>
<input type="string" class="form-control input-sm" id="session_key" required placeholder="session_key" name="session_key">
</div>
<div class="form-group">
<label class="control-label" for="encrypted_data">encrypted_data</label>
<input type="string" class="form-control input-sm" id="encrypted_data" required placeholder="encrypted_data" name="encrypted_data">
</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="iv" name="iv">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="15">提交</button>
<button type="reset" class="btn btn-info" rel="15">重置</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_headers15"></pre>
<pre id="response15"></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="sample15">
<div class="row">
<div class="col-md-12">
<pre id="sample_response15">{
"code": 1,
"msg": "登陆成功",
"time": "1553839125",
"data": {
"token": "token",//登录唯一标识
},
}</pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-16">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion16" href="#collapseOne16"> 通过code获取token <span class="text-muted">/api/user/getToken</span></a>
</h4>
</div>
<div id="collapseOne16" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab16">
<li class="active"><a href="#info16" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox16" data-toggle="tab">在线测试</a></li>
<li><a href="#sample16" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info16">
<div class="well">
通过code获取token </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>code</td>
<td>string</td>
<td></td>
<td>code</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="sandbox16">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getToken" method="POST" name="form16" id="form16">
<div class="form-group">
<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">
<button type="submit" class="btn btn-success send" rel="16">提交</button>
<button type="reset" class="btn btn-info" rel="16">重置</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_headers16"></pre>
<pre id="response16"></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="sample16">
<div class="row">
<div class="col-md-12">
<pre id="sample_response16">{
"code": 1,
"msg": "SUCCESS",
"time": "1553839125",
"data": {
"token": "token",//登录唯一标识
},
}</pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-17">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion17" href="#collapseOne17"> <span class="text-muted">/api/user/member</span></a>
</h4>
</div>
<div id="collapseOne17" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab17">
<li class="active"><a href="#info17" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox17" data-toggle="tab">在线测试</a></li>
<li><a href="#sample17" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info17">
<div class="well">
</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">
</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="sandbox17">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading"><strong>参数</strong></div>
<div class="panel-body">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/member" method="get" name="form17" id="form17">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="17">提交</button>
<button type="reset" class="btn btn-info" rel="17">重置</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_headers17"></pre>
<pre id="response17"></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="sample17">
<div class="row">
<div class="col-md-12">
<pre id="sample_response17"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -1838,7 +2480,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-01-09 15:52:43 </div>
Generated on 2020-01-09 18:28:15 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...