1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 03:17:05 +08:00
koogua 0336a54911 1.源文件增加版权信息
2.群组状态和课程协同
2021-06-13 15:49:47 +08:00

69 lines
1.4 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Http\Api\Controllers;
use App\Http\Api\Services\Trade as TradeService;
use App\Services\Logic\Trade\TradeInfo as TradeInfoService;
/**
* @RoutePrefix("/api/trade")
*/
class TradeController extends Controller
{
/**
* @Get("/info", name="api.trade.info")
*/
public function infoAction()
{
$sn = $this->request->getQuery('sn', 'string');
$service = new TradeInfoService();
$trade = $service->handle($sn);
return $this->jsonSuccess(['trade' => $trade]);
}
/**
* @Post("/h5/create", name="api.trade.h5_create")
*/
public function createH5TradeAction()
{
$service = new TradeService();
$content = $service->createH5Trade();
return $this->jsonSuccess($content);
}
/**
* @Post("/mp/create", name="api.trade.mp_create")
*/
public function createMpTradeAction()
{
$service = new TradeService();
$content = $service->createMpTrade();
return $this->jsonSuccess($content);
}
/**
* @Post("/app/create", name="api.trade.app_create")
*/
public function createAppTradeAction()
{
$service = new TradeService();
$content = $service->createMpTrade();
return $this->jsonSuccess($content);
}
}