25 lines
496 B
PHP
25 lines
496 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace app\api\controller;
|
||
|
|
||
|
use app\BaseController;
|
||
|
use app\common\model\Background;
|
||
|
use app\constant\ResponseCode;
|
||
|
|
||
|
class BackgroundController extends BaseController
|
||
|
{
|
||
|
|
||
|
protected $noNeedLogin = ['*'];
|
||
|
|
||
|
public function getBackground()
|
||
|
{
|
||
|
$background = Background::where(['id' => 1])->field('url')->find();
|
||
|
|
||
|
return $this->json([
|
||
|
'code' => ResponseCode::SUCCESS,
|
||
|
'data' => $background,
|
||
|
'msg' => 'success'
|
||
|
]);
|
||
|
}
|
||
|
|
||
|
}
|