From 5a2ef3a696ddccbc1faef1e2e90f5b535ec24a0d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 11 一月 2024 10:06:14 +0800
Subject: [PATCH] 看盘网页修改/接口本地化代理

---
 kp_html/kp/js/page.js |   59 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/kp_html/kp/js/page.js b/kp_html/kp/js/page.js
index ae700e6..7147309 100644
--- a/kp_html/kp/js/page.js
+++ b/kp_html/kp/js/page.js
@@ -13,14 +13,14 @@
 var app;
 $(function() {
 	function _resize() {
-		var code_info_height = 480
+		var code_info_height = 450 
 		console.log("鎬婚珮", $(window).height())
 		var bottom_height = $(window).height() - code_info_height - 140;
 		console.log("搴曢儴楂�", bottom_height)
-		$("#body>div:nth-child(2)>div").css("height", code_info_height).css("max-height", code_info_height);
-		$("#body>div:nth-child(3)").css("height", bottom_height)
-		$("#body>div:nth-child(3)>div:nth-child(2)").css("height", bottom_height - 10)
-		$("#body>div:nth-child(3)>div:nth-child(3)").css("height", bottom_height - 60)
+		$("#body>div:nth-child(3)>div").css("height", code_info_height).css("max-height", code_info_height);
+		$("#body>div:nth-child(4)").css("height", bottom_height)
+		$("#body>div:nth-child(4)>div:nth-child(2)").css("height", bottom_height - 10)
+		$("#body>div:nth-child(4)>div:nth-child(3)").css("height", bottom_height - 60)
 		$(".outer-container").css("height", bottom_height - 180)
 	}
 	//閽堝绐楀彛楂樺害鍋氳皟鏁�
@@ -365,7 +365,8 @@
 				},
 				industry_data_type: 0,
 				jingxuan_data_type: 0,
-
+				// 閫夎偂瀹濇定鍋滃師鍥�
+				xgb_limit_up_reasons:["澶ч噾铻�","1銆佺彔娴峰浗浼侊紝瀹炴帶浜虹彔娴峰浗璧勫锛岀彔娴烽噾鎺ф棗涓嬪敮涓�鎺ц偂鐨勪笂甯傚钩鍙帮紝鍙傝偂浼樺繀閫夌瓑浜哄伐鏅鸿兘鐙鍏藉叕鍙革紱 2銆佸叕鍙告寔鏈夊崕閲戣瘉鍒�1.4493%鑲℃潈"],
 			},
 			watch: {
 				want_codes: function() {
@@ -464,13 +465,13 @@
 						res = JSON.parse(res)
 						if (res.code == 0) {
 							app.first_info = res.data
-							if (app.choose_code.first) {
-								app.get_plate_info(app.choose_code.first, is_auto_refresh);
-							} else if (app.first_info.limit_up_codes) {
-								app.choose_code.first = app.first_info.limit_up_codes[0][0];
-								app.get_plate_info(app.first_info.limit_up_codes[0][0],
-									is_auto_refresh);
-							}
+							// if (app.choose_code.first) {
+							// 	app.get_plate_info(app.choose_code.first, is_auto_refresh);
+							// } else if (app.first_info.limit_up_codes) {
+							// 	app.choose_code.first = app.first_info.limit_up_codes[0][0];
+							// 	app.get_plate_info(app.first_info.limit_up_codes[0][0],
+							// 		is_auto_refresh);
+							// }
 						}
 					});
 				},
@@ -603,15 +604,32 @@
 					app.origin_code = code;
 					app.code = code;
 					app.code_name = code;
-					//璇锋眰鏉垮潡
-					http_util.get_kpl_block_info(code,function(res){
-						console.log("鏉垮潡璇锋眰缁撴灉锛�",res);
-						res = JSON.parse(res)
-						if(res.code==0){
-							app.kpl_code_info = res.data;
+					app.first_info.limit_up_codes.forEach(function(e){
+						if(e[0] == code){
+							app.code_name = e[1] + " " + e[0];
 						}
 					});
-					app.get_last_trade_day_reasons(code);
+					http_util.get_xgb_limit_up_reasons(code,function(res){
+						console.log("閫夎偂瀹濊姹傜粨鏋滐細",res);
+						res = JSON.parse(res)
+						if(res.code==0){
+							app.xgb_limit_up_reasons = res.data;
+						}else{
+							app.xgb_limit_up_reasons = null;
+						}
+					});
+					
+					//璇锋眰鏉垮潡
+					setTimeout(function(){
+						http_util.get_kpl_block_info(code,function(res){
+							console.log("鏉垮潡璇锋眰缁撴灉锛�",res);
+							res = JSON.parse(res)
+							if(res.code==0){
+								app.kpl_code_info = res.data;
+							}
+						});
+						app.get_last_trade_day_reasons(code);
+					},10);
 					//init_data();
 				},
 				show_want_codes: function(plate) {
@@ -646,6 +664,7 @@
 					
 					http_util.get_last_trade_day_reasons(code,function(res){
 						res = JSON.parse(res);
+						console.log("鏉垮潡浠婃棩琛ㄧ幇锛�",res)
 						if(res.code == 0){
 							app.yesterday_block_info = res.data;
 						}else{

--
Gitblit v1.8.0