From e25a0bad090c444970b48df2713f02d691666b08 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 05 二月 2024 14:19:49 +0800 Subject: [PATCH] 看盘功能完善 --- kp_html/kp/js/code_list.js | 64 +++++++++++++++++++++++++++++--- 1 files changed, 58 insertions(+), 6 deletions(-) diff --git a/kp_html/kp/js/code_list.js b/kp_html/kp/js/code_list.js index bdc6391..4a87ed5 100644 --- a/kp_html/kp/js/code_list.js +++ b/kp_html/kp/js/code_list.js @@ -60,7 +60,8 @@ operate_index: -1, // 宸茬粡濮旀墭鐨勪拱浠g爜淇℃伅 delegated_buy_code_infos:[], - layui_element:null + layui_element:null, + l2_cant_buy_reasons:[], }, watch:{ delegated_buy_code_infos:function(){ @@ -78,8 +79,10 @@ }); setInterval(function(){ - app.get_delegated_buy_code_infos(); - },1000*600*5); + if(is_trade_time()){ + app.get_delegated_buy_code_infos(); + } + },1000*5); }, methods: { change_data_type: function(type) { @@ -302,6 +305,7 @@ console.log("澶勭悊鍑洪敊") console.log(e) } + app.get_l2_cant_buy_reasons(code); }, show_more_records: function(items) { var str_ = "" @@ -311,8 +315,41 @@ }); alert(str_); }, - test: function() { - + set_real_place_order_index: function() { + // 璁剧疆鐪熷疄涓嬪崟浣� + if(app.code){ + layer.prompt({ + formType: 0, + value: '', + title: '璁剧疆鐪熷疄涓嬪崟浣�-'+app.code, + area: ['800px', '350px'] //鑷畾涔夋枃鏈煙瀹介珮 + }, function(value, index, elem){ + try{ + if(isNaN(value)){ + layer.msg("璇疯緭鍏ユ暟瀛�"); + return; + }else{ + http_util.set_real_place_order_index(app.code,parseInt(value),function(res){ + // 鑾峰彇鍒扮粨鏋� + console.log(res); + if(res.code!=0){ + layer.msg(res.msg,{icon: 5}); + }else{ + layer.msg("璁剧疆鎴愬姛",{icon: 1}); + } + }) + } + }catch(e){ + } + layer.close(index); + }); + + //set_real_place_order_index + + }else{ + layer.msg("璇峰厛鍔犺浇鏁版嵁"); + } + }, need_show:function(item){ if(app.hidden_canceled&&(item[2][6].indexOf('涔版挙')>=0||(item[2][8]!=null&&item[2][8].indexOf("-")>0))){ @@ -378,8 +415,23 @@ load_data:function(){ if(app.origin_code){ app.get_score_data(app.origin_code,null,null); + app.get_l2_cant_buy_reasons(app.origin_code); } - + }, + cancel_order:function(code){ + http_util.cancel_order(code,function(res){ + layer.msg("鎾ゅ崟鎴愬姛"); + }); + }, + get_l2_cant_buy_reasons:function(code){ + http_util.get_l2_cant_buy_reasons(code,function(res){ + res = JSON.parse(res); + if(res.code==0){ + app.l2_cant_buy_reasons = res.data; + }else{ + app.l2_cant_buy_reasons =[] + } + }); } } }) -- Gitblit v1.8.0