From 5d135b24f1918e45b10fc71d1cd9e2b3813491c5 Mon Sep 17 00:00:00 2001 From: yangshuimiao Date: Fri, 10 Jan 2025 07:48:24 +0800 Subject: [PATCH] update: minor update --- estateNewTradeDaily.php | 16 ++++------------ inc/ajax.inc.php | 12 +++++++----- inc/getBasic.inc.php | 5 +++-- js/estate.js | 4 ++-- phpinfo.php | 16 ++++++---------- realestate.php | 2 +- 6 files changed, 23 insertions(+), 32 deletions(-) diff --git a/estateNewTradeDaily.php b/estateNewTradeDaily.php index fb9b213..c98e3ea 100644 --- a/estateNewTradeDaily.php +++ b/estateNewTradeDaily.php @@ -145,15 +145,7 @@ include_once "html/head.php"; yAxisIndex:0, symbol:'none', data:data3, - itemStyle: - {normal: - {label: - { - show:false, //显示数字 - position:'top' - } - } - }, + label:{show:true,position:'top',},//显示数字 }, { name:legend[1], @@ -161,7 +153,7 @@ include_once "html/head.php"; yAxisIndex:1, symbol:'none', data:data2, - itemStyle:{normal:{label:{show:true}}}, //显示数字 + label:{show:true},//显示数字 }, ] @@ -266,7 +258,7 @@ include_once "html/head.php"; yAxisIndex:0, symbol:'none', data:data3, - itemStyle:{normal:{label:{show:true}}}, //显示数字 + label:{show:true}, //显示数字 }, { name:legend2[1], @@ -274,7 +266,7 @@ include_once "html/head.php"; yAxisIndex:1, symbol:'none', data:data4, - itemStyle:{normal:{label:{show:true}}}, //显示数字 + label:{show:true}, //显示数字 } ] }; diff --git a/inc/ajax.inc.php b/inc/ajax.inc.php index 0e641cf..68e3537 100644 --- a/inc/ajax.inc.php +++ b/inc/ajax.inc.php @@ -22,7 +22,7 @@ EOF; "status" => "1", 'stocks'=> $data, "company"=>$_REQUEST['t_vendor'], - )); + ),JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } /** @@ -65,7 +65,7 @@ if($_REQUEST['t']=='financeData'){ //strip key from array $data //dataTable must NOT have any key of json $data=array_values($data); - echo json_encode(array("data"=>$data)); + echo json_encode(array("data"=>$data),JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } /* @@ -78,7 +78,7 @@ if($_REQUEST['t']=='esfTBD'){ "status" => "1", 'dataTrade'=> $dataTrade, 'dataList'=>$dataList - )); + ),JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } /* @@ -90,7 +90,7 @@ if($_REQUEST['t']=='esfListDaily'){ echo json_encode(array( "status" => "1", 'datas'=> $data - )); + ),JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } function esfTradeDaily(){ global $mysqli; @@ -108,6 +108,7 @@ function esfTradeDaily(){ left join estate_json_ext eje1 on eje1.id=eje.id+3 left join estate_json_ext eje2 on eje2.id=eje.id+4 where ej.data_type='5' and (ej.tdate>='{$_REQUEST['t_start']}' and ej.tdate<='{$_REQUEST['t_end']}') + order by ej.tdate asc EOF; $result = $mysqli->query($sql); @@ -131,6 +132,7 @@ function esfListDaily(){ left join estate_json_ext eje1 on eje1.id=eje.id+3 left join estate_json_ext eje2 on eje2.id=eje.id+5 where ej.data_type='8' and (ej.tdate>='{$_REQUEST['t_start']}' and ej.tdate<='{$_REQUEST['t_end']}') + order by ej.tdate asc EOF; $result = $mysqli->query($sql); @@ -181,5 +183,5 @@ EOF; "status" => "1", 'datas'=> $data, 'dataExt'=> $data2 - )); + ),JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } diff --git a/inc/getBasic.inc.php b/inc/getBasic.inc.php index 37bbf6a..c7bbbac 100644 --- a/inc/getBasic.inc.php +++ b/inc/getBasic.inc.php @@ -17,7 +17,7 @@ if($day_end) { $where .= " and trade_date <'".$day_end."'"; } $sql= <<query($sql); @@ -27,7 +27,8 @@ $tDate=$idx=$data=$data_clean=array(); # $data_clean is an array without null if($result && $result->num_rows>0) { #$data = $result->fetch_all(); while($row=$result->fetch_assoc()){ - $trade_date=substr($row['trade_date'],0,4).'-'.substr($row['trade_date'],4,2).'-'.substr($row['trade_date'],6,2); + $trade_date=$row['trade_date']; + #$trade_date=substr($row['trade_date'],0,4).'-'.substr($row['trade_date'],4,2).'-'.substr($row['trade_date'],6,2); #$trade_date1=strtotime($row['trade_date']); array_push($tDate,$trade_date); array_push($idx,$row['pe_ttm']); diff --git a/js/estate.js b/js/estate.js index 3eba09b..8ce69f3 100644 --- a/js/estate.js +++ b/js/estate.js @@ -38,8 +38,8 @@ option = { type: 'value', name:legend[0], //图列 show:true, - scale:false, - min:200000, + scale:true, + //min:190000, } ], dataZoom: [{ diff --git a/phpinfo.php b/phpinfo.php index fdb46b1..d02be25 100644 --- a/phpinfo.php +++ b/phpinfo.php @@ -1,4 +1,5 @@ "; $date = date('Ymd',strtotime($date)); echo $date; */ +/** +echo date("Y-m-d H:i:s"); phpinfo(); -//ini_set("display_errors","1"); -$a = array(); -for($i=0;$i<10;$i++){ - $a[]=random_int(1,100); -} -var_dump($a); -unset($a[5]); -var_dump($a); -$a=array_values($a); -var_dump($a); +ini_set("display_errors","1"); +*/ + ?> diff --git a/realestate.php b/realestate.php index f058791..fd52a0c 100644 --- a/realestate.php +++ b/realestate.php @@ -33,6 +33,6 @@ include_once "html/head.php"; var legend = ; var headtxt = ''; - +