| 1 |
- <?php
/**
* Created by PhpStorm.
* User: wanggagtao
* Date: 2019/4/18
* Time: 10:47 AM
*/
try {
$index_type = isset($_REQUEST['index_type'])?safeCheck($_REQUEST['index_type'],1):0;
$date = isset($_REQUEST['date'])?safeCheck($_REQUEST['date'],1):0;
if((int)$index_type>6 || (int)$index_type<0 )
{
throw new MyException("index_type参数不合法",101);
}
$stock_info=Index_day_k::get_current_day_index($index_type,$date);
echo action_msg_data(API::SUCCESS_MSG, API::SUCCESS, $stock_info);
}catch (MyException $e){
$api->ApiError($e->getCode(), $e->getMessage());
}
|