quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
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
29
30
31
32
33
34
35
<?php
 
namespace app\operations\controller;
 
use app\operations\service\ShopService;
use app\common\model\settings\Setting as SettingModel;
/**
 * 后台首页控制器
 */
class Index extends Controller
{
    /**
     * 后台首页
     */
    public function index()
    {
        $service = new ShopService;
        return $this->renderSuccess('', ['data' => $service->getHomeData()]);
    }
 
    /**
     * 登录数据
     */
    public function base()
    {
         //echo 1;die;
        
        $config = SettingModel::getSysConfig();
        $settings = [
            'shop_name' => $config['shop_name'],
            'shop_bg_img' => $config['shop_bg_img']
        ];
        return $this->renderSuccess('', compact('settings'));
    }
}