<?php
|
|
namespace app\branch\controller;
|
|
use app\common\model\settings\Setting as SettingModel;
|
use app\branch\service\ShopService;
|
|
/**
|
* 后台首页控制器
|
*/
|
class Index extends Controller
|
{
|
/**
|
* 后台首页
|
*/
|
public function index()
|
{
|
$service = new ShopService($this->getBranchId());
|
return $this->renderSuccess('', ['data' => $service->getHomeData()]);
|
}
|
|
/**
|
* 登录数据
|
*/
|
public function base()
|
{
|
|
$config = SettingModel::getSysConfig();
|
$settings = [
|
'branch_name' => $config['branch_name'],
|
'branch_bg_img' => $config['branch_bg_img']
|
];
|
return $this->renderSuccess('', compact('settings'));
|
}
|
}
|