quanwei
2025-11-26 6ae85f8ddbae19f5586f4b0c37680fe21889ef14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
 
namespace app\api\controller\plus\business;
use app\api\model\plus\business\Setting as SettingModel;
use app\api\controller\Controller;
class Setting extends Controller
{
    /**
     * 获取设置
     */
    public function getAll()
    {
        $model = new SettingModel();
        $data = $model->getAll();
        return $this->renderSuccess('获取成功', $data);
    }
    /**
     * 获取背景设置
     */
    public function getBackground(){
        $model = new SettingModel();
        $data = $model->getItem('background');
        if(!is_array($data)){
            $data = json_decode($data, true);
        }
        return $this->renderSuccess('获取成功', $data);
    }
}