Activity.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace app\admin\controller;
  3. use think\activity\service\ActivityService;
  4. use think\admin\Controller;
  5. use think\admin\helper\QueryHelper;
  6. use think\admin\service\SystemService;
  7. use think\db\Query;
  8. use think\facade\Db;
  9. /**
  10. * 活动管理
  11. * Class Menu
  12. * @package app\admin\controller
  13. */
  14. class Activity extends Controller
  15. {
  16. /**
  17. * 当前操作数据库
  18. * @var string
  19. */
  20. private $table = 'Activity';
  21. /**
  22. * 奖品订单管理
  23. * @auth true
  24. * @menu true
  25. * @throws \think\db\exception\DataNotFoundException
  26. * @throws \think\db\exception\DbException
  27. * @throws \think\db\exception\ModelNotFoundException
  28. */
  29. public function index()
  30. {
  31. $this->_query($this->table)->layTable(function () {
  32. $this->title = '活动管理';
  33. $this->activity = [
  34. "beginAt" => '2022-07-25',
  35. "endAt" => '2022-07-31'
  36. ];
  37. $this->gifts = [
  38. 'rankGift' => [
  39. [
  40. 'title' => '第一名',
  41. 'name' => '投影仪',
  42. ],[
  43. 'title' => '第二名~第二十名',
  44. 'name' => '活动专属周边礼包',
  45. ],[
  46. 'title' => '第二一名~第五十名',
  47. 'name' => '电影票代金券',
  48. ]
  49. ],
  50. 'luckDraw' => [
  51. '活动专属周边礼包',
  52. '电影票代金券'
  53. ]
  54. ];
  55. }, function (QueryHelper $queryHelper) {
  56. });
  57. }
  58. }