This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/api/controller/sharp/Index.php

32 lines
809 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\api\controller\sharp;
use app\api\controller\Controller;
use app\api\service\sharp\Active as ActiveService;
/**
* 整点秒杀-秒杀首页
* Class index
* @package app\api\controller\sharp
*/
class Index extends Controller
{
/**
* 秒杀活动首页
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function index()
{
// 获取秒杀活动会场首页数据
$service = new ActiveService;
$data = $service->getHallIndex();
if (empty($data['tabbar'])) {
return $this->renderError('很抱歉,暂无秒杀活动');
}
return $this->renderSuccess($data);
}
}