| | |
| | | // 过滤的索引 |
| | | filter_indexes:[], |
| | | // 费用数据 |
| | | commission_data:{"total_commission":0, "month_commission":0} |
| | | commission_data:{"total_commission":0, "month_commission":0}, |
| | | // L2数据结束索引 |
| | | l2_end_index:null |
| | | |
| | | }, |
| | | watch: { |
| | |
| | | |
| | | setInterval(function() { |
| | | if (is_trade_time()) { |
| | | app.get_delegated_buy_code_infos(); |
| | | app.get_latest_cancel_orders(); |
| | | } |
| | | }, 1000 * 3); |
| | |
| | | |
| | | 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("获取到L2数据:", res) |
| | | res = JSON.parse(res); |
| | |
| | | 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); |
| | |
| | | |
| | | }, |
| | | l2_screen_click:function(){ |
| | | |
| | | // L2筛选 |
| | | if(!isNaN($("#min-volume").val())){ |
| | | app.l2_min_volume=$("#min-volume").val(); |
| | |
| | | }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=[]; |
| | |
| | | }else{ |
| | | app.filter_indexes =[]; |
| | | } |
| | | layer.msg("设置成功") |
| | | |
| | | |
| | | }, |
| | | fordbidden_buy:function(code){ |
| | |
| | | let commission_data ={}; |
| | | // commission_data.commission = =res.data.commission; |
| | | commission_data.delegates =res.data.delegates ; |
| | | commission_data.deal =res.data.deal; |
| | | commission_data.deals =res.data.deals; |
| | | var total_money = 0; |
| | | for(let k in commission_data.delegates){ |
| | | total_money -=commission_data.delegates[k]["money"]; |
| | | } |
| | | total_money += commission_data.deal["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; |
| | | |
| | | |
| | | } |
| | | }); |
| | | } |