作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

bug修改

... ... @@ -35,7 +35,7 @@ use addons\epay\library\Service;
*/
class User extends Api
{
protected $noNeedLogin = ['registerUser','agreementUser','registerCompany','agreementCompany','login','resetpwd','exam','noLogin'];
protected $noNeedLogin = ['registerUser','agreementUser','registerCompany','agreementCompany','login','resetpwd','exam','noLogin','problemList','problemInfo'];
protected $noNeedRight = ['*'];
public function _initialize()
... ... @@ -1687,30 +1687,28 @@ class User extends Api
* @ApiSummary (常见问题)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)")
* @ApiParams (name="page_num", type="inter", required=false, description="每页显示数据个数(默认10)")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1600167138",
"data": {
"total": 1, //数据总数
"list": [{
"id": 7, //消息ID
"title": "这是个消息", //消息标题
"createtime": "2020.09.12 20:45" //发送时间
}]
}
})
"code": 1,
"msg": "成功",
"time": "1602814874",
"data": {
"total": 1, //数据总数
"list": [{
"id": 7, //问题ID
"title": "常见问题测试", //标题
"createtime": "2020.09.12 20:45" //发布时间
}]
}
})
*/
public function problemList()
{
$page = $this->request->param('page', 1, 'intval');
$page_num = $this->request->param('page_num', 10, 'intval');
$data = Problem::where('user_id',$this->auth->id)
->order('createtime desc')
$data = Problem::order('createtime desc')
->paginate($page_num,false,['page'=>$page])
->each(function($v){
$v['createtime'] = date('Y.m.d H:i',$v['createtime']);
... ... @@ -1725,23 +1723,20 @@ class User extends Api
* @ApiSummary (常见问题-详情)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="problem_id", type="inter", required=true, description="问题ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1600167441",
"data": {
"id": 7, //消息ID
"user_id": 16, //用户ID
"title": "这是个消息", //消息标题
"content": "这个消息还不错Q", //消息内容
"is_read": "1", //是否已读:0=否,1=是
"createtime": 1599914736,
"updatetime": 1600167441
}
})
"code": 1,
"msg": "成功",
"time": "1602815306",
"data": {
"id": 7, //问题ID
"title": "常见问题测试", //问题标题
"content": "<p>常见问题测试内容</p>", //问题内容
"createtime": 1599914736,
"updatetime": 1599914736
}
})
*/
public function problemInfo()
{
... ...
... ... @@ -16349,24 +16349,7 @@
<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">
... ... @@ -16409,17 +16392,6 @@
<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="/mobile/user/problemList" method="POST" name="form130" id="form130">
... ... @@ -16463,18 +16435,18 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response130">{
"code": 1,
"msg": "成功",
"time": "1600167138",
"data": {
"total": 1, //数据总数
"list": [{
"id": 7, //消息ID
"title": "这是个消息", //消息标题
"createtime": "2020.09.12 20:45" //发送时间
}]
}
}</pre>
"code": 1,
"msg": "成功",
"time": "1602814874",
"data": {
"total": 1, //数据总数
"list": [{
"id": 7, //问题ID
"title": "常见问题测试", //标题
"createtime": "2020.09.12 20:45" //发布时间
}]
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -16509,24 +16481,7 @@
<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">
... ... @@ -16563,17 +16518,6 @@
<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="/mobile/user/problemInfo" method="POST" name="form131" id="form131">
... ... @@ -16613,19 +16557,17 @@
<div class="row">
<div class="col-md-12">
<pre id="sample_response131">{
"code": 1,
"msg": "成功",
"time": "1600167441",
"data": {
"id": 7, //消息ID
"user_id": 16, //用户ID
"title": "这是个消息", //消息标题
"content": "这个消息还不错Q", //消息内容
"is_read": "1", //是否已读:0=否,1=是
"createtime": 1599914736,
"updatetime": 1600167441
}
}</pre>
"code": 1,
"msg": "成功",
"time": "1602815306",
"data": {
"id": 7, //问题ID
"title": "常见问题测试", //问题标题
"content": "<p>常见问题测试内容</p>", //问题内容
"createtime": 1599914736,
"updatetime": 1599914736
}
}</pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -20174,7 +20116,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-10-16 10:05:59 </div>
Generated on 2020-10-16 10:31:16 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">企智帮</a>
</div>
... ...