quanwei
2025-12-04 12913c1069347ea4b1f6ab87f480da0f8d8c646a
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
36
37
38
39
40
41
42
43
44
<?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);
    }
}