PrinterTemplate.php 785 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\printer\event;
  11. use addon\printer\model\PrinterTemplate as PrinterTemplateModel;
  12. use app\Controller;
  13. /**
  14. * 模板
  15. */
  16. class PrinterTemplate extends Controller
  17. {
  18. public function handle($params)
  19. {
  20. $model = new PrinterTemplateModel();
  21. $action_type = $params['action'] ?? 'add';
  22. return $this->fetch($model->getTemplateType()[$params['type']][$action_type]);
  23. }
  24. }