链街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.

39 lines
701 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
  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. public function __construct($orderId,$title=null)
  9. {
  10. $this->order_id = $orderId;
  11. parent::__construct($title);
  12. }
  13. /**
  14. * 添加JS
  15. * @return string
  16. */
  17. protected function script()
  18. {
  19. return <<<JS
  20. $('.detail_{$this->order_id}').on('click', function () {
  21. window.location.href ="detail?order_id={$this->order_id}";
  22. });
  23. JS;
  24. }
  25. public function html()
  26. {
  27. $this->setHtmlAttribute(['class'=>"detail_{$this->order_id}"]);
  28. return parent::html();
  29. }
  30. }