From 7fa16dfe511d6c0803061cba29965b6be2e3d953 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 06 八月 2024 16:34:34 +0800
Subject: [PATCH] 页面修改

---
 kp_html/kp/js/page.js |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/kp_html/kp/js/page.js b/kp_html/kp/js/page.js
index c8ae3a3..8b0e509 100644
--- a/kp_html/kp/js/page.js
+++ b/kp_html/kp/js/page.js
@@ -104,7 +104,7 @@
 				trade_data: {
 					order: 0
 				},
-				cb_list:[],// 鍙浆鍊哄垪琛�
+				cb_list:null,// 鍙浆鍊哄垪琛�
 				cb_list_top:[],
 				cb_selected_code:'',
 				// 浠g爜鐨勫紑鐩樺暒娑ㄥ仠鍘熷洜
@@ -383,7 +383,9 @@
 				// 閫夎偂瀹濇定鍋滃師鍥�
 				xgb_limit_up_reasons: null,
 				// 甯傚満鎯呯华
-				market_feeling_info: {}
+				market_feeling_info: {},
+				// 鏉垮潡杞姩
+				latest_limit_up_blocks:[]
 			},
 			watch: {
 				want_codes: function() {
@@ -860,6 +862,34 @@
 					http_util.get_cb_list(function(res){
 						res = JSON.parse(res);
 						if(res.code==0){
+							if(app.cb_list!=null){
+								var buy_codes = [];
+								for(var i=0;i<res.data.length;i++){
+									var contains = false; 
+									for(var j=0;j<app.cb_list.length;j++){
+										if(app.cb_list[j][0][0] ==res.data[i][0][0] ){
+											contains = true;
+											break;
+										}
+									}
+									if(!contains){
+										buy_codes.push(res.data[i][0][0])
+									}
+								}
+								if(buy_codes.length>0){
+									buy_codes.forEach(function(e){
+										http_util.buy_by_ths(e,function(res){
+											res= JSON.parse(res);
+											if(res.code!=0){
+												console.log("鍚岃姳椤轰笅鍗曞嚭閿欙細",res.msg);
+											}else{
+												layer.msg("涓嬪崟瀹屾垚");
+											}
+										});
+									});
+								}
+							}
+							
 							app.cb_list = res.data;
 							var arr= new Array();
 							arr = arr.concat(res.data);
@@ -904,6 +934,29 @@
 				},
 				add_to_ths:function(code){
 					pyjs.add_code_to_ths(code);
+				},
+				buy_by_ths:function(code){
+					http_util.buy_by_ths(code,function(res){
+						res= JSON.parse(res);
+						if(res.code!=0){
+							layer.msg("涓嬪崟鍑洪敊锛�"+res.msg);
+							
+						}else{
+							layer.msg("涓嬪崟瀹屾垚");
+						}
+					});
+				},
+				statistic_latest_limit_up_block:function(code){
+					http_util.statistic_latest_limit_up_block(code,function(res){
+						res= JSON.parse(res);
+						console.log(res);
+						if(res.code!=0){
+							layer.msg(res.msg);
+						}else{
+							app.latest_limit_up_blocks= res.data;
+						}
+					});
+					
 				}
 			 }
 		});
@@ -915,6 +968,7 @@
 		app.get_limit_up_list(app.code, false);
 		app.get_kpl_market_feelings();
 		app.get_cb_list();
+		app.statistic_latest_limit_up_block("");
 	}
 
 	$(".market .child-title").click(function() {

--
Gitblit v1.8.0