userinfo['OperaterID']; $page = 0; if (isset($_GET['PageIndex'])) { $page = ($_GET['PageIndex'] - 1) * 50; } $where = []; $where_str = ''; $where['agent_id'] = $agent_id; if (!empty($_GET['Btime'])){ $date1 = date('Y-m-d', strtotime($_GET['Btime'])); $date2 = date('Y-m-d', strtotime($_GET['Etime'])); $where_str .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' "; } $score_model = new AgentScoreModel; $list = $score_model->getAgentListPage($where,$where_str, '*', 'id desc', "$page,50"); $data = [ 'Code' => 10000, 'Data' => $list, 'Message' => '', 'TotalCount' => (int)$score_model->getCount($where)['count'], ]; echo json_encode($data); } //账号列表 public function getScoreList () { $get_data = $_GET; $page = 0; if (isset($_GET['PageIndex'])) { $page = ($_GET['PageIndex'] - 1) * 50; } $where = []; $where_str = ''; if(!empty($get_data['keyWord'])){ $agent_user_model = new AgentUser; $id = $agent_user_model->getOne(['username'=>$get_data['keyWord']])['id']; $where['agent_id'] = $id; } if (!empty($_GET['Btime'])){ $date1 = date('Y-m-d', strtotime($_GET['Btime'])); $date2 = date('Y-m-d', strtotime($_GET['Etime'])); $where_str .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' "; } $score_model = new AgentScoreModel; $list = $score_model->getAgentListPage($where,$where_str, '*', 'id desc', "$page,50"); $data = [ 'Code' => 10000, 'Data' => $list, 'Message' => '', 'TotalCount' => (int)$score_model->getCount($where)['count'], ]; echo json_encode($data); } }