index_recent_days.php 804 B

1
  1. <?php /** * Created by PhpStorm. * User: wanggagtao * Date: 2019/4/18 * Time: 10:47 AM */ try { $code = isset($_REQUEST['code'])?safeCheck($_REQUEST['code'],0):'0'; $start_date = isset($_REQUEST['start_date'])?safeCheck($_REQUEST['start_date'],0):'0';//2020/02/01转换为时间戳 $traceback_days = isset($_REQUEST['traceback_days'])?safeCheck($_REQUEST['traceback_days'],1):'0'; $order = isset($_REQUEST['order'])?safeCheck($_REQUEST['order'],1):'0'; if(empty($start_date)) throw new MyException("start_date参数不能为空",101); $stock_info=Index_day_k::index_recent_days($code,$start_date,$traceback_days,$order); echo action_msg_data(API::SUCCESS_MSG, API::SUCCESS, $stock_info); }catch (MyException $e){ $api->ApiError($e->getCode(), $e->getMessage()); }