load->driver('cache'); // 加载缓存驱动 $this->load->_model("Model_logic_order","logic_order"); $this->load->_model("Model_returns","returns"); $this->load->_model("Model_aliyunossnew","aliyunossnew"); } public function searchwaybill(){ if($this->input->method(TRUE) != 'POST'){ $this->_json_error('请求方式错误','500'); } $json_str = $this->input->raw_input_stream; $data = json_decode($json_str,true); $waybill = $data['waybill']; if(empty($waybill)){ $this->_json_error('快递单号不能为空','500'); } $waybill = $this->logic_order->getNeedWaybill($waybill); $info = $this->returns->find("torderinfo = '$waybill'"); if(empty($info)){ $this->_json_error('未查询到此快递单号'.$waybill,'500'); } $res = $this->aliyunossnew->getOssSignType("shdjfile"); if($res['code'] == -1){ $this->_json_error($res["msg"],'500'); }else{ $this->_json_error('成功',200,[ 'torderinfo'=>$info['torderinfo'], 'number'=>$info['number'], 'oss_config'=>$res['data'] ]); } $this->_json_error($info,'200'); } }