作者 jinglong
1 个管道 的构建 通过 耗费 0 秒

更新订单状态

... ... @@ -2,6 +2,7 @@
namespace app\api\controller;
use app\admin\model\Order;
use app\common\controller\Api;
use think\Db;
use think\Validate;
... ... @@ -13,10 +14,12 @@ class Orders extends Api
protected $noNeedLogin = [];
protected $noNeedRight = '*';
protected $uid = '';//token存贮user_id
protected $order_status = [];//订单状态
public function _initialize()
{
parent::_initialize();
$this->uid = $this->auth->getUserId();
$this->order_status = config('verify.status');
}
/**
... ... @@ -158,7 +161,6 @@ class Orders extends Api
"uid": 2,
"status": 0,//订单状态(0: 待付款, 1: 已取消,2: 待发货, 3: 退款申请中,4: 已退款, 5: 待收货,6: 退换货申请中, 7: 已换货,8: 已完成)
"order_sn": 1000001,//订单号
"pay_order_sn": "pay1575432163433287009591",
"receive_name": "景龙",//收货人
"receive_mobile": "13752011725",//收货电话
"receive_address": "天津市南开区",//收货地址
... ... @@ -205,7 +207,7 @@ class Orders extends Api
$this->error($validate->getError());
}
$res = Common::findSoftWhereData('order',['id'=>$order_id,'uid'=>$this->uid],'updatetime,deletetime',true);
$res = Common::findSoftWhereData('order',['id'=>$order_id,'uid'=>$this->uid],'pay_order_sn,updatetime,deletetime',true);
if($res){
$res['createtime'] = date('Y-m-d H:i:s',$res['createtime']);
//订单附加表
... ... @@ -250,4 +252,44 @@ class Orders extends Api
}
}
/**
* @ApiTitle (取消订单)
* @ApiSummary (取消订单)
* @ApiMethod (GET)
* @ApiRoute (/api/order/cancelOrder)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="order_id", type="inter", required=true, description="订单id")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571730709",
"data": null
})
*/
public function cancelOrder(){
if($this->request->isGet()){
$order_id = $this->request->get('order_id');
$rule = config('verify.order_detail');
$validate = new Validate($rule['rule'],$rule['msg']);
if (!$validate->check(['order_id'=>$order_id])) {
$this->error($validate->getError());
}
$status = $this->order_status;
$orderModel = new Order();
$res = $orderModel->where(['id'=>$order_id,'uid'=>$this->uid,'status'=>$status[0]])->update(['status'=>$status[1]]);
if($res){
$this->success('成功');
}else{
$this->error('失败');
}
}else{
$this->error('请求方式错误');
}
}
}
... ...
... ... @@ -56,7 +56,7 @@ class Pay extends Api
//暂时写支付成功
$status = $this->order_status;
$orderModel = new Order();
$orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[1]]);
$orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[2]]);
$this->success('成功');
... ... @@ -115,7 +115,7 @@ class Pay extends Api
//支付成功,更新订单状态
$status = $this->order_status;
$orderModel = new Order();
$orderModel->where(['pay_order_sn'=>$message['out_trade_no'],'status'=>$status[0]])->update(['status'=>$status[1]]);
$orderModel->where(['pay_order_sn'=>$message['out_trade_no'],'status'=>$status[0]])->update(['status'=>$status[2]]);
}elseif($message['result_code'] === 'FAIL') {
//支付失败
}
... ... @@ -223,7 +223,7 @@ class Pay extends Api
//支付成功
$status = $this->order_status;
$orderModel = new Order();
$orderModel->where(['pay_order_sn'=>$message['out_trade_no'],'status'=>$status[0]])->update(['status'=>$status[1]]);
$orderModel->where(['pay_order_sn'=>$message['out_trade_no'],'status'=>$status[0]])->update(['status'=>$status[2]]);
}elseif($message['result_code'] === 'FAIL') {
//支付失败,好像有问题
}
... ...
... ... @@ -186,29 +186,30 @@
<div class="child collapse" id="订单接口">
<a href="javascript:;" data-id="22" class="list-group-item">我的订单</a>
<a href="javascript:;" data-id="23" class="list-group-item">订单详情</a>
<a href="javascript:;" data-id="24" 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="24" class="list-group-item">支付订单</a>
<a href="javascript:;" data-id="25" class="list-group-item">立即购买</a>
<a href="javascript:;" data-id="25" class="list-group-item">支付订单</a>
<a href="javascript:;" data-id="26" 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="26" class="list-group-item">商品检索列表</a>
<a href="javascript:;" data-id="27" 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="27" class="list-group-item">品类分类</a>
<a href="javascript:;" data-id="28" 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="28" class="list-group-item">小程序登录</a>
<a href="javascript:;" data-id="29" class="list-group-item">获取个人信息(新人/旧人)</a>
<a href="javascript:;" data-id="30" class="list-group-item">获取二维码</a>
<a href="javascript:;" data-id="31" class="list-group-item">收藏</a>
<a href="javascript:;" data-id="32" class="list-group-item">取消收藏</a>
<a href="javascript:;" data-id="33" class="list-group-item">我的收藏</a>
<a href="javascript:;" data-id="34" class="list-group-item">我的优惠券</a>
<a href="javascript:;" data-id="29" class="list-group-item">小程序登录</a>
<a href="javascript:;" data-id="30" class="list-group-item">获取个人信息(新人/旧人)</a>
<a href="javascript:;" data-id="31" class="list-group-item">获取二维码</a>
<a href="javascript:;" data-id="32" class="list-group-item">收藏</a>
<a href="javascript:;" data-id="33" class="list-group-item">取消收藏</a>
<a href="javascript:;" data-id="34" class="list-group-item">我的收藏</a>
<a href="javascript:;" data-id="35" class="list-group-item">我的优惠券</a>
</div>
</div>
</div>
... ... @@ -3765,7 +3766,6 @@
"uid": 2,
"status": 0,//订单状态(0: 待付款, 1: 已取消,2: 待发货, 3: 退款申请中,4: 已退款, 5: 待收货,6: 退换货申请中, 7: 已换货,8: 已完成)
"order_sn": 1000001,//订单号
"pay_order_sn": "pay1575432163433287009591",
"receive_name": "景龙",//收货人
"receive_mobile": "13752011725",//收货电话
"receive_address": "天津市南开区",//收货地址
... ... @@ -3809,13 +3809,11 @@
</div>
</div>
</div>
<h2>支付接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-24">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion24" href="#collapseOne24"> 支付订单 <span class="text-muted">/api/pay/pay</span></a>
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion24" href="#collapseOne24"> 取消订单 <span class="text-muted">/api/order/cancelOrder</span></a>
</h4>
</div>
<div id="collapseOne24" class="panel-collapse collapse">
... ... @@ -3833,6 +3831,151 @@
<div class="tab-pane active" id="info24">
<div class="well">
取消订单 </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>order_id</td>
<td>inter</td>
<td></td>
<td>订单id</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="sandbox24">
<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/order/cancelOrder" method="GET" name="form24" id="form24">
<div class="form-group">
<label class="control-label" for="order_id">order_id</label>
<input type="inter" class="form-control input-sm" id="order_id" required placeholder="订单id" name="order_id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="24">提交</button>
<button type="reset" class="btn btn-info" rel="24">重置</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_headers24"></pre>
<pre id="response24"></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="sample24">
<div class="row">
<div class="col-md-12">
<pre id="sample_response24">{
"code": 1,
"msg": "成功",
"time": "1571730709",
"data": null
}</pre>
</div>
</div>
</div><!-- #sample -->
</div><!-- .tab-content -->
</div>
</div>
</div>
<h2>支付接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-25">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion25" href="#collapseOne25"> 支付订单 <span class="text-muted">/api/pay/pay</span></a>
</h4>
</div>
<div id="collapseOne25" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab25">
<li class="active"><a href="#info25" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox25" data-toggle="tab">在线测试</a></li>
<li><a href="#sample25" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info25">
<div class="well">
支付订单 </div>
<div class="panel panel-default">
<div class="panel-heading"><strong>Headers</strong></div>
... ... @@ -3893,7 +4036,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox24">
<div class="tab-pane" id="sandbox25">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -3910,7 +4053,7 @@
<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/pay/pay" method="POST" name="form24" id="form24">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/pay/pay" method="POST" name="form25" id="form25">
<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">
... ... @@ -3920,8 +4063,8 @@
<input type="inter" class="form-control input-sm" id="order_sn" required placeholder="订单号" name="order_sn">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="24">提交</button>
<button type="reset" class="btn btn-info" rel="24">重置</button>
<button type="submit" class="btn btn-success send" rel="25">提交</button>
<button type="reset" class="btn btn-info" rel="25">重置</button>
</div>
</form>
</div>
... ... @@ -3931,8 +4074,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers24"></pre>
<pre id="response24"></pre>
<pre id="response_headers25"></pre>
<pre id="response25"></pre>
</div>
</div>
</div>
... ... @@ -3947,10 +4090,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample24">
<div class="tab-pane" id="sample25">
<div class="row">
<div class="col-md-12">
<pre id="sample_response24"></pre>
<pre id="sample_response25"></pre>
</div>
</div>
</div><!-- #sample -->
... ... @@ -3960,26 +4103,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-25">
<div class="panel-heading" id="heading-26">
<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/pay/purchase</span></a>
<a data-toggle="collapse" data-parent="#accordion26" href="#collapseOne26"> 立即购买 <span class="text-muted">/api/pay/purchase</span></a>
</h4>
</div>
<div id="collapseOne25" class="panel-collapse collapse">
<div id="collapseOne26" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab25">
<li class="active"><a href="#info25" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox25" data-toggle="tab">在线测试</a></li>
<li><a href="#sample25" data-toggle="tab">返回示例</a></li>
<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="info25">
<div class="tab-pane active" id="info26">
<div class="well">
立即购买 </div>
<div class="panel panel-default">
... ... @@ -4107,7 +4250,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">
... ... @@ -4124,7 +4267,7 @@
<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/pay/purchase" method="POST" name="form25" id="form25">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/pay/purchase" method="POST" name="form26" id="form26">
<div class="form-group">
<label class="control-label" for="receive_name">receive_name</label>
<input type="string" class="form-control input-sm" id="receive_name" required placeholder="收货人" name="receive_name">
... ... @@ -4178,8 +4321,8 @@
<input type="inter" class="form-control input-sm" id="total_expense_price" required placeholder="运费总金额" name="total_expense_price">
</div>
<div class="form-group">
<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>
... ... @@ -4189,8 +4332,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>
... ... @@ -4205,10 +4348,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 -->
... ... @@ -4220,26 +4363,26 @@
<h2>商品检索接口</h2>
<hr>
<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-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion26" href="#collapseOne26"> 商品检索列表 <span class="text-muted">/api/search/searchGoodsList</span></a>
<a data-toggle="collapse" data-parent="#accordion27" href="#collapseOne27"> 商品检索列表 <span class="text-muted">/api/search/searchGoodsList</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">
... ... @@ -4301,7 +4444,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">
... ... @@ -4318,7 +4461,7 @@
<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/search/searchGoodsList" method="GET" name="form26" id="form26">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/search/searchGoodsList" method="GET" name="form27" id="form27">
<div class="form-group">
<label class="control-label" for="keyword">keyword</label>
<input type="string" class="form-control input-sm" id="keyword" required placeholder="检索关键字" name="keyword">
... ... @@ -4328,8 +4471,8 @@
<input type="inter" class="form-control input-sm" id="page" required placeholder="分页页码" name="page">
</div>
<div class="form-group">
<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>
... ... @@ -4339,8 +4482,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>
... ... @@ -4355,10 +4498,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 id="sample_response27">{
"code": 1,
"msg": "成功",
"time": "1574941706",
... ... @@ -4408,26 +4551,26 @@
<h2>品类接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-27">
<div class="panel-heading" id="heading-28">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion27" href="#collapseOne27"> 品类分类 <span class="text-muted">/api/sort/sortType</span></a>
<a data-toggle="collapse" data-parent="#accordion28" href="#collapseOne28"> 品类分类 <span class="text-muted">/api/sort/sortType</span></a>
</h4>
</div>
<div id="collapseOne27" class="panel-collapse collapse">
<div id="collapseOne28" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<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 class="nav nav-tabs" id="doctab28">
<li class="active"><a href="#info28" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox28" data-toggle="tab">在线测试</a></li>
<li><a href="#sample28" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info27">
<div class="tab-pane active" id="info28">
<div class="well">
品类分类 </div>
<div class="panel panel-default">
... ... @@ -4449,19 +4592,19 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox27">
<div class="tab-pane" id="sandbox28">
<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/sort/sortType" method="GET" name="form27" id="form27">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/sort/sortType" method="GET" name="form28" id="form28">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="27">提交</button>
<button type="reset" class="btn btn-info" rel="27">重置</button>
<button type="submit" class="btn btn-success send" rel="28">提交</button>
<button type="reset" class="btn btn-info" rel="28">重置</button>
</div>
</form>
</div>
... ... @@ -4471,8 +4614,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers27"></pre>
<pre id="response27"></pre>
<pre id="response_headers28"></pre>
<pre id="response28"></pre>
</div>
</div>
</div>
... ... @@ -4487,10 +4630,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample27">
<div class="tab-pane" id="sample28">
<div class="row">
<div class="col-md-12">
<pre id="sample_response27">{
<pre id="sample_response28">{
"code": 1,
"msg": "成功",
"time": "1574939035",
... ... @@ -4526,26 +4669,26 @@
<h2>个人中心接口</h2>
<hr>
<div class="panel panel-default">
<div class="panel-heading" id="heading-28">
<div class="panel-heading" id="heading-29">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion28" href="#collapseOne28"> 小程序登录 <span class="text-muted">/api/user/login</span></a>
<a data-toggle="collapse" data-parent="#accordion29" href="#collapseOne29"> 小程序登录 <span class="text-muted">/api/user/login</span></a>
</h4>
</div>
<div id="collapseOne28" class="panel-collapse collapse">
<div id="collapseOne29" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab28">
<li class="active"><a href="#info28" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox28" data-toggle="tab">在线测试</a></li>
<li><a href="#sample28" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab29">
<li class="active"><a href="#info29" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox29" data-toggle="tab">在线测试</a></li>
<li><a href="#sample29" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info28">
<div class="tab-pane active" id="info29">
<div class="well">
小程序登录 </div>
<div class="panel panel-default">
... ... @@ -4596,13 +4739,13 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox28">
<div class="tab-pane" id="sandbox29">
<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="form28" id="form28">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/login" method="POST" name="form29" id="form29">
<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">
... ... @@ -4616,8 +4759,8 @@
<input type="string" class="form-control input-sm" id="avatar" required placeholder="小程序头像" name="avatar">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="28">提交</button>
<button type="reset" class="btn btn-info" rel="28">重置</button>
<button type="submit" class="btn btn-success send" rel="29">提交</button>
<button type="reset" class="btn btn-info" rel="29">重置</button>
</div>
</form>
</div>
... ... @@ -4627,8 +4770,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers28"></pre>
<pre id="response28"></pre>
<pre id="response_headers29"></pre>
<pre id="response29"></pre>
</div>
</div>
</div>
... ... @@ -4643,10 +4786,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample28">
<div class="tab-pane" id="sample29">
<div class="row">
<div class="col-md-12">
<pre id="sample_response28">{
<pre id="sample_response29">{
"code": 1,
"msg": "登录成功",
"time": "1553839125",
... ... @@ -4667,26 +4810,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-29">
<div class="panel-heading" id="heading-30">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion29" href="#collapseOne29"> 获取个人信息(新人/旧人) <span class="text-muted">/api/user/info</span></a>
<a data-toggle="collapse" data-parent="#accordion30" href="#collapseOne30"> 获取个人信息(新人/旧人) <span class="text-muted">/api/user/info</span></a>
</h4>
</div>
<div id="collapseOne29" class="panel-collapse collapse">
<div id="collapseOne30" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab29">
<li class="active"><a href="#info29" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox29" data-toggle="tab">在线测试</a></li>
<li><a href="#sample29" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab30">
<li class="active"><a href="#info30" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox30" data-toggle="tab">在线测试</a></li>
<li><a href="#sample30" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info29">
<div class="tab-pane active" id="info30">
<div class="well">
获取个人信息(新人/旧人) </div>
<div class="panel panel-default">
... ... @@ -4725,7 +4868,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox29">
<div class="tab-pane" id="sandbox30">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -4742,13 +4885,13 @@
<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/info" method="GET" name="form29" id="form29">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/info" method="GET" name="form30" id="form30">
<div class="form-group">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="29">提交</button>
<button type="reset" class="btn btn-info" rel="29">重置</button>
<button type="submit" class="btn btn-success send" rel="30">提交</button>
<button type="reset" class="btn btn-info" rel="30">重置</button>
</div>
</form>
</div>
... ... @@ -4758,8 +4901,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers29"></pre>
<pre id="response29"></pre>
<pre id="response_headers30"></pre>
<pre id="response30"></pre>
</div>
</div>
</div>
... ... @@ -4774,10 +4917,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample29">
<div class="tab-pane" id="sample30">
<div class="row">
<div class="col-md-12">
<pre id="sample_response29">{
<pre id="sample_response30">{
"code": 1,
"msg": "成功",
"time": "1575188985",
... ... @@ -4804,26 +4947,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-30">
<div class="panel-heading" id="heading-31">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion30" href="#collapseOne30"> 获取二维码 <span class="text-muted">/api/user/getWxCode</span></a>
<a data-toggle="collapse" data-parent="#accordion31" href="#collapseOne31"> 获取二维码 <span class="text-muted">/api/user/getWxCode</span></a>
</h4>
</div>
<div id="collapseOne30" class="panel-collapse collapse">
<div id="collapseOne31" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab30">
<li class="active"><a href="#info30" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox30" data-toggle="tab">在线测试</a></li>
<li><a href="#sample30" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab31">
<li class="active"><a href="#info31" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox31" data-toggle="tab">在线测试</a></li>
<li><a href="#sample31" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info30">
<div class="tab-pane active" id="info31">
<div class="well">
获取二维码 </div>
<div class="panel panel-default">
... ... @@ -4879,7 +5022,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox30">
<div class="tab-pane" id="sandbox31">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -4896,14 +5039,14 @@
<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/getWxCode" method="GET" name="form30" id="form30">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/getWxCode" method="GET" name="form31" id="form31">
<div class="form-group">
<label class="control-label" for="goods_id">goods_id</label>
<input type="inter" class="form-control input-sm" id="goods_id" required placeholder="商品id" name="goods_id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="30">提交</button>
<button type="reset" class="btn btn-info" rel="30">重置</button>
<button type="submit" class="btn btn-success send" rel="31">提交</button>
<button type="reset" class="btn btn-info" rel="31">重置</button>
</div>
</form>
</div>
... ... @@ -4913,8 +5056,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers30"></pre>
<pre id="response30"></pre>
<pre id="response_headers31"></pre>
<pre id="response31"></pre>
</div>
</div>
</div>
... ... @@ -4929,10 +5072,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample30">
<div class="tab-pane" id="sample31">
<div class="row">
<div class="col-md-12">
<pre id="sample_response30">{
<pre id="sample_response31">{
"code": 1,
"msg": "成功",
"time": "1572602867",
... ... @@ -4949,26 +5092,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-31">
<div class="panel-heading" id="heading-32">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion31" href="#collapseOne31"> 收藏 <span class="text-muted">/api/user/collection</span></a>
<a data-toggle="collapse" data-parent="#accordion32" href="#collapseOne32"> 收藏 <span class="text-muted">/api/user/collection</span></a>
</h4>
</div>
<div id="collapseOne31" class="panel-collapse collapse">
<div id="collapseOne32" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab31">
<li class="active"><a href="#info31" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox31" data-toggle="tab">在线测试</a></li>
<li><a href="#sample31" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab32">
<li class="active"><a href="#info32" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox32" data-toggle="tab">在线测试</a></li>
<li><a href="#sample32" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info31">
<div class="tab-pane active" id="info32">
<div class="well">
收藏 </div>
<div class="panel panel-default">
... ... @@ -5024,7 +5167,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox31">
<div class="tab-pane" id="sandbox32">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -5041,14 +5184,14 @@
<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/collection" method="POST" name="form31" id="form31">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/collection" method="POST" name="form32" id="form32">
<div class="form-group">
<label class="control-label" for="goods_id">goods_id</label>
<input type="inter" class="form-control input-sm" id="goods_id" required placeholder="商品id" name="goods_id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="31">提交</button>
<button type="reset" class="btn btn-info" rel="31">重置</button>
<button type="submit" class="btn btn-success send" rel="32">提交</button>
<button type="reset" class="btn btn-info" rel="32">重置</button>
</div>
</form>
</div>
... ... @@ -5058,8 +5201,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers31"></pre>
<pre id="response31"></pre>
<pre id="response_headers32"></pre>
<pre id="response32"></pre>
</div>
</div>
</div>
... ... @@ -5074,10 +5217,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample31">
<div class="tab-pane" id="sample32">
<div class="row">
<div class="col-md-12">
<pre id="sample_response31">{
<pre id="sample_response32">{
"code": 1,
"msg": "成功",
"time": "1571037179",
... ... @@ -5092,26 +5235,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-32">
<div class="panel-heading" id="heading-33">
<h4 class="panel-title">
<span class="label label-primary">POST</span>
<a data-toggle="collapse" data-parent="#accordion32" href="#collapseOne32"> 取消收藏 <span class="text-muted">/api/user/cancelCollection</span></a>
<a data-toggle="collapse" data-parent="#accordion33" href="#collapseOne33"> 取消收藏 <span class="text-muted">/api/user/cancelCollection</span></a>
</h4>
</div>
<div id="collapseOne32" class="panel-collapse collapse">
<div id="collapseOne33" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab32">
<li class="active"><a href="#info32" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox32" data-toggle="tab">在线测试</a></li>
<li><a href="#sample32" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab33">
<li class="active"><a href="#info33" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox33" data-toggle="tab">在线测试</a></li>
<li><a href="#sample33" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info32">
<div class="tab-pane active" id="info33">
<div class="well">
取消收藏 </div>
<div class="panel panel-default">
... ... @@ -5167,7 +5310,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox32">
<div class="tab-pane" id="sandbox33">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -5184,14 +5327,14 @@
<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/cancelCollection" method="POST" name="form32" id="form32">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/cancelCollection" method="POST" name="form33" id="form33">
<div class="form-group">
<label class="control-label" for="goods_id">goods_id</label>
<input type="inter" class="form-control input-sm" id="goods_id" required placeholder="商品id" name="goods_id">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="32">提交</button>
<button type="reset" class="btn btn-info" rel="32">重置</button>
<button type="submit" class="btn btn-success send" rel="33">提交</button>
<button type="reset" class="btn btn-info" rel="33">重置</button>
</div>
</form>
</div>
... ... @@ -5201,8 +5344,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers32"></pre>
<pre id="response32"></pre>
<pre id="response_headers33"></pre>
<pre id="response33"></pre>
</div>
</div>
</div>
... ... @@ -5217,10 +5360,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample32">
<div class="tab-pane" id="sample33">
<div class="row">
<div class="col-md-12">
<pre id="sample_response32">{
<pre id="sample_response33">{
"code": 1,
"msg": "成功",
"time": "1571037179",
... ... @@ -5235,26 +5378,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-33">
<div class="panel-heading" id="heading-34">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion33" href="#collapseOne33"> 我的收藏 <span class="text-muted">/api/user/myCollectionList</span></a>
<a data-toggle="collapse" data-parent="#accordion34" href="#collapseOne34"> 我的收藏 <span class="text-muted">/api/user/myCollectionList</span></a>
</h4>
</div>
<div id="collapseOne33" class="panel-collapse collapse">
<div id="collapseOne34" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab33">
<li class="active"><a href="#info33" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox33" data-toggle="tab">在线测试</a></li>
<li><a href="#sample33" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab34">
<li class="active"><a href="#info34" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox34" data-toggle="tab">在线测试</a></li>
<li><a href="#sample34" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info33">
<div class="tab-pane active" id="info34">
<div class="well">
我的收藏 </div>
<div class="panel panel-default">
... ... @@ -5310,7 +5453,7 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox33">
<div class="tab-pane" id="sandbox34">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
... ... @@ -5327,14 +5470,14 @@
<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/myCollectionList" method="GET" name="form33" id="form33">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/myCollectionList" method="GET" name="form34" id="form34">
<div class="form-group">
<label class="control-label" for="page">page</label>
<input type="inter" class="form-control input-sm" id="page" required placeholder="分页页码" name="page">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="33">提交</button>
<button type="reset" class="btn btn-info" rel="33">重置</button>
<button type="submit" class="btn btn-success send" rel="34">提交</button>
<button type="reset" class="btn btn-info" rel="34">重置</button>
</div>
</form>
</div>
... ... @@ -5344,8 +5487,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers33"></pre>
<pre id="response33"></pre>
<pre id="response_headers34"></pre>
<pre id="response34"></pre>
</div>
</div>
</div>
... ... @@ -5360,10 +5503,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample33">
<div class="tab-pane" id="sample34">
<div class="row">
<div class="col-md-12">
<pre id="sample_response33">{
<pre id="sample_response34">{
"code": 1,
"msg": "成功",
"time": "1574941706",
... ... @@ -5411,26 +5554,26 @@
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" id="heading-34">
<div class="panel-heading" id="heading-35">
<h4 class="panel-title">
<span class="label label-success">GET</span>
<a data-toggle="collapse" data-parent="#accordion34" href="#collapseOne34"> 我的优惠券 <span class="text-muted">/api/user/myCouponList</span></a>
<a data-toggle="collapse" data-parent="#accordion35" href="#collapseOne35"> 我的优惠券 <span class="text-muted">/api/user/myCouponList</span></a>
</h4>
</div>
<div id="collapseOne34" class="panel-collapse collapse">
<div id="collapseOne35" class="panel-collapse collapse">
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs" id="doctab34">
<li class="active"><a href="#info34" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox34" data-toggle="tab">在线测试</a></li>
<li><a href="#sample34" data-toggle="tab">返回示例</a></li>
<ul class="nav nav-tabs" id="doctab35">
<li class="active"><a href="#info35" data-toggle="tab">基础信息</a></li>
<li><a href="#sandbox35" data-toggle="tab">在线测试</a></li>
<li><a href="#sample35" data-toggle="tab">返回示例</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="info34">
<div class="tab-pane active" id="info35">
<div class="well">
我的优惠券 </div>
<div class="panel panel-default">
... ... @@ -5469,20 +5612,20 @@
</div>
</div><!-- #info -->
<div class="tab-pane" id="sandbox34">
<div class="tab-pane" id="sandbox35">
<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/myCouponList" method="GET" name="form34" id="form34">
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/myCouponList" method="GET" name="form35" id="form35">
<div class="form-group">
<label class="control-label" for="is_flag">is_flag</label>
<input type="inter" class="form-control input-sm" id="is_flag" required placeholder="优惠券标识(0:未使用,1:已使用,2:已过期)" name="is_flag">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success send" rel="34">提交</button>
<button type="reset" class="btn btn-info" rel="34">重置</button>
<button type="submit" class="btn btn-success send" rel="35">提交</button>
<button type="reset" class="btn btn-info" rel="35">重置</button>
</div>
</form>
</div>
... ... @@ -5492,8 +5635,8 @@
<div class="panel-body">
<div class="row">
<div class="col-md-12" style="overflow-x:auto">
<pre id="response_headers34"></pre>
<pre id="response34"></pre>
<pre id="response_headers35"></pre>
<pre id="response35"></pre>
</div>
</div>
</div>
... ... @@ -5508,10 +5651,10 @@
</div>
</div><!-- #sandbox -->
<div class="tab-pane" id="sample34">
<div class="tab-pane" id="sample35">
<div class="row">
<div class="col-md-12">
<pre id="sample_response34">{
<pre id="sample_response35">{
"code": 1,
"msg": "成功",
"time": "1575372162",
... ... @@ -5550,7 +5693,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2019-12-04 18:37:56 </div>
Generated on 2019-12-04 18:51:12 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...