12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\api\controller;
- use app\api\controller\mall\Orders;
- use app\common\controller\Api;
- /**
- * 发票接口
- */
- class UserTax extends Api
- {
- protected $noNeedRight='*';
- /**
- * 发票列表
- * @ApiParams (name=page,dexcription=分页)
- * @ApiParams (name=limit,dexcription=分页)
- */
- public function list(){
- $user=$this->auth->getUser();
- $tax=$user->tax()
- ->with(['orders'])
- ->order('id','desc')
- ->paginate(input('limit',15));
- $newList=[];
- foreach ($tax->items() as $item){
- $order=[
- 'order_no'=>$item['orders']['order_no']??'',
- 'create_time'=>$item['orders']['create_time']??'',
- ];
- }
- $this->success('',$tax);
- }
- }
|