load->library('session'); $this->load->_model("Model_scanimgs","scanimgs"); $this->load->_model("Model_shop","shop"); } private $show_url = "https://lyerposs.wepolicy.cn"; //定义方法的调用规则 获取URI第二段值 public function _remap($arg,$arg_array) { if($arg == 'detail')//添加 { $this->_detail($arg_array); } else { $this->_index($arg_array); } } private function _index(){ if(isset($_SESSION['api'])) { $user = $this->user->get_api($_SESSION['api']); $usp = $user; $fgshop = "";$sid = ""; $usersp = explode('|',trim($user['shop'],'|')); foreach ($usersp as $value) { $fgshop .= " shop = ".$value." or"; $sid .= " id = ".$value." or"; } $fgshop .= " shop = '0' or"; if($user['vip'] == 1) { $vip = 1; } else { $vip = 0; } } else { $vip = 0; } $post = $this->input->post(NULL, TRUE); if(isset($post['page'])) { $page = $this->input->post('page',true); $perpage = $this->input->post('perpage',true); $number = $this->input->post('number',true); $shop = $this->input->post('shop',true); $timetk = $this->input->post('timetk',true); $timetj = $this->input->post('timetj',true); $timetk = strtotime($timetk); $timetj = strtotime($timetj); $where = "(".rtrim($fgshop,'or').")"; if($number) { $where .= " and number = '$number'"; } if($shop != '') { $where .= " and shop = '$shop'"; } if($timetk && $timetj) { $where .= " and updatetime > '$timetk' and updatetime < '$timetj'"; } //数据排序 $order_str = " id desc "; if(empty($page)) { $start = 0; $perpage = 1; } else { $start = ($page - 1)*$perpage; } $info_list = $this->scanimgs->find_all($where,'*',$order_str,$start,$perpage); $shop_list = $this->shop->find_all(); $shop_list =array_column($shop_list,'shopname','id'); $final_list = []; foreach ($info_list as $key=>$value) { $img_str = "