alias($alert); $alert = $alert ? $alert . '.' : ''; $model = $model->where("{$alert}is_del", 0); if (isset($where['is_show']) && $where['is_show'] !== '') $model = $model->where("{$alert}is_show", $where['is_show']); if (isset($where['title']) && $where['title']) $model = $model->where("{$alert}name", 'LIKE', "%$where[title]%"); return $model; } /** * 查找系统设置的会员等级列表 * @param $where * @return array */ public static function getSytemList($where) { $data = self::setWhere($where)->order('grade asc')->page((int)$where['page'], (int)$where['limit'])->select(); $data = count($data) ? $data->toArray() : []; $count = self::setWhere($where)->count(); return compact('data', 'count'); } }