123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace App\Http\Controllers\Client;
- use App\Http\Controllers\Controller;
- use App\Services\Client\OrderService;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Auth;
- /**
- * @group 技师端
- *
- * 订单相关的API接口
- */
- class OrderController extends Controller
- {
- // protected OrderService $service;
- // public function __construct(OrderService $service)
- // {
- // $this->service = $service;
- // }
- /**
- * [订单]获取可抢订单列表
- *
- * 获取可抢订单列表
- *
- * @authenticated
- *
- * @queryParam area_code string required 区划代码. Example: 370602
- * @queryParam page int 页码. Example: 1
- * @queryParam per_page int 每页数量. Example: 10
- *
- * @response {
- * "data": [
- * {
- * "id": 1,
- * "order_no": "202403210001",
- * "project_name": "项目名称",
- * "project_duration": 60,
- * "project_price": "188.00",
- * "address": "山东省烟台市芝罘区",
- * "distance": 2.5,
- * "service_time": "2024-03-21 10:00:00",
- * "created_at": "2024-03-21 09:30:00"
- * }
- * ],
- * "meta": {
- * "total": 100,
- * "per_page": 10,
- * "current_page": 1,
- * "last_page": 10
- * }
- * }
- */
- public function getGrabList(Request $request)
- {
- $params = $request->only(['area_code', 'page', 'per_page']);
- return $this->service->getGrabList(Auth::user()->id, $params);
- }
- }
|