no message
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\api\logic\VipOrderLogic;
|
||||
use app\api\validate\VipOrderValidate;
|
||||
|
||||
class VipOrderController extends BaseApiController
|
||||
{
|
||||
public function levels()
|
||||
{
|
||||
return $this->data(VipOrderLogic::levels());
|
||||
}
|
||||
|
||||
public function createOrder()
|
||||
{
|
||||
$params = (new VipOrderValidate())->post()->goCheck('createOrder', [
|
||||
'user_id' => $this->userId,
|
||||
'terminal' => $this->userInfo['terminal'],
|
||||
]);
|
||||
$result = VipOrderLogic::createOrder($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(VipOrderLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = (new VipOrderValidate())->goCheck('detail', [
|
||||
'user_id' => $this->userId,
|
||||
]);
|
||||
$result = VipOrderLogic::detail($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(VipOrderLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user