From cd3eccb32719bb5409ec62f4e201b85992df2d33 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 30 六月 2025 18:14:50 +0800 Subject: [PATCH] 网页修改 --- kp_html/kp/js/code_list.js | 106 ++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 85 insertions(+), 21 deletions(-) diff --git a/kp_html/kp/js/code_list.js b/kp_html/kp/js/code_list.js index 5945752..d356838 100644 --- a/kp_html/kp/js/code_list.js +++ b/kp_html/kp/js/code_list.js @@ -73,7 +73,13 @@ kpl_open_limit_up_count_rank:[], // 澶у崟涔板崠鏁伴噺 big_buy_order_count:0, - big_sell_order_count:0 + big_sell_order_count:0, + // 杩囨护鐨勭储寮� + filter_indexes:[], + // 璐圭敤鏁版嵁 + commission_data:{"total_commission":0, "month_commission":0}, + // L2鏁版嵁缁撴潫绱㈠紩 + l2_end_index:null }, watch: { @@ -104,7 +110,6 @@ setInterval(function() { if (is_trade_time()) { - app.get_delegated_buy_code_infos(); app.get_latest_cancel_orders(); } }, 1000 * 3); @@ -168,6 +173,7 @@ } http_util.get_l2_h_cancel_datas(app.code, app.operate_index, function(res) { res = JSON.parse(res); + console.log("H鎾ゆ暩鎿�",res) if (res.code == 0) { app.h_cancel_indexes = res.data; } @@ -186,9 +192,8 @@ var date = $("#date").val(); - http_util.get_l2_datas(app.code, date, function(res) { + http_util.get_l2_datas(app.code, date, app.l2_end_index, function(res) { layer.close(index); - console.log("鑾峰彇鍒癓2鏁版嵁锛�", res) res = JSON.parse(res); if (res.code == 0) { var real_order_indexes = new Array(); @@ -215,6 +220,10 @@ big_buy_order+=1; } + if(e[2][5] == 6){ + console.log("灏忓崟锛�", e) + } + }); res.data.data.transactions.forEach(function(e) { if(parseFloat(e[2][3])>=299){ @@ -232,7 +241,10 @@ console.log("鏈�杩戠湡瀹炰笅鍗曚綅缃細", real_order_indexes); app.real_order_indexes = real_order_indexes; app.l2_datas = res.data.data; - console.log("L2鏁版嵁:", app.l2_datas); + + console.log("绗�1鏉2鏁版嵁锛�", res.data.data[0]) + + // console.log("L2鏁版嵁:", app.l2_datas); var code_name = res.data.code_name; var code_ = res.data.code; app.l2_code_name = code_ + " " + code_name; @@ -294,7 +306,7 @@ reset_l2_height: function() { var height = document.documentElement.clientHeight; console.log("灞忓箷锛�", height); - $(".l2-content").eq(0).css("height", (height - 380 - 66 * app + $(".l2-content").eq(0).css("height", (height - 390 - 76 * app .delegated_buy_code_infos.length - 24 * app.latest_cancel_orders.length ) + "px"); }, @@ -303,17 +315,6 @@ app.l_up_cancel_indexes = []; app.l_down_cancel_indexes = []; app.h_cancel_indexes = []; - }, - get_last_trade_day_reasons: function(code) { - http_util.get_last_trade_day_reasons(code, function(res) { - res = JSON.parse(res); - console.log("杩斿洖鍐呭", res); - if (res.code == 0) { - app.same_reason_codes = res.data; - } else { - app.same_reason_codes = null; - } - }); }, hidden_canceled_check: function(e) { @@ -355,7 +356,6 @@ console.log("浜ゆ槗鏁版嵁", trade_data) console.log("浜ゆ槗璁板綍鏁版嵁", trade_record) app.code = code; - // app.get_last_trade_day_reasons(code); app.code_name = code_name; if (trade_data) { console.log("浜ゆ槗鏁版嵁绫诲瀷", typeof trade_data) @@ -459,9 +459,21 @@ }, need_show: function(item) { + if(app.filter_indexes.length>0){ + if(app.filter_indexes.indexOf(item[2][0])>=0) + { + return true; + }else{ + return false; + } + } + + if(app.real_order_indexes.includes( item[2][0])){ return true; } + + if (app.hidden_canceled && (item[2][6].indexOf('涔版挙') >= 0 || (item[2][8] != null && item[2][8].indexOf("-") > 0))) { @@ -548,10 +560,11 @@ load_data: function(refresh_l2) { if (app.origin_code) { app.get_score_data(app.origin_code, null, function(e) { - if (refresh_l2) { - app.refresh_l2_data(); - } + // if (refresh_l2) { + // app.refresh_l2_data(); + // } }); + app.get_l2_cant_buy_reasons(app.origin_code); http_util.get_open_limit_up_count_rank(null,function(res){ res = JSON.parse(res); @@ -604,6 +617,7 @@ }, l2_screen_click:function(){ + // L2绛涢�� if(!isNaN($("#min-volume").val())){ app.l2_min_volume=$("#min-volume").val(); @@ -616,6 +630,28 @@ }else{ app.l2_max_volume=null; } + + + if(!isNaN($("#end-index").val())){ + app.l2_end_index=$("#end-index").val(); + }else{ + app.l2_end_index=null; + } + + watch_indexes_str = $("#watch_indexes").val(); + if(watch_indexes_str!=null&&watch_indexes_str.length>0){ + var final_indexes=[]; + var indexes = watch_indexes_str.split(","); + indexes.forEach(function(e){ + final_indexes.push(parseInt(e)); + }); + app.filter_indexes = final_indexes; + console.log("閫変腑绱㈠紩锛�",final_indexes); + }else{ + app.filter_indexes =[]; + } + layer.msg("璁剧疆鎴愬姛") + }, fordbidden_buy:function(code){ @@ -625,6 +661,34 @@ layer.msg(res.msg); } }); + }, + get_account_commission_detail:function(){ + + http_util.get_account_commission_detail(function(res){ + + res = JSON.parse(res); + console.log(res); + if(res.code!=0){ + layer.msg(res.msg); + }else{ + let commission_data ={}; + // commission_data.commission = =res.data.commission; + commission_data.delegates =res.data.delegates ; + commission_data.deals =res.data.deals; + var total_money = 0; + for(let k in commission_data.delegates){ + total_money -=commission_data.delegates[k]["money"]; + } + for(let k in commission_data.deals){ + total_money +=commission_data.deals[k]["money"]; + } + commission_data.total_commission = total_money.toFixed(2); + commission_data.commission = res.data.commission; + commission_data.month_commission = res.data.month_commission; + console.log(commission_data) + app.commission_data = commission_data; + } + }); } } }) -- Gitblit v1.8.0