Richtext.php 535 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace addons\shopro\controller\data;
  3. use addons\shopro\controller\Common;
  4. use app\admin\model\shopro\data\Richtext as RichtextModel;
  5. class Richtext extends Common
  6. {
  7. protected $noNeedLogin = ['index'];
  8. protected $noNeedRight = ['*'];
  9. public function index()
  10. {
  11. $id = $this->request->param('id');
  12. $data = RichtextModel::where('id', $id)->find();
  13. if (!$data) {
  14. $this->error(__('No Results were found'));
  15. }
  16. $this->success('获取成功', $data);
  17. }
  18. }