| | |
| | | h_cancel_indexes: [], |
| | | buy_single_indexes: [], |
| | | l2_code_name: '', |
| | | operate_index: -1 |
| | | operate_index: -1, |
| | | // 已经委托的买代码信息 |
| | | delegated_buy_code_infos:[], |
| | | layui_element:null |
| | | }, |
| | | watch:{ |
| | | delegated_buy_code_infos:function(){ |
| | | if(app.layui_element){ |
| | | setTimeout(()=>{ |
| | | app.layui_element.render(); |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | mounted:function(){ |
| | | layui.use('element', function(){ |
| | | var element = layui.element; |
| | | app.layui_element=element; |
| | | }); |
| | | |
| | | setInterval(function(){ |
| | | app.get_delegated_buy_code_infos(); |
| | | },1000*600*5); |
| | | }, |
| | | methods: { |
| | | change_data_type: function(type) { |
| | |
| | | }); |
| | | |
| | | }, |
| | | get_delegated_buy_code_infos:function(){ |
| | | // 获取数据 |
| | | http_util.get_delegated_buy_code_infos(function(result){ |
| | | if (result.code == 0) { |
| | | console.log("已挂买单数据:",result.data); |
| | | result.data.forEach(function(e){ |
| | | if(e.total_num>0){ |
| | | e.percent = e.finish_num*100/e.total_num; |
| | | }else{ |
| | | e.percent = 0; |
| | | } |
| | | }); |
| | | app.delegated_buy_code_infos = result.data |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | |
| | | clear_cancel_mark: function() { |
| | | //清除撤单标记 |
| | | app.l_up_cancel_indexes = []; |