diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index cddd75e..ac82077 100644 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -79,15 +79,18 @@ class Goods extends Base public function searchGoods(){ try { // todo 被请求委托查询 接口 + $start_time = microtime(true); //响应式开始计时 $this->checkVaild($this->valid, 'searchGoods', 'post'); $post = $this->request->post(['entrust_time', 'record_type', 'entrust_user_name', 'authorization', 'pay_type', 'entrust_name', 'entrust_islicode', 'goods_islicode', 'source_type', 'order_type', 'order', 'goods_status', 'page', 'limit']); $goodsService = new GoodsService(); $this->apilog->info("查询委托信息接口", $post); $result = $goodsService->searchGoods($post); - return _success('成功', $result); + $end_time = microtime(true); //响应式结束计时 + $userTime = $end_time-$start_time.'s'; + echo json_encode(['code'=>'success', 'msg'=>'成功', 'userTime'=>$userTime, 'data'=>$result]); exit(); }catch(\Exception $e){ - return _error($e->getMessage(), $e->getCode() ?: 400, $e); + echo json_encode(['code'=>'failure', 'msg'=>'请求失败']); exit(); } } /**