链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
810 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Extensions;
  3. use Dcat\Admin\Grid\RowAction;
  4. class OrderDetail extends RowAction
  5. {
  6. protected $title;
  7. protected $order_id;
  8. protected $currentPage;
  9. public function __construct($orderId,$currentPage,$title=null)
  10. {
  11. $this->order_id = $orderId;
  12. $this->currentPage = $currentPage;
  13. parent::__construct($title);
  14. }
  15. /**
  16. * 添加JS
  17. * @return string
  18. */
  19. protected function script()
  20. {
  21. return <<<JS
  22. $('.detail_{$this->order_id}').on('click', function () {
  23. window.location.href ="detail?order_id={$this->order_id}&page={$this->currentPage}";
  24. });
  25. JS;
  26. }
  27. public function html()
  28. {
  29. $this->setHtmlAttribute(['class'=>"detail_{$this->order_id}"]);
  30. return parent::html();
  31. }
  32. }