ZueCoin.php 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace app\admin\controller;
  3. use app\BaseController;
  4. use app\common\model\CustomerZueCoinModel;
  5. use think\App;
  6. use think\facade\View;
  7. class ZueCoin extends BaseController
  8. {
  9. private $model;
  10. public function __construct(App $app)
  11. {
  12. $this->model = new CustomerZueCoinModel();
  13. parent::__construct($app);
  14. }
  15. public function index() {
  16. $params = $this->request->param();
  17. $format_params = [
  18. 'customer' => format_string($params['customer'] ?? null),
  19. ];
  20. $list = $this->model->findByPaginate($format_params);
  21. View::assign([
  22. 'list' => $list,
  23. 'params' => $format_params,
  24. ]);
  25. return view();
  26. }
  27. public function select($id = null) {
  28. View::assign('value',$this->model->findById($id ?? -1));
  29. return view();
  30. }
  31. }