From be70ca6a0080eb5838a784ef720a0b1927184120 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 07 五月 2024 17:36:24 +0800
Subject: [PATCH] 页面修改/增加配置参数

---
 kp_html/kp/js/page.js |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/kp_html/kp/js/page.js b/kp_html/kp/js/page.js
index 3a9883d..c8ae3a3 100644
--- a/kp_html/kp/js/page.js
+++ b/kp_html/kp/js/page.js
@@ -82,7 +82,7 @@
 	}, 3000, 3000);
 	
 	setInterval(function() {
-		if (is_trade_time()||true) {
+		if (is_trade_time()) {
 			app.get_cb_list();
 		}
 	}, 3000, 3000);
@@ -734,6 +734,8 @@
 						});
 						app.get_last_trade_day_reasons(code);
 					}, 10);
+					
+					this.set_selected_cb_top(true);
 					//init_data();
 				},
 				show_want_codes: function(plate) {
@@ -862,12 +864,12 @@
 							var arr= new Array();
 							arr = arr.concat(res.data);
 							app.cb_list_top = arr;
-							app.set_selected_cb_top();
+							app.set_selected_cb_top(true);
 						}
 					})
 				},
 				
-				set_selected_cb_top:function(){
+				set_selected_cb_top:function(update_top){
 					var temp_list=app.cb_list;
 					for(var i=0;i<temp_list.length;i++){
 						if(temp_list[i][0][0] == app.cb_selected_code){
@@ -875,16 +877,30 @@
 							temp_list.splice(i, 1);
 							temp_list.unshift(data);
 							app.cb_list = temp_list;
+							
 							break;
+						}
+					}
+					if(update_top){
+						// 鍏堝彉榛�
+						// 缃《 
+						var temp_list=app.cb_list_top;
+						for(var i=0;i<temp_list.length;i++){
+							if(temp_list[i][1][0] == app.code){
+								var data = temp_list[i];
+								temp_list.splice(i, 1);
+								temp_list.unshift(data);
+								app.cb_list_top = temp_list;
+								app.cb_selected_code = data[0][0];
+								break;
+							}
 						}
 					}
 				},
 				
 				select_cb:function(data){
 					app.cb_selected_code = data[0][0];
-					this.set_selected_cb_top();
-					
-					
+					this.set_selected_cb_top(false);
 				},
 				add_to_ths:function(code){
 					pyjs.add_code_to_ths(code);

--
Gitblit v1.8.0