diff --git a/.files/calendar.js b/deprecated/calendar.js similarity index 100% rename from .files/calendar.js rename to deprecated/calendar.js diff --git a/chartFive.php b/deprecated/chartFive.php similarity index 100% rename from chartFive.php rename to deprecated/chartFive.php diff --git a/chartFore.php b/deprecated/chartFore.php similarity index 100% rename from chartFore.php rename to deprecated/chartFore.php diff --git a/.files/chartOne.php b/deprecated/chartOne.php similarity index 100% rename from .files/chartOne.php rename to deprecated/chartOne.php diff --git a/.files/chartTwo.php b/deprecated/chartTwo.php similarity index 100% rename from .files/chartTwo.php rename to deprecated/chartTwo.php diff --git a/.files/compare_index.echart.php b/deprecated/compare_index.echart.php similarity index 100% rename from .files/compare_index.echart.php rename to deprecated/compare_index.echart.php diff --git a/.files/eof.php b/deprecated/eof.php similarity index 100% rename from .files/eof.php rename to deprecated/eof.php diff --git a/.files/search.php b/deprecated/search.php similarity index 100% rename from .files/search.php rename to deprecated/search.php diff --git a/deprecated/stock_trend.php b/deprecated/stock_trend.php new file mode 100644 index 0000000..465a7d8 --- /dev/null +++ b/deprecated/stock_trend.php @@ -0,0 +1,36 @@ + +
+股票代码: ' > +开始时间: ' > +结束时间: ' > + +
 
+ PE_TTM 市盈率 + PB 市净率 + PS 市销率 +
+
 
+
+ +
+
 
+ +
 
+ + + diff --git a/html/head.php b/html/head.php index 00c6ead..c018169 100644 --- a/html/head.php +++ b/html/head.php @@ -6,7 +6,7 @@ - + <?=$title?> diff --git a/index_trend.php b/index_trend.php index 705d1a8..0ecd054 100644 --- a/index_trend.php +++ b/index_trend.php @@ -7,6 +7,7 @@ $_REQUEST['t_start']= $_REQUEST['t_start']?$_REQUEST['t_start']:'2020-01-01'; $_REQUEST['t_end'] = $_REQUEST['t_end']?$_REQUEST['t_end']:date('Y-m-d'); $ts_code = $_REQUEST['code']; ?> +
指数代码:   @@ -36,47 +37,47 @@ $ts_code = $_REQUEST['code'];
\ No newline at end of file diff --git a/js/pubfunc.js b/js/pubfunc.js index bc322e0..62ef1a6 100644 --- a/js/pubfunc.js +++ b/js/pubfunc.js @@ -2,7 +2,7 @@ * @Author: 杨水淼 yangshuimiao@jsjd.cc * @Date: 2025-03-21 11:58:51 * @LastEditors: 杨水淼 yangshuimiao@jsjd.cc - * @LastEditTime: 2025-07-08 14:47:38 + * @LastEditTime: 2025-07-09 12:28:30 * @FilePath: \echarts\js\pubfunc.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -72,7 +72,7 @@ function convertIndexCode(tscode){ return '中小板指'; case '399006.SZ': return '创业板指'; - case '000016.SZ': + case '000016.SH': return '上证50'; case '399300.SZ': return '沪深300'; @@ -88,6 +88,7 @@ function formatDateToYYYYMMDD(dateStr) { } function pickData(data, dateKey, valueKey) { + data.sort((a, b) => a[dateKey] - b[dateKey]); return data.map(item => ({ value: [ item[dateKey].slice(0, 4) + '-' + item[dateKey].slice(4, 6) + '-' + item[dateKey].slice(6, 8), // 格式化日期 yyyymmdd 转为 yyyy-mm-dd diff --git a/js/renderCharts.js b/js/renderCharts.js index 2162012..3983253 100644 --- a/js/renderCharts.js +++ b/js/renderCharts.js @@ -1,4 +1,12 @@ -function doubleLineChart(){ +/* + * @Author: 杨水淼 yangshuimiao@jsjd.cc + * @Date: 2025-07-08 10:40:52 + * @LastEditors: 杨水淼 yangshuimiao@jsjd.cc + * @LastEditTime: 2025-07-09 07:38:46 + * @FilePath: \echarts\js\renderCharts.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ +function doubleLineChart(params){ /* 需要外部提供: chartid: div container id @@ -7,13 +15,13 @@ function doubleLineChart(){ sub_text: str data:data1,data2, array */ - var dom = document.getElementById("chartid"); + var dom = document.getElementById(params.chartid); var myChart = echarts.init(dom,'dark'); option = null; option = { title: { - text: legend[0]+' V.S '+legend[2], - subtext: subtxt, + text: params.text, + subtext: params.sub_text, textAlign:'center', left:'50%' }, @@ -21,7 +29,7 @@ function doubleLineChart(){ trigger: 'axis' }, legend: { - data:legend, + data:params.legend, right:'20' }, grid: { @@ -41,12 +49,12 @@ function doubleLineChart(){ }, yAxis: [{ type: 'value', - name:legend[0], //图列 + name:params.legend[0], //图列 show:true }, { type:'value', - name:legend[2]+unit, //图例 + name:params.legend[1], //图例 //scale:true, boundaryGap:false, show:true, @@ -74,19 +82,19 @@ function doubleLineChart(){ }], series: [ { - name:legend[0], + name:params.legend[0], type:'line', yAxisIndex:0, symbol:'none', - data:data1 + data:params.data1 }, { - name:legend[2], + name:params.legend[1], type:'line', yAxisIndex:1, symbol:'none', //数据圆点 smooth:false, - data:data2 + data:params.data2 } ] }; diff --git a/stock_trend.php b/stock_trend.php index 465a7d8..96247c0 100644 --- a/stock_trend.php +++ b/stock_trend.php @@ -7,6 +7,7 @@ $ts_name = tscodeToName(ts_code_conv($_REQUEST['ts_code'])); $title="股价VS PE/PB/PS 趋势:".$ts_name.'('.$_REQUEST['ts_code'].')'; include_once "html/head.php"; ?> +
股票代码: ' > 开始时间: ' > @@ -14,23 +15,98 @@ include_once "html/head.php";
 
PE_TTM 市盈率 - PB 市净率 - PS 市销率 + PB 市净率 + PS 市销率 + 总市值 +
 
-
- -
-
 
- -
 
- diff --git a/tmp.html b/tmp.html deleted file mode 100644 index 925f66d..0000000 --- a/tmp.html +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file