31 lines
827 B
PHP
31 lines
827 B
PHP
<?php
|
|
|
|
namespace app\czg\app\controller;
|
|
|
|
|
|
use app\czg\app\model\CommonInfo;
|
|
use app\czg\app\model\Orders;
|
|
use app\common\controller\Frontend;
|
|
|
|
class BannerController extends Frontend
|
|
{
|
|
protected array $noNeedLogin = ['selectBannerList', 'test'];
|
|
|
|
// 查询所有banner图
|
|
public function selectBannerList()
|
|
{
|
|
$get = $this->request->get();
|
|
if(empty($get['classify'])) {
|
|
$this->error('参数不完整');
|
|
}
|
|
$banner = \app\api\model\Banner::where(['classify' => $get['classify'], 'state' => 1])->order('sort', 'desc')->select()->toArray();
|
|
$this->success('ok', convertToCamelCase($banner));
|
|
}
|
|
|
|
public function test()
|
|
{
|
|
$qdAward = (new CommonInfo())->getByCode(915)['value'];
|
|
$this->successWithData(bccomp($qdAward, "0") > 0);
|
|
}
|
|
|
|
} |