Server.php 929 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\admin\controller;
  3. use think\Validate;
  4. use think\Lang;
  5. class Server extends AdminControl
  6. {
  7. public function _initialize()
  8. {
  9. parent::_initialize();
  10. Lang::load(APP_PATH . 'admin/lang/' . config('default_lang') . '/member.lang.php');
  11. }
  12. /**
  13. * 充值列表
  14. * @return mixed
  15. */
  16. public function index()
  17. {
  18. $productModel = Model('Product');
  19. $fartherProduct = $productModel->getFartherList();
  20. $this->assign('fartherProduct', $fartherProduct);
  21. $fartherId = input('get.fartherId') ?? $fartherProduct[0]->product_id;
  22. $this->assign('id', $fartherId);
  23. $sonProductWhere['product_pid'] = $fartherId;
  24. $sonProduct = $productModel->getSonList($sonProductWhere);
  25. $this->assign('sonProduct', $sonProduct);
  26. $this->assign('show_page', $sonProduct->render());
  27. return $this->fetch();
  28. }
  29. }