Index.php 787 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\supplier\controller;
  3. use app\common\model\settings\Setting as SettingModel;
  4. use app\supplier\service\ShopService;
  5. /**
  6. * 后台首页控制器
  7. */
  8. class Index extends Controller
  9. {
  10. /**
  11. * 后台首页
  12. */
  13. public function index()
  14. {
  15. $service = new ShopService($this->getSupplierId());
  16. return $this->renderSuccess('', ['data' => $service->getHomeData()]);
  17. }
  18. /**
  19. * 登录数据
  20. */
  21. public function base()
  22. {
  23. $config = SettingModel::getSysConfig();
  24. $settings = [
  25. 'supplier_name' => $config['supplier_name'],
  26. 'supplier_bg_img' => $config['supplier_bg_img']
  27. ];
  28. return $this->renderSuccess('', compact('settings'));
  29. }
  30. }