<?php
|
|
namespace app\agent\controller;
|
|
use app\agent\service\ShopService;
|
use app\common\model\settings\Setting as SettingModel;
|
/**
|
* 后台首页控制器
|
*/
|
class Index extends Controller
|
{
|
/**
|
* 后台首页
|
*/
|
public function index()
|
{
|
$service = new ShopService;
|
$username = $this->postData();
|
return $this->renderSuccess('', ['data' => $service->getHomeData($username)]);
|
}
|
|
/**
|
* 登录数据
|
*/
|
public function base()
|
{
|
$config = SettingModel::getSysConfig();
|
$settings = [
|
'shop_name' => $config['shop_name'],
|
'shop_bg_img' => $config['shop_bg_img']
|
];
|
return $this->renderSuccess('', compact('settings'));
|
}
|
/**
|
* 获取用户信息
|
*/
|
public function getUserInfo()
|
{
|
$session = session('jjjshop_dlagent');
|
//print_r($session);die;
|
|
return $this->renderSuccess('',$session);
|
}
|
}
|