| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace app\api\controller;
- use app\api\lists\recharge\ServiceOrderLists;
- use app\api\logic\ServiceOrderLogic;
- use app\api\validate\ServiceOrderValidate;
- /**
- * 订单类
- */
- class ServiceOrderController extends BaseApiController
- {
- public function lists()
- {
- return $this->dataLists(new ServiceOrderLists());
- }
- public function submitOrder()
- {
- $params = (new ServiceOrderValidate())->post()->goCheck('add', [
- 'user_id' => $this->userId,
- 'terminal' => $this->userInfo['terminal'],
- 'user_info' => $this->userInfo
- ]);
- $result = ServiceOrderLogic::submitOrder($params);
- if (false === $result) {
- return $this->fail(ServiceOrderLogic::getError());
- }
- return $this->data($result);
- }
- }
|