array($code, '=s'), 'date' => array($date, '=n'), ); $rs = Index_day_k::getList($filter, 0, 0, 0, 0); $stock_info = $rs[0]; if(!empty($stock_info)) { $params=array(); $params['message_code']=API::SUCCESS; $params['message']=API::SUCCESS_MSG; $params["code"]=$stock_info["code"]; $params["name"]=$stock_info["name"]; $params["date"]=$stock_info["date"]; $params["open_price"]=$stock_info["open_price"]; $params["close_price"]=$stock_info["close_price"]; $params["highest_price"]=$stock_info["highest_price"]; $params["lowest_price"]=$stock_info["lowest_price"]; $params["amount"]=$stock_info["amount"]; $params["value"]=$stock_info["value"]; $params["increase_ratio"]=$stock_info["increase_ratio"]; $params["increase_price"]=$stock_info["increase_price"]; $params["increase_sign"]=""; $params["up_price"]=""; $params["down_price"]=""; echo action_array( $params); } else { echo action_msg("指数数据为空", 401); } } }catch (MyException $e){ $api->ApiError($e->getCode(), $e->getMessage()); }