GameLogic.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * GameLogic.php UTF-8
  4. * 游戏逻辑
  5. *
  6. * @date : 2020/9/14 15:52
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : chenbingling <cbl@huosdk.com>
  10. * @version : H5IOS 1.0
  11. */
  12. namespace huosdk\h5ios\core\logic;
  13. use huosdk\h5ios\core\model\GameModel;
  14. class GameLogic extends CommonLogic {
  15. protected $model = '';
  16. protected $base_field = [];
  17. public function __construct($data = []) {
  18. parent::__construct($data);
  19. $this->model = new GameModel();
  20. }
  21. /**
  22. * 获取后台列表
  23. *
  24. * @param array $where 搜索条件
  25. * @param string $page 列表个数
  26. * @param string $order 排序
  27. * @param array $field 附加字段
  28. * @param string $group 分类
  29. * @param string $with 附加
  30. *
  31. * @return array ['count'=>0,'list'=>[]]
  32. */
  33. public function getAdminList($where = [], $page = '1,10', $order = '-id', $field = [], $group = '', $with = '') {
  34. $_datas = parent::getAdminList($where, $page, $order, $field, $group, 'pg');
  35. $_list = $_datas['list'];
  36. foreach ($_list as $_k => $_v) {
  37. $_list[$_k]['pg_game_name'] = get_val($_v['pg'], 'name', '');
  38. $_list[$_k]['pg_game_icon'] = get_val($_v['pg'], 'icon', '');
  39. unset($_list[$_k]['pg']);
  40. }
  41. $_datas['list'] = $_list;
  42. return $_datas;
  43. }
  44. }