From ec012b7d2b915db24cd8b23f723bf18dfe75b7d6 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 16 十二月 2024 11:13:31 +0800
Subject: [PATCH] 网页代码修改/结构调整

---
 kp_html/kp/js/code_list.js |   56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/kp_html/kp/js/code_list.js b/kp_html/kp/js/code_list.js
index 47c4b53..1996f91 100644
--- a/kp_html/kp/js/code_list.js
+++ b/kp_html/kp/js/code_list.js
@@ -75,7 +75,11 @@
 			big_buy_order_count:0,
 			big_sell_order_count:0,
 			// 杩囨护鐨勭储寮�
-			filter_indexes:[]
+			filter_indexes:[],
+			// 璐圭敤鏁版嵁
+			commission_data:{"total_commission":0, "month_commission":0},
+			// L2鏁版嵁缁撴潫绱㈠紩
+			l2_end_index:null
 			
 		},
 		watch: {
@@ -106,7 +110,6 @@
 
 			setInterval(function() {
 				if (is_trade_time()) {
-					app.get_delegated_buy_code_infos();
 					app.get_latest_cancel_orders();
 				}
 			}, 1000 * 3);
@@ -189,7 +192,7 @@
 				
 				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);
@@ -297,7 +300,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");
 			},
@@ -563,9 +566,9 @@
 			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);
@@ -620,6 +623,7 @@
 				
 			},
 			l2_screen_click:function(){
+				
 				// L2绛涢��
 				if(!isNaN($("#min-volume").val())){
 					app.l2_min_volume=$("#min-volume").val();
@@ -632,6 +636,14 @@
 				}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=[];
@@ -644,6 +656,8 @@
 				}else{
 					app.filter_indexes =[];
 				}
+				layer.msg("璁剧疆鎴愬姛")
+				
 
 			},
 			fordbidden_buy:function(code){
@@ -653,6 +667,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