From 084ca650a5527886b7b6e869bcc8f7ae102ceea1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 21 十二月 2023 16:40:42 +0800 Subject: [PATCH] '网页修改' --- kp_html/kp/js/code_list.js | 70 +++++++++++++++++++++++++++++++++-- 1 files changed, 66 insertions(+), 4 deletions(-) diff --git a/kp_html/kp/js/code_list.js b/kp_html/kp/js/code_list.js index ca32cb3..424e175 100644 --- a/kp_html/kp/js/code_list.js +++ b/kp_html/kp/js/code_list.js @@ -30,6 +30,7 @@ data: { code: "000000", code_name: "娴嬭瘯浠g爜", + origin_code:null, trade_data: {}, trade_record: { open_limit_up: "", @@ -45,10 +46,12 @@ //闅愯棌鎾ゅ崟 hidden_cancel:true, hidden_little_money:false, + hidden_sell:true, l2_datas: [], l2_colors_class: ["color-single-start", "color-single-exec", "color-cancel", "color-real-order" ], + kpl_code_info: null, l_up_cancel_indexes: [], l_down_cancel_indexes: [], h_cancel_indexes: [], @@ -121,7 +124,7 @@ if (res.code == 0) { var real_order_index = -1; var buy_singles = []; - res.data.forEach(function(e) { + res.data.data.forEach(function(e) { if (e[1] != null) { if (e[1][0] == 3) { //鐪熷疄涓嬪崟浣嶇疆 @@ -138,9 +141,10 @@ }); console.log("鏈�杩戠湡瀹炰笅鍗曚綅缃細", real_order_index); app.latest_real_order_index = real_order_index; - app.l2_datas = res.data; - app.l2_code_name = app.code_name.slice(0, app.code_name.indexOf( - " ")) + app.l2_datas = res.data.data; + var code_name = res.data.code_name; + var code_ = res.data.code; + app.l2_code_name = code_ + " " + code_name; // 娓呴櫎鎴愪氦杩涘害锛孡鎾�, H鎾� app.trade_progress_index = -1; app.l_up_cancel_indexes = []; @@ -179,6 +183,10 @@ hidden_cancel_check: function(e) { app.hidden_cancel = e.currentTarget.checked; + }, + + hidden_sell_check: function(e) { + app.hidden_sell = e.currentTarget.checked; }, hidden_little_money_check:function(e){ @@ -270,6 +278,11 @@ if(app.hidden_canceled&&(item[2][6].indexOf('涔版挙')>=0||(item[2][8]!=null&&item[2][8].indexOf("-")>0))){ return false; } + + if(app.hidden_sell&&item[2][6].indexOf('鍗�')>=0){ + return false; + } + if(app.hidden_cancel&&(item[2][6].indexOf('涔版挙')>=0)){ return false; } @@ -278,6 +291,55 @@ } return true; + }, + get_score_data: function(code, name, callback) { + console.log("鑾峰彇鍒嗘暟鏁版嵁锛�", code, name); + http_util.get_score_data(code, name, function(res) { + res = JSON.parse(res) + console.log("鍒嗘暟璇锋眰缁撴灉锛�", res) + if (res.code == 0) { + console.log("鑾峰彇鍒嗘暟", res) + app.code = res.data.code + app.code_name = res.data.code_name + if (res.data.score_data) { + app.score_data = res.data.score_data; + } else { + app.score_data = app.default_score_data; + } + if (res.data.trade_data) { + app.trade_data = { + order: res.data.trade_data.trade_state.order + } + } else { + res.data.trade_data= { + order: false + }; + app.trade_data = res.data.trade_data + } + app.kpl_code_info = res.data.kpl_code_info; + //閫氱煡鍓睆鏀瑰彉鍐呭 + app.set_trade_info(app.code, app.code_name, + res.data.trade_data, + res.data.trade_record, + res.data.initiative_buy_codes, + res.data.passive_buy_codes); + + if (callback) { + callback() + } + } + }); + }, + set_target_code: function(code) { + console.log("璁剧疆鐩爣浠g爜", code); + app.origin_code = code; + app.code_name = code; + }, + load_data:function(){ + if(app.origin_code){ + app.get_score_data(app.origin_code,null,null); + } + } } }) -- Gitblit v1.8.0