Link.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\shop\controller\link;
  3. use app\shop\controller\Controller;
  4. use app\shop\model\plus\assemble\Active;
  5. use app\shop\model\plus\seckill\Active as ActiveModel;
  6. use app\shop\model\page\Page as PageModel;
  7. use app\shop\model\plus\table\Table as TableModel;
  8. /**
  9. * Class Link
  10. * @package app\shop\controller\link
  11. * 超链接控制器
  12. */
  13. class Link extends Controller
  14. {
  15. /**
  16. *获取数据
  17. */
  18. public function index($activeName)
  19. {
  20. // 万能表单
  21. $list = (new TableModel())->getAll();
  22. $tableList = [];
  23. foreach ($list as $item) {
  24. $tableList[] = [
  25. 'id' => $item['table_id'],
  26. 'url' => 'pages/plus/table/table?table_id=' . $item['table_id'],
  27. 'name' => $item['name'],
  28. 'type' => '表单'
  29. ];
  30. }
  31. return $this->renderSuccess('', compact('tableList'));
  32. }
  33. /**
  34. * 获取自定义页面
  35. */
  36. public function getPageList()
  37. {
  38. $model = new PageModel;
  39. $list = $model->getLists();
  40. return $this->renderSuccess('', compact('list'));
  41. }
  42. }