course/app/api/controller/BackgroundController.php
2024-07-24 22:13:26 +08:00

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'
]);
}
}